Package org.nuiton.topia.generator
Class TopiaGeneratorUtil
java.lang.Object
org.nuiton.eugene.GeneratorUtil
org.nuiton.eugene.java.JavaGeneratorUtil
org.nuiton.topia.generator.TopiaGeneratorUtil
public class TopiaGeneratorUtil
extends org.nuiton.eugene.java.JavaGeneratorUtil
Classe regroupant divers méthodes utiles pour la génération des entités
Created: 13 déc. 2005
- Version:
- $Id$
- Author:
- Arnaud Thimel <thimel@codelutin.com>, tchemit <tchemit@codelutin.com>, fdesbois <fdesbois@codelutin.com>, chatellier <chatellier@codelutin.com>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringLe package par défaut si aucun n'est spécifiéstatic final Stringdependency to add extra operations for entity dao.static final Comparator<org.nuiton.eugene.models.object.ObjectModelClass>static final StringType de persistence par défaut (si aucun précisé)static final StringType de persistence Hibernatestatic final StringType de persistence LDAPstatic final StringPropriété des générateurs indiquant le package par défautFields inherited from class org.nuiton.eugene.java.JavaGeneratorUtil
DEPENDENCIES_CONSTANTS, OPERATION_GETTER_BOOLEAN_PREFIX, OPERATION_GETTER_DEFAULT_PREFIXFields inherited from class org.nuiton.eugene.GeneratorUtil
SERIAL_VERSION_UID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncleanImports(String packageName, Set<String> fqns) Clean a set of fqns, transform it into aListand sort it.static booleangenerateToString(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Test if we need to generatetoStringmethod for the given class.static StringgetAccessTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ACCESStag value on the given attribute.static StringgetAnnotationTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ANNOTATIONtag value on the given attribute.static List<org.nuiton.eugene.models.object.ObjectModelClass>getClassesByStereotype(String stereotype, org.nuiton.eugene.models.object.ObjectModel model, boolean sort) Obtain the list of classes for a given stereotype with the possibility to sort the result.static StringgetCopyright(org.nuiton.eugene.models.Model model) Deprecated.since 2.5 never use anywherestatic Class<?>getDAOImplementation(org.nuiton.eugene.models.object.ObjectModel model) Obtain the class to use as abstract dao.static StringgetDaoImplementationTagValue(org.nuiton.eugene.models.object.ObjectModel model) Obtains the value of theTopiaTagValues.TAG_DAO_IMPLEMENTATIONtag value on the given model.static org.nuiton.eugene.models.object.ObjectModelInterfacegetDAOInterface(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Renvoie l'interface DAO associée à la classe passée en paramètrestatic StringgetDbName(org.nuiton.eugene.models.object.ObjectModelElement element) Renvoie le nom BD de l'élement passé en paramètre.static StringgetDBName(org.nuiton.eugene.models.object.ObjectModelElement element) Deprecated.since 2.5, prefer use the methodgetDbName(ObjectModelElement)static StringgetDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelElement element) Obtain the value of theTopiaTagValues.TAG_DB_NAMEtag value on the given element.static StringgetDbSchemaNameTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_SCHEMA_NAMEtag value on the given classifier.static StringgetDefaultPackage(org.nuiton.eugene.AbstractGenerator<?> generator) Renvoie le package par défaut pour le générateur donnéstatic StringgetDoCommitTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_COMMITtag value on the given operation.static Stringstatic StringgetDOType(org.nuiton.eugene.models.object.ObjectModelElement elem, org.nuiton.eugene.models.object.ObjectModel model) static <Type extends org.nuiton.eugene.models.object.ObjectModelElement>
Collection<Type>getElementsWithStereotype(Collection<Type> elements, String... stereotypes) static List<org.nuiton.eugene.models.object.ObjectModelClass>getEntityClasses(org.nuiton.eugene.models.object.ObjectModel model, boolean sort) Obtain the list of entities classes with the possibility to sort the result.static StringgetErrorArgsTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation) Obtain the value of theTopiaTagValues.TAG_ERROR_ARGStag value on the given operation.static StringgetExceptionClassTagValue(org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_EXCEPTION_CLASStag value on the given interface.static StringgetFetchTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_FETCHtag value on the given attribute.static StringgetGenerateOperatorForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model) static StringgetGenerateStandaloneEnumForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPERtag value on the given model.getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, String... incomingFqns) Obtain the list of fqn of object involed in the given class.protected static voidgetImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, Set<String> fqns) Obtain the list of fqn of object involed in the given class.getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, String... incomingFqns) Obtain the list of fqn of object involed in the given interface.protected static voidgetImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, Set<String> fqns) Obtain the list of fqn of object involed in the given interface.protected static voidgetImports(org.nuiton.eugene.models.object.ObjectModelOperation operation, Set<String> fqns) Obtain the fqn's list of all involed type in a givne operation.static StringgetIndexForeignKeys(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Obtains the value of the tag valueTopiaTagValues.TAG_INDEX_FOREIGN_KEYSon the model or on the given attribute.static StringgetInverseTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_INVERSEtag value on the given attribute.static StringgetLazyTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_LAZYtag value on the given attribute.static StringgetLengthTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_LENGTHtag value on the given attribute.static StringgetManyToManyTableName(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le nom unique de table pour une relation ManyToMany en fonction de l'attributattr.static StringgetManytoManyTableNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_MANY_TO_MANY_TABLE_NAMEtag value on the given attribute.static Set<org.nuiton.eugene.models.object.ObjectModelAttribute>getNaturalIdAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz) Cherche et renvoie la liste des attributs constituant la clef metier d'une classe.static StringgetNaturalIdMutableTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_NATURAL_ID_MUTABLEtag value on the given classifier.static StringgetNaturalIdTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_NATURAL_IDtag value on the given attribute.static StringgetNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'interface à utiliser en fonction de l'attributstatic StringgetNMultiplicityInterfaceType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'interface à utiliser en fonction de l'attributstatic StringgetNMultiplicityObjectType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'objet (instance) à utiliser en fonction de l'attributstatic StringgetNoLogInServiceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5.4, no more use will be remove soon.static StringgetNotGenerateToStringTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier clazz, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_NOT_GENERATE_TO_STRINGtag value on the given class.static Set<org.nuiton.eugene.models.object.ObjectModelAttribute>getNotNullAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz) Cherche et renvoie la liste des attributs qui ne doivent pas etre null dans une classe.static StringgetNotNullTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_NOT_NULLtag value on the given attribute.static StringgetOrderByTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ORDER_BYtag value on the given attribute.static StringgetPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Renvoie le type de persistence pour le classifier donné.static StringgetPersistenceType(org.nuiton.eugene.models.object.ObjectModelElement element) Deprecated.since 2.5, prefer use the methodgetPersistenceType(ObjectModelClassifier)static StringgetPersistenceTypeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_PERSISTENCE_TYPEtag value on the given classifier.static StringgetPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean includeName) static StringgetProxyInterfaceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_PROXY_INTERFACEtag value on the given classifier.static StringgetReverseDbName(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Obtain the reverse db name of an attribute.static StringgetReverseDBName(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Deprecated.since 2.5, prefer use the methodegetReverseDbName(ObjectModelAttribute)static StringgetReverseDbNameOnReverseAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Obtain the reverse db name of a reverse attribute.static StringgetReverseDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute element) Obtain the value of theTopiaTagValues.TAG_REVERSE_DB_NAMEtag value on the given element.static StringgetSchemaName(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5, prefer use the methodgetDbSchemaNameTagValue(ObjectModelClassifier, ObjectModel)static StringgetSecurityCreateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_CREATEtag value on the given classifier.static StringgetSecurityDeleteTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_DELETEtag value on the given classifier.static StringgetSecurityLoadTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_LOADtag value on the given classifier.static StringgetSecurityUpdateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_UPDATEtag value on the given classifier.static StringgetSortAttributeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_SORT_ATTRIBUTEtag value on the given classifier.static StringgetSqlTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_SQL_TYPEtag value on the given attribute.static StringgetTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_TRANSACTIONtag value on the given classifier.static StringgetTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation) Obtain the value of theTopiaTagValues.TAG_TRANSACTIONtag value on the given operation.static StringgetTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_TYPEtag value on the given attribute.static booleanhasArrayStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Deprecated.since 2.5 , only BeanTransformer use it and it is a deprecated transformer, will be remove in version 3.0static booleanhasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_DAOstereotype.static booleanhasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelOperation operation) Check if the given operation has theTopiaStereoTypes.STEREOTYPE_DAOstereotype.static booleanhasDtoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_DTOstereotype.static booleanhasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_ENTITYstereotype.static booleanhasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_ENTITYstereotype.static booleanhasFacadeStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_FACADEstereotype.static booleanhasIndexedCollectionStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_INDEXED_COLLECTIONstereotype.static booleanhasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz) Indique si la classe specifiee n'a aucune ou que des methodes abstraitesstatic booleanhasPrimaryKeyStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_PRIMARYKAYstereotype.static booleanhasServiceStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_SERVICEstereotype.static booleanhasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element, String... stereotypes) static booleanhasUnidirectionalRelationOnAbstractType(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model) Cette méthode permet de détecter si - l'attribut représente une relation 1-n - cette relation est unidirectionnelle - le type de l'attribut représente un entité - cette entité a des sous-classes dans le modèle Ce cas correspond à une incompatibilité d'Hibernate qui nous oblige a adopter un comportement particulier.static booleanhasUniqueStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_UNIQUEstereotype.static booleanhasUseEnumerationNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model) static booleanisAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static booleanisBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static booleanisClassWithSecurity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Tests if the given classifier own at least one security tag value.static booleanisCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) static booleanisContextable(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Retourne true si le tagValueTopiaTagValues.TAG_CONTEXTABLEà la valeurtrue.static booleanisDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static booleanisDoNotGenerateReadListeners(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERStag value on the given model or classifier.static booleanisEntity(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Check if the given attribute type is an entity.static booleanisEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_ENTITYand is not an enumerationstatic booleanisGenerateForeignKeyNames(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERStag value on the given model or classifier and returnstrueif the tag value was found and valuetrue.static booleanisImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations, String importName) static booleanisNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Detecte si un attribut fait partie d'une clef metier.static booleanisNaturalIdMutable(org.nuiton.eugene.models.object.ObjectModelClass clazz) Detecte si la clef metier d'une classe est mutable ou pas.static booleanisNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Detecte si un attribut est marqué comme non null.static booleanisNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static booleanisPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static booleanisSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) static booleanisTextType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) static Map<org.nuiton.eugene.models.object.ObjectModelClass,Set<org.nuiton.eugene.models.object.ObjectModelClass>> searchDirectUsages(org.nuiton.eugene.models.object.ObjectModel model) static voidsearchDirectUsages(org.nuiton.eugene.models.object.ObjectModelClass klass, Map<String, org.nuiton.eugene.models.object.ObjectModelClass> allEntitiesByFQN, Map<org.nuiton.eugene.models.object.ObjectModelClass, Set<org.nuiton.eugene.models.object.ObjectModelClass>> usages) static booleanshouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz) Indique si la classe specifiee devrait etre abstraitestatic booleanshouldGenerateDTOTopiaIdTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Search if the TagValueTopiaTagValues.TAG_GENERATE_TOPIA_ID_IN_DTOhas been activated in the model.static booleanshouldGenerateOperatorForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model) Cherche si le tagvalueTopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPERa été activé dans le model.static booleanshouldGenerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model) Cherche si le tagvalueTopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPERa été activé dans le model.static booleanshouldGnerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5, prefer use the methodshouldGenerateStandaloneEnumForDAOHelper(ObjectModel)static booleansortAttribute(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Cherche et renvoie la liste des attributs constituant la clef metier d'une classe.Methods inherited from class org.nuiton.eugene.java.JavaGeneratorUtil
capitalizeJavaBeanPropertyName, cloneOperations, containsGenerics, getAttributeImplementationType, getAttributeImplementationType, getAttributeInterfaceType, getAttributeInterfaceType, getAttributeInterfaceType, getClassAttributesListDeclaration, getCollectionInstanceType, getCollectionType, getOperationParametersListDeclaration, isOrdered, joinGeneric, splitFqnList, splitGenericMethods inherited from class org.nuiton.eugene.GeneratorUtil
computeSerialVersionUID, convertConstantNameToVariableName, convertVariableNameToConstantName, findTagValue, generateSerialVersionUID, getAssocAttrName, getCastValue, getClassifiers, getClassNameFromQualifiedName, getFilenameFromQualifiedName, getFormatingExpression, getHashCodeExpression, getInitValue, getInitValue, getOperationParametersListName, getParentPackageName, getParsingExpression, getPrimitiveWrapType, getSimpleName, getSimpleName, getTypesList, hasDocumentation, hasStereotype, isBooleanPrimitive, isBooleanPrimitive, isComposition, isFirstAttribute, isNMultiplicity, isNMultiplicity, isOneMultiplicity, isPrimitiveAttributeType, isPrimitiveType, notEmpty, removeAnyGenericDefinition, removeGenericDefinition, splitGenericDefinition, toLowerCaseFirstLetter
-
Field Details
-
DEPENDENCIES_DAO
dependency to add extra operations for entity dao.- Since:
- 2.3.4
- See Also:
-
PERSISTENCE_TYPE_HIBERNATE
Type de persistence Hibernate- See Also:
-
PERSISTENCE_TYPE_LDAP
Type de persistence LDAP- See Also:
-
PERSISTENCE_TYPE_DEFAULT
Type de persistence par défaut (si aucun précisé)- See Also:
-
PROPERTY_DEFAULT_PACKAGE
Propriété des générateurs indiquant le package par défaut- See Also:
-
DEFAULT_PACKAGE
Le package par défaut si aucun n'est spécifié- See Also:
-
OBJECT_MODEL_CLASS_COMPARATOR
public static final Comparator<org.nuiton.eugene.models.object.ObjectModelClass> OBJECT_MODEL_CLASS_COMPARATOR
-
-
Constructor Details
-
TopiaGeneratorUtil
public TopiaGeneratorUtil()
-
-
Method Details
-
getDefaultPackage
Renvoie le package par défaut pour le générateur donné- Parameters:
generator- le générateur donné- Returns:
- le package par défaut du générator donné
-
getDAOInterface
public static org.nuiton.eugene.models.object.ObjectModelInterface getDAOInterface(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Renvoie l'interface DAO associée à la classe passée en paramètre- Parameters:
clazz- la classe à testermodel- le modele utilisé- Returns:
- l'interface trouvée ou null sinon
-
getPersistenceType
@Deprecated public static String getPersistenceType(org.nuiton.eugene.models.object.ObjectModelElement element) Deprecated.since 2.5, prefer use the methodgetPersistenceType(ObjectModelClassifier)Renvoie le type de persistence pour l'élément donné. Si aucun n'est trouvé, le type par défaut est utilisé- Parameters:
element- l'élément à tester- Returns:
- le type de persitence pour l'élément donné.
-
getPersistenceType
public static String getPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Renvoie le type de persistence pour le classifier donné. Si aucun n'est trouvé, le type par défaut est utilisé- Parameters:
classifier- l'élément à tester- Returns:
- le type de persitence pour l'élément donné.
- Since:
- 2.5
-
getReverseDBName
@Deprecated public static String getReverseDBName(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Deprecated.since 2.5, prefer use the methodegetReverseDbName(ObjectModelAttribute)- Parameters:
attr- the attribute to inspece- Returns:
- the name of the name in db of the reverse attribute
-
getReverseDbName
Obtain the reverse db name of an attribute. Try first to get the reverse db Name from the ReverseDbname tag-vlaue, then If attribute has a specific reverse attribute, use his db name, otherwise suffix the db name of the attribute by_id.- Parameters:
attr- the attribute to seek- Returns:
- the value of the reverse name
- Since:
- 2.5
-
getReverseDbNameOnReverseAttribute
public static String getReverseDbNameOnReverseAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Obtain the reverse db name of a reverse attribute. Note that the reverse attribute can't be null here.- Try first to get the reverse db Name from the ReverseDbname tag-value
- If not found, try then the ReverseDbname tag-value on the same attribute but from this other side of the relation
- If not found, try then just get the name of the reverse attribute
- Parameters:
attr- the attribute to seek- Returns:
- the value of the reverse db name on the revser attribute
- Since:
- 2.9.5.2
-
getDBName
@Deprecated public static String getDBName(org.nuiton.eugene.models.object.ObjectModelElement element) Deprecated.since 2.5, prefer use the methodgetDbName(ObjectModelElement)Renvoie le nom BD de l'élement passé en paramètre. Elle se base sur le tag associé si il existe, sinon sur le nom de l'élément- Parameters:
element- l'élément à tester- Returns:
- le nom de table
-
getDbName
Renvoie le nom BD de l'élement passé en paramètre. Elle se base sur le tag associé si il existe, sinon sur le nom de l'élément- Parameters:
element- l'élément à tester- Returns:
- le nom de table
-
getSchemaName
@Deprecated public static String getSchemaName(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5, prefer use the methodgetDbSchemaNameTagValue(ObjectModelClassifier, ObjectModel)Cherche et renvoie le schema a utiliser sur cet element, sinon sur le model.- Parameters:
element- l'élément à testermodel- le modele utilisé- Returns:
- le nom du schema ou null
-
shouldGenerateOperatorForDAOHelper
public static boolean shouldGenerateOperatorForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model) Cherche si le tagvalueTopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPERa été activé dans le model.- Parameters:
model- le modele utilisé- Returns:
truesi le tag value trouvé dans le modèle,falsesinon.- Since:
- 2.5
-
shouldGnerateStandaloneEnumForDAOHelper
@Deprecated public static boolean shouldGnerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5, prefer use the methodshouldGenerateStandaloneEnumForDAOHelper(ObjectModel)Cherche si le tagvalueTopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPERa été activé dans le model.- Parameters:
element- l'élément à testermodel- le modele utilisé- Returns:
truesi le tag value trouvé dans le modèle,falsesinon.- Since:
- 2.4.1
-
shouldGenerateStandaloneEnumForDAOHelper
public static boolean shouldGenerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model) Cherche si le tagvalueTopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPERa été activé dans le model.- Parameters:
model- le modele utilisé- Returns:
truesi le tag value trouvé dans le modèle,falsesinon.- Since:
- 2.5
-
getNaturalIdAttributes
public static Set<org.nuiton.eugene.models.object.ObjectModelAttribute> getNaturalIdAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz) Cherche et renvoie la liste des attributs constituant la clef metier d'une classe.- Parameters:
clazz- la classe à tester- Returns:
- la liste des attributs de la clef métier
-
getNotNullAttributes
public static Set<org.nuiton.eugene.models.object.ObjectModelAttribute> getNotNullAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz) Cherche et renvoie la liste des attributs qui ne doivent pas etre null dans une classe.- Parameters:
clazz- la classe à tester- Returns:
- la liste des attributs qui ne doivent pas etre null
-
generateToString
public static boolean generateToString(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Test if we need to generatetoStringmethod for the given class.- Parameters:
clazz- class to testmodel- model- Returns:
trueiftoStringshould be generated. clef métier.
-
sortAttribute
public static boolean sortAttribute(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model) Cherche et renvoie la liste des attributs constituant la clef metier d'une classe.- Parameters:
clazz- la classe à testermodel- le modele- Returns:
- la liste des attributs de la clef métier ou null si pas de clef métier.
-
isNaturalId
public static boolean isNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Detecte si un attribut fait partie d'une clef metier.- Parameters:
attribute- l'attribut à tester- Returns:
truesi l'attribut fait partie d'une clef metier,falsesinon.
-
isNotNull
public static boolean isNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Detecte si un attribut est marqué comme non null. Les naturalIdisNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute)sont not null par défaut- Parameters:
attribute- l'attribut à tester- Returns:
truesi l'attribut doit être non null, par défaut pour les naturalId,falsesinon..- Since:
- 2.6.9
-
getCopyright
Deprecated.since 2.5 never use anywhereCherches et renvoie le copyright a utiliser sur le model.- Parameters:
model- le modele utilisé- Returns:
- le texte du copyright ou null$
-
getElementsWithStereotype
public static <Type extends org.nuiton.eugene.models.object.ObjectModelElement> Collection<Type> getElementsWithStereotype(Collection<Type> elements, String... stereotypes) -
hasStereotypes
public static boolean hasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element, String... stereotypes) -
getPrimaryKeyAttributesListDeclaration
public static String getPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean includeName) -
isAssociationClassDoublon
public static boolean isAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
getDOType
public static String getDOType(org.nuiton.eugene.models.object.ObjectModelElement elem, org.nuiton.eugene.models.object.ObjectModel model) -
getDOType
-
isNumericType
public static boolean isNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
isTextType
public static boolean isTextType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
isDateType
public static boolean isDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
isBooleanType
public static boolean isBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
isPrimitiveType
public static boolean isPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) -
hasNothingOrAbstractMethods
public static boolean hasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz) Indique si la classe specifiee n'a aucune ou que des methodes abstraites- Parameters:
clazz- l'instance de ObjectModelClass- Returns:
- true si la classe n'a que des operations abstraite ou aucune operation
-
shouldBeAbstract
public static boolean shouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz) Indique si la classe specifiee devrait etre abstraite- Parameters:
clazz- l'instance de ObjectModelClass- Returns:
- true dans ce cas, false sinon
-
hasUnidirectionalRelationOnAbstractType
public static boolean hasUnidirectionalRelationOnAbstractType(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model) Cette méthode permet de détecter si - l'attribut représente une relation 1-n - cette relation est unidirectionnelle - le type de l'attribut représente un entité - cette entité a des sous-classes dans le modèle Ce cas correspond à une incompatibilité d'Hibernate qui nous oblige a adopter un comportement particulier.
- Parameters:
attr- l'attribut a testermodel- le model- Returns:
- true si et seulement si il s'agit bien de ce type de relation
-
getManyToManyTableName
public static String getManyToManyTableName(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le nom unique de table pour une relation ManyToMany en fonction de l'attributattr.- Parameters:
attr- l'attribut servant de base au calcul du nom- Returns:
- le nom de la table
-
getNMultiplicityInterfaceType
public static String getNMultiplicityInterfaceType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'interface à utiliser en fonction de l'attribut- Parameters:
attr- l'attribut a traiter- Returns:
- String
-
getNMultiplicityObjectType
public static String getNMultiplicityObjectType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'objet (instance) à utiliser en fonction de l'attribut- Parameters:
attr- l'attribut a traiter- Returns:
- String
-
getNMultiplicityHibernateType
public static String getNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) Renvoie le type d'interface à utiliser en fonction de l'attribut- Parameters:
attr- l'attribut a traiter- Returns:
- String
-
getEntityClasses
public static List<org.nuiton.eugene.models.object.ObjectModelClass> getEntityClasses(org.nuiton.eugene.models.object.ObjectModel model, boolean sort) Obtain the list of entities classes with the possibility to sort the result.- Parameters:
model- the current model to scansort- flag to allow sort the result- Returns:
- the list of filtred classes by their stereotype
-
getClassesByStereotype
public static List<org.nuiton.eugene.models.object.ObjectModelClass> getClassesByStereotype(String stereotype, org.nuiton.eugene.models.object.ObjectModel model, boolean sort) Obtain the list of classes for a given stereotype with the possibility to sort the result.- Parameters:
stereotype- filter stereotypemodel- the current model to scansort- flag to allow sort the result- Returns:
- the list of filtred classes by their stereotype
-
isNaturalIdMutable
public static boolean isNaturalIdMutable(org.nuiton.eugene.models.object.ObjectModelClass clazz) Detecte si la clef metier d'une classe est mutable ou pas. On respecte la valeur par defaut d'hibernate, à savoir que par default une clef metier est non mutable.- Parameters:
clazz- la classe a tester- Returns:
truesi le tag value a ete positionne sur la classe via le tagTopiaTagValues.TAG_NATURAL_ID_MUTABLE,falsesinon.
-
isContextable
public static boolean isContextable(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Retourne true si le tagValueTopiaTagValues.TAG_CONTEXTABLEà la valeurtrue.- Parameters:
classifier- classifier to test- Returns:
truesiTopiaTagValues.TAG_CONTEXTABLE==true
-
getImports
public static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, String... incomingFqns) Obtain the list of fqn of object involed in the given class.- Parameters:
aClass- the clazz to inspectincomingFqns- incoming fqns- Returns:
- the list of fqn of attributes
-
getImports
public static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, String... incomingFqns) Obtain the list of fqn of object involed in the given interface.- Parameters:
anInterface- the interface to inspectincomingFqns- incoming fqns- Returns:
- the list of fqn of attributes
-
getImports
protected static void getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, Set<String> fqns) Obtain the list of fqn of object involed in the given class.- Parameters:
aClass- the class to inspectfqns- where to store found fqns
-
getImports
protected static void getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, Set<String> fqns) Obtain the list of fqn of object involed in the given interface.- Parameters:
anInterface- the interface to inspectfqns- where to store found fqns
-
getImports
protected static void getImports(org.nuiton.eugene.models.object.ObjectModelOperation operation, Set<String> fqns) Obtain the fqn's list of all involed type in a givne operation.- Parameters:
operation- operation to inspectfqns- where to store found fqns
-
cleanImports
Clean a set of fqns, transform it into aListand sort it.- Parameters:
packageName- the current package namefqns- the dirty set of fqns- Returns:
- the sorted cleaned list of fqns.
-
getDAOImplementation
Obtain the class to use as abstract dao. It will look after a tag valueTopiaTagValues.TAG_DAO_IMPLEMENTATIONin model and if not found will use the default value which isTopiaDAOImpl.- Parameters:
model- the model which could contains- Returns:
- the type of the abstract dao to use
- Since:
- 2.5
-
searchDirectUsages
-
searchDirectUsages
-
isImportNeeded
public static boolean isImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations, String importName) -
isCollectionNeeded
public static boolean isCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) -
isSetNeeded
public static boolean isSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) -
hasFacadeStereotype
public static boolean hasFacadeStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_FACADEstereotype.- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasEntityStereotype
public static boolean hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_ENTITYstereotype.- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found,falseotherwise- Since:
- 2.5
- See Also:
-
isEntity
public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Check if the given attribute type is an entity.- Parameters:
attribute- attribute to testmodel- model containing the attribute- Returns:
trueif type of attribute is an entity,falseotherwise- Since:
- 2.7
- See Also:
-
isEntity
public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_ENTITYand is not an enumeration- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found and classifier is not enumeration,falseotherwise- Since:
- 2.5
- See Also:
-
hasEntityStereotype
public static boolean hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_ENTITYstereotype.- Parameters:
attribute- attribute to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasDtoStereotype
public static boolean hasDtoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_DTOstereotype.- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasServiceStereotype
public static boolean hasServiceStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_SERVICEstereotype.- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasDaoStereotype
public static boolean hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Check if the given classifier has theTopiaStereoTypes.STEREOTYPE_DAOstereotype.- Parameters:
classifier- classifier to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasDaoStereotype
public static boolean hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelOperation operation) Check if the given operation has theTopiaStereoTypes.STEREOTYPE_DAOstereotype.- Parameters:
operation- operation to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasUniqueStereotype
public static boolean hasUniqueStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_UNIQUEstereotype.- Parameters:
attribute- attribute to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasPrimaryKeyStereotype
public static boolean hasPrimaryKeyStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_PRIMARYKAYstereotype.- Parameters:
attribute- attribute to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasArrayStereotype
@Deprecated public static boolean hasArrayStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Deprecated.since 2.5 , only BeanTransformer use it and it is a deprecated transformer, will be remove in version 3.0Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_ARRAYstereotype.- Parameters:
attribute- attribute to test- Returns:
trueif stereotype was found,false otherwise- Since:
- 2.5
- See Also:
-
hasIndexedCollectionStereotype
public static boolean hasIndexedCollectionStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Check if the given attribute has theTopiaStereoTypes.STEREOTYPE_INDEXED_COLLECTIONstereotype.- Parameters:
attribute- attribute to test- Returns:
trueif stereotype was found,falseotherwise- Since:
- 2.10
- See Also:
-
getPersistenceTypeTagValue
public static String getPersistenceTypeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_PERSISTENCE_TYPEtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getDbNameTagValue
Obtain the value of theTopiaTagValues.TAG_DB_NAMEtag value on the given element. Note that it won't and search on declaring element or anywhere else than on the given element. See https://forge.nuiton.org/issues/2342- Parameters:
element- element to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getReverseDbNameTagValue
public static String getReverseDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute element) Obtain the value of theTopiaTagValues.TAG_REVERSE_DB_NAMEtag value on the given element. Note that it won't and search on declaring element or anywhere else than on the given element. See https://forge.nuiton.org/issues/2342- Parameters:
element- element to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getManytoManyTableNameTagValue
public static String getManytoManyTableNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_MANY_TO_MANY_TABLE_NAMEtag value on the given attribute. Note that it won't and search on declaring element or anywhere else than on the given element. See https://forge.nuiton.org/issues/2342- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.9.2
- See Also:
-
getDbSchemaNameTagValue
public static String getDbSchemaNameTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_SCHEMA_NAMEtag value on the given classifier.- Parameters:
classifier- classifier to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getLengthTagValue
public static String getLengthTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_LENGTHtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getAnnotationTagValue
public static String getAnnotationTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ANNOTATIONtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getAccessTagValue
public static String getAccessTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ACCESStag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getNaturalIdTagValue
public static String getNaturalIdTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_NATURAL_IDtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getNaturalIdMutableTagValue
public static String getNaturalIdMutableTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_NATURAL_ID_MUTABLEtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getInverseTagValue
public static String getInverseTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_INVERSEtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getLazyTagValue
public static String getLazyTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_LAZYtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getFetchTagValue
public static String getFetchTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_FETCHtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getOrderByTagValue
public static String getOrderByTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_ORDER_BYtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getNotNullTagValue
public static String getNotNullTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_NOT_NULLtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getProxyInterfaceTagValue
public static String getProxyInterfaceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_PROXY_INTERFACEtag value on the given classifier.- Parameters:
classifier- classifier to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
isClassWithSecurity
public static boolean isClassWithSecurity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Tests if the given classifier own at least one security tag value.- Parameters:
classifier- the classifier to test- Returns:
trueif there is at least one security tag value on the given class- Since:
- 2.5
-
getSecurityCreateTagValue
public static String getSecurityCreateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_CREATEtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getSecurityDeleteTagValue
public static String getSecurityDeleteTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_DELETEtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getSecurityLoadTagValue
public static String getSecurityLoadTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_LOADtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getSecurityUpdateTagValue
public static String getSecurityUpdateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_SECURITY_UPDATEtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getNotGenerateToStringTagValue
public static String getNotGenerateToStringTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier clazz, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_NOT_GENERATE_TO_STRINGtag value on the given class.- Parameters:
clazz- class to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getSortAttributeTagValue
public static String getSortAttributeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_SORT_ATTRIBUTEtag value on the given classifier.- Parameters:
classifier- classifier to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getGenerateStandaloneEnumForDAOHelperTagValue
public static String getGenerateStandaloneEnumForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPERtag value on the given model.- Parameters:
model- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getGenerateOperatorForDAOHelperTagValue
public static String getGenerateOperatorForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model) -
getTypeTagValue
public static String getTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_TYPEtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getSqlTypeTagValue
public static String getSqlTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute) Obtain the value of theTopiaTagValues.TAG_SQL_TYPEtag value on the given attribute.- Parameters:
attribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getExceptionClassTagValue
Obtain the value of theTopiaTagValues.TAG_EXCEPTION_CLASStag value on the given interface.- Parameters:
model- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getTransactionTagValue
public static String getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation) Obtain the value of theTopiaTagValues.TAG_TRANSACTIONtag value on the given operation.- Parameters:
operation- operation to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getTransactionTagValue
public static String getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier) Obtain the value of theTopiaTagValues.TAG_TRANSACTIONtag value on the given classifier.- Parameters:
classifier- classifier to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getDoCommitTagValue
public static String getDoCommitTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_COMMITtag value on the given operation.- Parameters:
operation- operation to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getErrorArgsTagValue
public static String getErrorArgsTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation) Obtain the value of theTopiaTagValues.TAG_ERROR_ARGStag value on the given operation.- Parameters:
operation- operation to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getNoLogInServiceTagValue
@Deprecated public static String getNoLogInServiceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Deprecated.since 2.5.4, no more use will be remove soon.Obtain the value of theTopiaTagValues.TAG_NO_LOG_IN_SERVICEtag value on the given classifier.- Parameters:
classifier- classifier to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getDaoImplementationTagValue
public static String getDaoImplementationTagValue(org.nuiton.eugene.models.object.ObjectModel model) Obtains the value of theTopiaTagValues.TAG_DAO_IMPLEMENTATIONtag value on the given model.- Parameters:
model- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.5
- See Also:
-
getIndexForeignKeys
public static String getIndexForeignKeys(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Obtains the value of the tag valueTopiaTagValues.TAG_INDEX_FOREIGN_KEYSon the model or on the given attribute.- Parameters:
attribute- attribute to testmodel- model to test- Returns:
- none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.6.5
- See Also:
-
hasUseEnumerationNameTagValue
public static boolean hasUseEnumerationNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model) -
shouldGenerateDTOTopiaIdTagValue
public static boolean shouldGenerateDTOTopiaIdTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Search if the TagValueTopiaTagValues.TAG_GENERATE_TOPIA_ID_IN_DTOhas been activated in the model.- Parameters:
classifier- classifier to seekmodel- model to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.6.7
- See Also:
-
isDoNotGenerateReadListeners
public static boolean isDoNotGenerateReadListeners(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERStag value on the given model or classifier. It will first look on the model, and then in the given classifier.- Parameters:
model- model to seekattribute- attribute to seek- Returns:
- the none empty value of the found tag value or
nullif not found nor empty. - Since:
- 2.9
- See Also:
-
isGenerateForeignKeyNames
public static boolean isGenerateForeignKeyNames(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model) Obtain the value of theTopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERStag value on the given model or classifier and returnstrueif the tag value was found and valuetrue. It will first look on the model, and then in the given classifier.- Parameters:
model- model to seekclassifier- classifier to seek- Returns:
trueif tag value was found on classifier or model and his value istrue, otherwisefalse.- Since:
- 2.10
- See Also:
-