public class TopiaGeneratorUtil
extends org.nuiton.eugene.java.JavaGeneratorUtil
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_PACKAGE
Le package par défaut si aucun n'est spécifié
|
static String |
DEPENDENCIES_DAO
dependency to add extra operations for entity dao.
|
static Comparator<org.nuiton.eugene.models.object.ObjectModelClass> |
OBJECT_MODEL_CLASS_COMPARATOR |
static String |
PERSISTENCE_TYPE_DEFAULT
Type de persistence par défaut (si aucun précisé)
|
static String |
PERSISTENCE_TYPE_HIBERNATE
Type de persistence Hibernate
|
static String |
PERSISTENCE_TYPE_LDAP
Type de persistence LDAP
|
static String |
PROPERTY_DEFAULT_PACKAGE
Propriété des générateurs indiquant le package par défaut
|
Constructor and Description |
---|
TopiaGeneratorUtil() |
Modifier and Type | Method and Description |
---|---|
protected static List<String> |
cleanImports(String packageName,
Set<String> fqns)
Clean a set of fqns, transform it into a
List and sort it. |
static boolean |
generateToString(org.nuiton.eugene.models.object.ObjectModelClass clazz,
org.nuiton.eugene.models.object.ObjectModel model)
Test if we need to generate
toString method for the given class. |
static String |
getAccessTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_ACCESS
tag value on the given attribute. |
static String |
getAnnotationTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_ANNOTATION
tag 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 String |
getCopyright(org.nuiton.eugene.models.Model model)
Deprecated.
since 2.5 never use anywhere
|
static Class<?> |
getDAOImplementation(org.nuiton.eugene.models.object.ObjectModel model)
Obtain the class to use as abstract dao.
|
static String |
getDaoImplementationTagValue(org.nuiton.eugene.models.object.ObjectModel model)
Obtains the value of the
TopiaTagValues.TAG_DAO_IMPLEMENTATION
tag value on the given model. |
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
|
static String |
getDbName(org.nuiton.eugene.models.object.ObjectModelElement element)
Renvoie le nom BD de l'élement passé en paramètre.
|
static String |
getDBName(org.nuiton.eugene.models.object.ObjectModelElement element)
Deprecated.
since 2.5, prefer use the method
getDbName(ObjectModelElement) |
static String |
getDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelElement element)
Obtain the value of the
TopiaTagValues.TAG_DB_NAME
tag value on the given element. |
static String |
getDbSchemaNameTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_SCHEMA_NAME
tag value on the given classifier. |
static String |
getDefaultPackage(org.nuiton.eugene.AbstractGenerator<?> generator)
Renvoie le package par défaut pour le générateur donné
|
static String |
getDoCommitTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_DO_COMMIT
tag value on the given operation. |
static String |
getDOType(org.nuiton.eugene.models.object.ObjectModelElement elem,
org.nuiton.eugene.models.object.ObjectModel model) |
static String |
getDOType(String type,
org.nuiton.eugene.models.object.ObjectModel model) |
static <Type extends org.nuiton.eugene.models.object.ObjectModelElement> |
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 String |
getErrorArgsTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation)
Obtain the value of the
TopiaTagValues.TAG_ERROR_ARGS
tag value on the given operation. |
static String |
getExceptionClassTagValue(org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_EXCEPTION_CLASS
tag value on the given interface. |
static String |
getFetchTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_FETCH
tag value on the given attribute. |
static String |
getGenerateOperatorForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model) |
static String |
getGenerateStandaloneEnumForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPER
tag value on the given model. |
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.
|
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.
|
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.
|
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.
|
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.
|
static String |
getIndexForeignKeys(org.nuiton.eugene.models.object.ObjectModelAttribute attribute,
org.nuiton.eugene.models.object.ObjectModel model)
Obtains the value of the tag value
TopiaTagValues.TAG_INDEX_FOREIGN_KEYS on the model or on the
given attribute. |
static String |
getInverseTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_INVERSE
tag value on the given attribute. |
static String |
getLazyTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_LAZY
tag value on the given attribute. |
static String |
getLengthTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_LENGTH
tag value on the given attribute. |
static String |
getManyToManyTableName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Renvoie le nom unique de table pour une relation ManyToMany en fonction
de l'attribut
attr . |
static String |
getManytoManyTableNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_MANY_TO_MANY_TABLE_NAME
tag 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 String |
getNaturalIdMutableTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_NATURAL_ID_MUTABLE
tag value on the given classifier. |
static String |
getNaturalIdTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_NATURAL_ID
tag value on the given attribute. |
static String |
getNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Renvoie le type d'interface à utiliser en fonction de l'attribut
|
static String |
getNMultiplicityInterfaceType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Renvoie le type d'interface à utiliser en fonction de l'attribut
|
static String |
getNMultiplicityObjectType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Renvoie le type d'objet (instance) à utiliser en fonction de l'attribut
|
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.
|
static String |
getNotGenerateToStringTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier clazz,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_NOT_GENERATE_TO_STRING
tag 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 String |
getNotNullTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_NOT_NULL
tag value on the given attribute. |
static String |
getOrderByTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_ORDER_BY
tag value on the given attribute. |
static String |
getPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Renvoie le type de persistence pour le classifier donné.
|
static String |
getPersistenceType(org.nuiton.eugene.models.object.ObjectModelElement element)
Deprecated.
since 2.5, prefer use the method
getPersistenceType(ObjectModelClassifier) |
static String |
getPersistenceTypeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_PERSISTENCE_TYPE
tag value on the given classifier. |
static String |
getPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz,
boolean includeName) |
static String |
getProxyInterfaceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_PROXY_INTERFACE
tag value on the given classifier. |
static String |
getReverseDbName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Obtain the reverse db name of an attribute.
|
static String |
getReverseDBName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Deprecated.
since 2.5, prefer use the methode
getReverseDbName(ObjectModelAttribute) |
static String |
getReverseDbNameOnReverseAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
Obtain the reverse db name of a reverse attribute.
|
static String |
getReverseDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute element)
Obtain the value of the
TopiaTagValues.TAG_REVERSE_DB_NAME
tag value on the given element. |
static String |
getSchemaName(org.nuiton.eugene.models.object.ObjectModelElement element,
org.nuiton.eugene.models.object.ObjectModel model)
Deprecated.
since 2.5, prefer use the method
getDbSchemaNameTagValue(ObjectModelClassifier, ObjectModel) |
static String |
getSecurityCreateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_SECURITY_CREATE
tag value on the given classifier. |
static String |
getSecurityDeleteTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_SECURITY_DELETE
tag value on the given classifier. |
static String |
getSecurityLoadTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_SECURITY_LOAD
tag value on the given classifier. |
static String |
getSecurityUpdateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_SECURITY_UPDATE
tag value on the given classifier. |
static String |
getSortAttributeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_SORT_ATTRIBUTE
tag value on the given classifier. |
static String |
getSqlTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_SQL_TYPE
tag value on the given attribute. |
static String |
getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Obtain the value of the
TopiaTagValues.TAG_TRANSACTION
tag value on the given classifier. |
static String |
getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation)
Obtain the value of the
TopiaTagValues.TAG_TRANSACTION
tag value on the given operation. |
static String |
getTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Obtain the value of the
TopiaTagValues.TAG_TYPE
tag value on the given attribute. |
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.0
|
static boolean |
hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_DAO stereotype. |
static boolean |
hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelOperation operation)
Check if the given operation has the
TopiaStereoTypes.STEREOTYPE_DAO stereotype. |
static boolean |
hasDtoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_DTO stereotype. |
static boolean |
hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Check if the given attribute has the
TopiaStereoTypes.STEREOTYPE_ENTITY stereotype. |
static boolean |
hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_ENTITY stereotype. |
static boolean |
hasFacadeStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_FACADE stereotype. |
static boolean |
hasIndexedCollectionStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Check if the given attribute has the
TopiaStereoTypes.STEREOTYPE_INDEXED_COLLECTION stereotype. |
static boolean |
hasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz)
Indique si la classe specifiee n'a aucune ou que des methodes abstraites
|
static boolean |
hasPrimaryKeyStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Check if the given attribute has the
TopiaStereoTypes.STEREOTYPE_PRIMARYKAY stereotype. |
static boolean |
hasServiceStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_SERVICE stereotype. |
static boolean |
hasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element,
String... stereotypes) |
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.
|
static boolean |
hasUniqueStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Check if the given attribute has the
TopiaStereoTypes.STEREOTYPE_UNIQUE stereotype. |
static boolean |
hasUseEnumerationNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attr,
org.nuiton.eugene.models.object.ObjectModel model) |
static boolean |
isAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr) |
static boolean |
isBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) |
static boolean |
isClassWithSecurity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Tests if the given classifier own at least one security tag value.
|
static boolean |
isCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) |
static boolean |
isContextable(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Retourne true si le tagValue
TopiaTagValues.TAG_CONTEXTABLE
à la valeur true . |
static boolean |
isDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) |
static boolean |
isDoNotGenerateReadListeners(org.nuiton.eugene.models.object.ObjectModelAttribute attribute,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERS
tag value on the given model or classifier. |
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.
|
static boolean |
isEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
Check if the given classifier has the
TopiaStereoTypes.STEREOTYPE_ENTITY and is not an enumeration |
static boolean |
isGenerateForeignKeyNames(org.nuiton.eugene.models.object.ObjectModelClassifier classifier,
org.nuiton.eugene.models.object.ObjectModel model)
Obtain the value of the
TopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERS
tag value on the given model or classifier and returns true if the tag value was found and value true . |
static boolean |
isImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations,
String importName) |
static boolean |
isNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Detecte si un attribut fait partie d'une clef metier.
|
static boolean |
isNaturalIdMutable(org.nuiton.eugene.models.object.ObjectModelClass clazz)
Detecte si la clef metier d'une classe est mutable ou pas.
|
static boolean |
isNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
Detecte si un attribut est marqué comme non null.
|
static boolean |
isNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) |
static boolean |
isPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr) |
static boolean |
isSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations) |
static boolean |
isTextType(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 void |
searchDirectUsages(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 boolean |
shouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz)
Indique si la classe specifiee devrait etre abstraite
|
static boolean |
shouldGenerateDTOTopiaIdTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier,
org.nuiton.eugene.models.object.ObjectModel model)
Search if the TagValue
TopiaTagValues.TAG_GENERATE_TOPIA_ID_IN_DTO has been
activated in the model. |
static boolean |
shouldGenerateOperatorForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model)
Cherche si le tagvalue
TopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPER a été
activé dans le model. |
static boolean |
shouldGenerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model)
Cherche si le tagvalue
TopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPER a été
activé dans le model. |
static boolean |
shouldGnerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModelElement element,
org.nuiton.eugene.models.object.ObjectModel model)
Deprecated.
since 2.5, prefer use the method
shouldGenerateStandaloneEnumForDAOHelper(ObjectModel) |
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.
|
capitalizeJavaBeanPropertyName, cloneOperations, containsGenerics, getAttributeImplementationType, getAttributeImplementationType, getAttributeInterfaceType, getAttributeInterfaceType, getAttributeInterfaceType, getClassAttributesListDeclaration, getCollectionInstanceType, getCollectionType, getOperationParametersListDeclaration, isOrdered, joinGeneric, splitFqnList, splitGeneric
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
public static final String DEPENDENCIES_DAO
public static final String PERSISTENCE_TYPE_HIBERNATE
public static final String PERSISTENCE_TYPE_LDAP
public static final String PERSISTENCE_TYPE_DEFAULT
public static final String PROPERTY_DEFAULT_PACKAGE
public static final String DEFAULT_PACKAGE
public static final Comparator<org.nuiton.eugene.models.object.ObjectModelClass> OBJECT_MODEL_CLASS_COMPARATOR
public static String getDefaultPackage(org.nuiton.eugene.AbstractGenerator<?> generator)
generator
- le générateur donnépublic static org.nuiton.eugene.models.object.ObjectModelInterface getDAOInterface(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model)
clazz
- la classe à testermodel
- le modele utilisé@Deprecated public static String getPersistenceType(org.nuiton.eugene.models.object.ObjectModelElement element)
getPersistenceType(ObjectModelClassifier)
element
- l'élément à testerpublic static String getPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
classifier
- l'élément à tester@Deprecated public static String getReverseDBName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
getReverseDbName(ObjectModelAttribute)
attr
- the attribute to inspecepublic static String getReverseDbName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
_id
.attr
- the attribute to seekpublic static String getReverseDbNameOnReverseAttribute(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
attr
- the attribute to seek@Deprecated public static String getDBName(org.nuiton.eugene.models.object.ObjectModelElement element)
getDbName(ObjectModelElement)
element
- l'élément à testerpublic static String getDbName(org.nuiton.eugene.models.object.ObjectModelElement element)
element
- l'élément à tester@Deprecated public static String getSchemaName(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model)
getDbSchemaNameTagValue(ObjectModelClassifier, ObjectModel)
element
- l'élément à testermodel
- le modele utilisépublic static boolean shouldGenerateOperatorForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPER
a été
activé dans le model.model
- le modele utilisétrue
si le tag value trouvé dans le modèle, false
sinon.@Deprecated public static boolean shouldGnerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModelElement element, org.nuiton.eugene.models.object.ObjectModel model)
shouldGenerateStandaloneEnumForDAOHelper(ObjectModel)
TopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPER
a été
activé dans le model.element
- l'élément à testermodel
- le modele utilisétrue
si le tag value trouvé dans le modèle, false
sinon.public static boolean shouldGenerateStandaloneEnumForDAOHelper(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_GENERATE_OPERATOR_FOR_DAO_HELPER
a été
activé dans le model.model
- le modele utilisétrue
si le tag value trouvé dans le modèle, false
sinon.public static Set<org.nuiton.eugene.models.object.ObjectModelAttribute> getNaturalIdAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz)
clazz
- la classe à testerpublic static Set<org.nuiton.eugene.models.object.ObjectModelAttribute> getNotNullAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz)
clazz
- la classe à testerpublic static boolean generateToString(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model)
toString
method for the given class.clazz
- class to testmodel
- modeltrue
if toString
should be generated.
clef métier.public static boolean sortAttribute(org.nuiton.eugene.models.object.ObjectModelClass clazz, org.nuiton.eugene.models.object.ObjectModel model)
clazz
- la classe à testermodel
- le modelepublic static boolean isNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
attribute
- l'attribut à testertrue
si l'attribut fait partie d'une clef metier,
false
sinon.public static boolean isNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
isNaturalId(org.nuiton.eugene.models.object.ObjectModelAttribute)
sont not null par défautattribute
- l'attribut à testertrue
si l'attribut doit être non null,
par défaut pour les naturalId, false
sinon..@Deprecated public static String getCopyright(org.nuiton.eugene.models.Model model)
model
- le modele utilisépublic static <Type extends org.nuiton.eugene.models.object.ObjectModelElement> Collection<Type> getElementsWithStereotype(Collection<Type> elements, String... stereotypes)
public static boolean hasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element, String... stereotypes)
public static String getPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean includeName)
public static boolean isAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static String getDOType(org.nuiton.eugene.models.object.ObjectModelElement elem, org.nuiton.eugene.models.object.ObjectModel model)
public static String getDOType(String type, org.nuiton.eugene.models.object.ObjectModel model)
public static boolean isNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static boolean isTextType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static boolean isDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static boolean isBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static boolean isPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
public static boolean hasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz)
clazz
- l'instance de ObjectModelClasspublic static boolean shouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz)
clazz
- l'instance de ObjectModelClasspublic 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.
attr
- l'attribut a testermodel
- le modelpublic static String getManyToManyTableName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
attr
.attr
- l'attribut servant de base au calcul du nompublic static String getNMultiplicityInterfaceType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
attr
- l'attribut a traiterpublic static String getNMultiplicityObjectType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
attr
- l'attribut a traiterpublic static String getNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
attr
- l'attribut a traiterpublic static List<org.nuiton.eugene.models.object.ObjectModelClass> getEntityClasses(org.nuiton.eugene.models.object.ObjectModel model, boolean sort)
model
- the current model to scansort
- flag to allow sort the resultpublic static List<org.nuiton.eugene.models.object.ObjectModelClass> getClassesByStereotype(String stereotype, org.nuiton.eugene.models.object.ObjectModel model, boolean sort)
stereotype
- filter stereotypemodel
- the current model to scansort
- flag to allow sort the resultpublic static boolean isNaturalIdMutable(org.nuiton.eugene.models.object.ObjectModelClass clazz)
clazz
- la classe a testertrue
si le tag value a ete positionne sur la classe
via le tag TopiaTagValues.TAG_NATURAL_ID_MUTABLE
, false
sinon.public static boolean isContextable(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_CONTEXTABLE
à la valeur true
.classifier
- classifier to testtrue
si TopiaTagValues.TAG_CONTEXTABLE
== true
public static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, String... incomingFqns)
aClass
- the clazz to inspectincomingFqns
- incoming fqnspublic static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, String... incomingFqns)
anInterface
- the interface to inspectincomingFqns
- incoming fqnsprotected static void getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, Set<String> fqns)
aClass
- the class to inspectfqns
- where to store found fqnsprotected static void getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, Set<String> fqns)
anInterface
- the interface to inspectfqns
- where to store found fqnsprotected static void getImports(org.nuiton.eugene.models.object.ObjectModelOperation operation, Set<String> fqns)
operation
- operation to inspectfqns
- where to store found fqnsprotected static List<String> cleanImports(String packageName, Set<String> fqns)
List
and sort it.packageName
- the current package namefqns
- the dirty set of fqnspublic static Class<?> getDAOImplementation(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_DAO_IMPLEMENTATION
in model
and if not found will use the default value which is TopiaDAOImpl
.model
- the model which could containspublic static Map<org.nuiton.eugene.models.object.ObjectModelClass,Set<org.nuiton.eugene.models.object.ObjectModelClass>> searchDirectUsages(org.nuiton.eugene.models.object.ObjectModel model)
public static void searchDirectUsages(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)
public static boolean isImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations, String importName)
public static boolean isCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
public static boolean isSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
public static boolean hasFacadeStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_FACADE
stereotype.classifier
- classifier to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_FACADE
public static boolean hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_ENTITY
stereotype.classifier
- classifier to testtrue
if stereotype was found, false
otherwiseTopiaStereoTypes.STEREOTYPE_ENTITY
public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model)
attribute
- attribute to testmodel
- model containing the attributetrue
if type of attribute is an entity,
false
otherwiseTopiaStereoTypes.STEREOTYPE_ENTITY
public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_ENTITY
and is not an enumerationclassifier
- classifier to testtrue
if stereotype was found and classifier is not
enumeration, false
otherwiseTopiaStereoTypes.STEREOTYPE_ENTITY
public static boolean hasEntityStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaStereoTypes.STEREOTYPE_ENTITY
stereotype.attribute
- attribute to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_ENTITY
public static boolean hasDtoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_DTO
stereotype.classifier
- classifier to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_DTO
public static boolean hasServiceStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_SERVICE
stereotype.classifier
- classifier to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_SERVICE
public static boolean hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaStereoTypes.STEREOTYPE_DAO
stereotype.classifier
- classifier to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_DAO
public static boolean hasDaoStereotype(org.nuiton.eugene.models.object.ObjectModelOperation operation)
TopiaStereoTypes.STEREOTYPE_DAO
stereotype.operation
- operation to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_DAO
public static boolean hasUniqueStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaStereoTypes.STEREOTYPE_UNIQUE
stereotype.attribute
- attribute to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_UNIQUE
public static boolean hasPrimaryKeyStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaStereoTypes.STEREOTYPE_PRIMARYKAY
stereotype.attribute
- attribute to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_PRIMARYKAY
@Deprecated public static boolean hasArrayStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaStereoTypes.STEREOTYPE_ARRAY
stereotype.attribute
- attribute to testtrue
if stereotype was found, false otherwise
TopiaStereoTypes.STEREOTYPE_ARRAY
public static boolean hasIndexedCollectionStereotype(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaStereoTypes.STEREOTYPE_INDEXED_COLLECTION
stereotype.attribute
- attribute to testtrue
if stereotype was found, false
otherwiseTopiaStereoTypes.STEREOTYPE_INDEXED_COLLECTION
public static String getPersistenceTypeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_PERSISTENCE_TYPE
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_PERSISTENCE_TYPE
public static String getDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelElement element)
TopiaTagValues.TAG_DB_NAME
tag 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/2342element
- element to seeknull
if not found nor empty.TopiaTagValues.TAG_DB_NAME
public static String getReverseDbNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute element)
TopiaTagValues.TAG_REVERSE_DB_NAME
tag 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/2342element
- element to seeknull
if not found nor empty.TopiaTagValues.TAG_REVERSE_DB_NAME
public static String getManytoManyTableNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_MANY_TO_MANY_TABLE_NAME
tag 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/2342attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_MANY_TO_MANY_TABLE_NAME
public static String getDbSchemaNameTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_SCHEMA_NAME
tag value on the given classifier.classifier
- classifier to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_SCHEMA_NAME
public static String getLengthTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_LENGTH
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_LENGTH
public static String getAnnotationTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_ANNOTATION
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_ANNOTATION
public static String getAccessTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_ACCESS
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_ACCESS
public static String getNaturalIdTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_NATURAL_ID
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_NATURAL_ID
public static String getNaturalIdMutableTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_NATURAL_ID_MUTABLE
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_NATURAL_ID_MUTABLE
public static String getInverseTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_INVERSE
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_INVERSE
public static String getLazyTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_LAZY
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_LAZY
public static String getFetchTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_FETCH
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_FETCH
public static String getOrderByTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_ORDER_BY
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_ORDER_BY
public static String getNotNullTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_NOT_NULL
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_NOT_NULL
public static String getProxyInterfaceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_PROXY_INTERFACE
tag value on the given classifier.classifier
- classifier to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_PROXY_INTERFACE
public static boolean isClassWithSecurity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
classifier
- the classifier to testtrue
if there is at least one security tag value on the given classpublic static String getSecurityCreateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_SECURITY_CREATE
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_SECURITY_CREATE
public static String getSecurityDeleteTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_SECURITY_DELETE
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_SECURITY_DELETE
public static String getSecurityLoadTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_SECURITY_LOAD
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_SECURITY_LOAD
public static String getSecurityUpdateTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_SECURITY_UPDATE
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_SECURITY_UPDATE
public static String getNotGenerateToStringTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier clazz, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_NOT_GENERATE_TO_STRING
tag value on the given class.clazz
- class to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_NOT_GENERATE_TO_STRING
public static String getSortAttributeTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_SORT_ATTRIBUTE
tag value on the given classifier.classifier
- classifier to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_SORT_ATTRIBUTE
public static String getGenerateStandaloneEnumForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPER
tag value on the given model.model
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPER
public static String getGenerateOperatorForDAOHelperTagValue(org.nuiton.eugene.models.object.ObjectModel model)
public static String getTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_TYPE
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_TYPE
public static String getSqlTypeTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
TopiaTagValues.TAG_SQL_TYPE
tag value on the given attribute.attribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_TYPE
public static String getExceptionClassTagValue(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_EXCEPTION_CLASS
tag value on the given interface.model
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_EXCEPTION_CLASS
public static String getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation)
TopiaTagValues.TAG_TRANSACTION
tag value on the given operation.operation
- operation to seeknull
if not found nor empty.TopiaTagValues.TAG_TRANSACTION
public static String getTransactionTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
TopiaTagValues.TAG_TRANSACTION
tag value on the given classifier.classifier
- classifier to seeknull
if not found nor empty.TopiaTagValues.TAG_TRANSACTION
public static String getDoCommitTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_DO_COMMIT
tag value on the given operation.operation
- operation to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_DO_COMMIT
public static String getErrorArgsTagValue(org.nuiton.eugene.models.object.ObjectModelOperation operation)
TopiaTagValues.TAG_ERROR_ARGS
tag value on the given operation.operation
- operation to seeknull
if not found nor empty.TopiaTagValues.TAG_ERROR_ARGS
@Deprecated public static String getNoLogInServiceTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_NO_LOG_IN_SERVICE
tag value on the given classifier.classifier
- classifier to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_NO_LOG_IN_SERVICE
public static String getDaoImplementationTagValue(org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_DAO_IMPLEMENTATION
tag value on the given model.model
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_DAO_IMPLEMENTATION
public static String getIndexForeignKeys(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_INDEX_FOREIGN_KEYS
on the model or on the
given attribute.attribute
- attribute to testmodel
- model to testnull
if not found nor empty.TopiaTagValues.TAG_INDEX_FOREIGN_KEYS
public static boolean hasUseEnumerationNameTagValue(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model)
public static boolean shouldGenerateDTOTopiaIdTagValue(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_GENERATE_TOPIA_ID_IN_DTO
has been
activated in the model.classifier
- classifier to seekmodel
- model to seeknull
if not found nor empty.TopiaTagValues.TAG_GENERATE_TOPIA_ID_IN_DTO
public static boolean isDoNotGenerateReadListeners(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERS
tag value on the given model or classifier.
It will first look on the model, and then in the given classifier.model
- model to seekattribute
- attribute to seeknull
if not found nor empty.TopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERS
public static boolean isGenerateForeignKeyNames(org.nuiton.eugene.models.object.ObjectModelClassifier classifier, org.nuiton.eugene.models.object.ObjectModel model)
TopiaTagValues.TAG_DO_NOT_GENERATE_READ_LISTENERS
tag value on the given model or classifier and returns true
if the tag value was found and value true
.
It will first look on the model, and then in the given classifier.model
- model to seekclassifier
- classifier to seektrue
if tag value was found on classifier or model and his value is true
, otherwise false
.TopiaTagValues.TAG_GENERATE_FOREIGN_KEY_NAMES
Copyright © 2004–2022 Code Lutin. All rights reserved.