Class TopiaGeneratorUtil

java.lang.Object
org.nuiton.eugene.GeneratorUtil
org.nuiton.eugene.java.JavaGeneratorUtil
org.nuiton.topia.templates.TopiaGeneratorUtil

@Deprecated public class TopiaGeneratorUtil extends org.nuiton.eugene.java.JavaGeneratorUtil
Deprecated.
since 3.0, prefer use TopiaTemplateHelper.
Classe regroupant divers méthodes utiles pour la génération des entités Created: 13 déc. 2005
Author:
Arnaud Thimel (Code Lutin), Tony Chemit - tchemit@codelutin.com, Florian Desbois- fdebois@codelutin.com, Éric Chatellier - chatellier@codelutin.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
    Stratégie d'heritage par defaut.
    static final String
    Deprecated.
    Le package par défaut si aucun n'est spécifié
    static final String
    Deprecated.
    dependency to add extra operations for entity dao.
    static final Comparator<org.nuiton.eugene.models.object.ObjectModelClass>
    Deprecated.
     
    static final String
    Deprecated.
    Type de persistence par défaut (si aucun précisé)
    static final String
    Deprecated.
    Type de persistence Hibernate
    static final String
    Deprecated.
    since 3.0, use nowhere in ToPIA.
    static final String
    Deprecated.
    Propriété des générateurs indiquant le package par défaut
    protected static final TopiaHibernateTagValues
    Deprecated.
     
    protected static final TopiaCoreTagValues
    Deprecated.
    Static singleton instance used to read defaultValue TODO AThimel 19/06/14 Remove this when remove deprecated methods using it

    Fields inherited from class org.nuiton.eugene.java.JavaGeneratorUtil

    DEPENDENCIES_CONSTANTS, OPERATION_GETTER_BOOLEAN_PREFIX, OPERATION_GETTER_DEFAULT_PREFIX

    Fields inherited from class org.nuiton.eugene.GeneratorUtil

    SERIAL_VERSION_UID
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected static List<String>
    cleanImports(String packageName, Set<String> fqns)
    Deprecated.
    Clean a set of fqns, transform it into a List and sort it.
    static String
    getAbstractDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getAbstractDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getApplicationContextAbstractName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getApplicationContextConcreteName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getApplicationContextInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getApplicationContextPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static List<org.nuiton.eugene.models.object.ObjectModelClass>
    getClassesByStereotype(String stereotype, org.nuiton.eugene.models.object.ObjectModel model, boolean sort)
    Deprecated.
    Obtain the list of classes for a given stereotype with the possibility to sort the result.
    static String
    getClassForPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static String
    getConcreteDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getConcreteDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getContractDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static Class<?>
    getDAOImplementation(org.nuiton.eugene.models.object.ObjectModel model)
    static String
    getDaoPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getDaoSupplierInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getDaoSupplierName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getDbName(org.nuiton.eugene.models.object.ObjectModelElement element)
    Deprecated.
    Renvoie le nom BD de l'élement passé en paramètre.
    static String
    getDefaultPackage(org.nuiton.eugene.AbstractGenerator<?> generator)
    Deprecated.
    Renvoie le package par défaut pour le générateur donné
    static String
    getDOType(String type, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getDOType(org.nuiton.eugene.models.object.ObjectModelElement elem, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static <Type extends org.nuiton.eugene.models.object.ObjectModelElement>
    Collection<Type>
    getElementsWithStereotype(Collection<Type> elements, String... stereotypes)
    Deprecated.
    since 3.0, not used anywhere in ToPIA
    static String
    getEntityAbstractName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static List<org.nuiton.eugene.models.object.ObjectModelClass>
    getEntityClasses(org.nuiton.eugene.models.object.ObjectModel model, boolean sort)
    Deprecated.
    Obtain the list of entities classes with the possibility to sort the result.
    static String
    getEntityConcreteName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getEntityEnumName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getEntityPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model, org.nuiton.eugene.models.object.ObjectModelClassifier input)
    Deprecated.
     
    static String
    getGeneratedDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static String
    getGeneratedDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
     
    static List<String>
    getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, String... incomingFqns)
    Deprecated.
    Obtain the list of fqn of object involed in the given class.
    protected static void
    getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, Set<String> fqns)
    Deprecated.
    Obtain the list of fqn of object involed in the given class.
    static List<String>
    getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, String... incomingFqns)
    Deprecated.
    since 3.0, not used anywhere in ToPIA
    protected static void
    getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, Set<String> fqns)
    Deprecated.
    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)
    Deprecated.
    Obtain the fqn's list of all involed type in a givne operation.
    static String
    getInheritanceStrategy(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
    Deprecated.
    Obtain the value of the TopiaHibernateTagValues.Store.inheritanceStrategy tag value on the given classifier.
    static String
    getLegacyDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
    Deprecated.
    static String
    getManyToManyTableName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
    Renvoie le nom unique de table pour une relation ManyToMany en fonction de l'attribut attr
    static Set<org.nuiton.eugene.models.object.ObjectModelAttribute>
    getNaturalIdAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz)
    Deprecated.
    Cherche et renvoie la liste des attributs constituant la clef metier d'une classe.
    static String
    getNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
    Renvoie le type d'interface à utiliser en fonction de l'attribut
    static Set<org.nuiton.eugene.models.object.ObjectModelAttribute>
    getNotNullAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz)
    Deprecated.
    Cherche et renvoie la liste des attributs qui ne doivent pas etre null dans une classe.
    static String
    getParentDaoFqn(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getParentDaoName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getPersistenceContextAbstractName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getPersistenceContextConcreteName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getPersistenceContextInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getPersistenceContextPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    static String
    getPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
    Deprecated.
    Renvoie le type de persistence pour le classifier donné.
    static String
    getPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean includeName)
    Deprecated.
    since 3.0, not used anywhere in ToPIA
    static String
    getReverseDbName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
    Obtain the reverse db name of an attribute.
    static boolean
    hasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz)
    Deprecated.
    since 3.0, used nowhere in ToPIA
    static boolean
    hasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element, String... stereotypes)
    Deprecated.
    since 3.0, not used anywhere in ToPIA
    static boolean
    hasUnidirectionalRelationOnAbstractType(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
    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
    isAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
    since 3.0, not used anywhere in ToPIA
    static boolean
    isAttributeNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
    Deprecated.
    Detecte si un attribut est marqué comme non null.
    static boolean
    isBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static boolean
    isCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
    Deprecated.
     
    static boolean
    isDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static boolean
    isEntity(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
    Check if the given attribute type is an entity.
    static boolean
    isEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
    Deprecated.
    Check if the given classifier has the TopiaCoreTagValues.Store.entity and is not an enumeration
    static boolean
    isImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations, String importName)
    Deprecated.
     
    static boolean
    isNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static boolean
    isPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static boolean
    isSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
    Deprecated.
     
    static boolean
    isTextType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
    Deprecated.
     
    static Map<org.nuiton.eugene.models.object.ObjectModelClass,Set<org.nuiton.eugene.models.object.ObjectModelClass>>
    searchDirectUsages(org.nuiton.eugene.models.object.ObjectModel model)
    Deprecated.
     
    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)
    Deprecated.
     
    static boolean
    shouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz)
    Deprecated.
    since 3.0, used nowhere in ToPIA

    Methods inherited from class org.nuiton.eugene.java.JavaGeneratorUtil

    capitalizeJavaBeanPropertyName, cloneOperations, containsGenerics, getAttributeImplementationType, getAttributeImplementationType, getAttributeInterfaceType, getAttributeInterfaceType, getAttributeInterfaceType, getClassAttributesListDeclaration, getCollectionInstanceType, getCollectionType, getOperationParametersListDeclaration, isOrdered, joinGeneric, splitFqnList, splitGeneric

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TOPIA_TAG_VALUES

      protected static final TopiaCoreTagValues TOPIA_TAG_VALUES
      Deprecated.
      Static singleton instance used to read defaultValue TODO AThimel 19/06/14 Remove this when remove deprecated methods using it
    • TOPIA_HIBERNATE_TAG_VALUES

      protected static final TopiaHibernateTagValues TOPIA_HIBERNATE_TAG_VALUES
      Deprecated.
    • DEPENDENCIES_DAO

      public static final String DEPENDENCIES_DAO
      Deprecated.
      dependency to add extra operations for entity dao.
      Since:
      2.3.4
      See Also:
    • PERSISTENCE_TYPE_HIBERNATE

      public static final String PERSISTENCE_TYPE_HIBERNATE
      Deprecated.
      Type de persistence Hibernate
      See Also:
    • PERSISTENCE_TYPE_LDAP

      @Deprecated public static final String PERSISTENCE_TYPE_LDAP
      Deprecated.
      since 3.0, use nowhere in ToPIA.
      Type de persistence LDAP
      See Also:
    • PERSISTENCE_TYPE_DEFAULT

      public static final String PERSISTENCE_TYPE_DEFAULT
      Deprecated.
      Type de persistence par défaut (si aucun précisé)
      See Also:
    • PROPERTY_DEFAULT_PACKAGE

      public static final String PROPERTY_DEFAULT_PACKAGE
      Deprecated.
      Propriété des générateurs indiquant le package par défaut
      See Also:
    • DEFAULT_PACKAGE

      public static final String DEFAULT_PACKAGE
      Deprecated.
      Le package par défaut si aucun n'est spécifié
      See Also:
    • DEFAULT_INHERITANCE_STRATEGY

      public static final String DEFAULT_INHERITANCE_STRATEGY
      Deprecated.
      Stratégie d'heritage par defaut.
      See Also:
    • OBJECT_MODEL_CLASS_COMPARATOR

      public static final Comparator<org.nuiton.eugene.models.object.ObjectModelClass> OBJECT_MODEL_CLASS_COMPARATOR
      Deprecated.
  • Constructor Details

    • TopiaGeneratorUtil

      public TopiaGeneratorUtil()
      Deprecated.
  • Method Details

    • getDefaultPackage

      public static String getDefaultPackage(org.nuiton.eugene.AbstractGenerator<?> generator)
      Deprecated.
      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é
    • getApplicationContextPackage

      public static String getApplicationContextPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getPersistenceContextPackage

      public static String getPersistenceContextPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getDaoPackage

      public static String getDaoPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getParentDaoName

      public static String getParentDaoName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getParentDaoFqn

      public static String getParentDaoFqn(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getApplicationContextInterfaceName

      public static String getApplicationContextInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getApplicationContextAbstractName

      public static String getApplicationContextAbstractName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getApplicationContextConcreteName

      public static String getApplicationContextConcreteName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getPersistenceContextAbstractName

      public static String getPersistenceContextAbstractName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getPersistenceContextConcreteName

      public static String getPersistenceContextConcreteName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getPersistenceContextInterfaceName

      public static String getPersistenceContextInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getDaoSupplierInterfaceName

      public static String getDaoSupplierInterfaceName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getDaoSupplierName

      public static String getDaoSupplierName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getEntityEnumName

      public static String getEntityEnumName(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getEntityAbstractName

      public static String getEntityAbstractName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getEntityConcreteName

      public static String getEntityConcreteName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getAbstractDaoName

      public static String getAbstractDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getGeneratedDaoName

      public static String getGeneratedDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getConcreteDaoName

      public static String getConcreteDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getContractDaoName

      public static String getContractDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getAbstractDaoFqn

      public static String getAbstractDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getGeneratedDaoFqn

      public static String getGeneratedDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getConcreteDaoFqn

      public static String getConcreteDaoFqn(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getEntityPackage

      public static String getEntityPackage(org.nuiton.eugene.java.ObjectModelTransformerToJava transformer, org.nuiton.eugene.models.object.ObjectModel model, org.nuiton.eugene.models.object.ObjectModelClassifier input)
      Deprecated.
    • getPersistenceType

      public static String getPersistenceType(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
      Deprecated.
      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

      public static String getReverseDbName(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
      Obtain the reverse db name of an attribute. 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
    • getDbName

      public static String getDbName(org.nuiton.eugene.models.object.ObjectModelElement element)
      Deprecated.
      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
    • getNaturalIdAttributes

      public static Set<org.nuiton.eugene.models.object.ObjectModelAttribute> getNaturalIdAttributes(org.nuiton.eugene.models.object.ObjectModelClass clazz)
      Deprecated.
      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)
      Deprecated.
      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
    • isAttributeNotNull

      public static boolean isAttributeNotNull(org.nuiton.eugene.models.object.ObjectModelAttribute attribute)
      Deprecated.
      Detecte si un attribut est marqué comme non null. Les naturalId sont not null par défaut
      Parameters:
      attribute - l'attribut à tester
      Returns:
      true si l'attribut doit être non null, par défaut pour les naturalId, false sinon..
      Since:
      2.6.9
    • getDOType

      public static String getDOType(org.nuiton.eugene.models.object.ObjectModelElement elem, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • getDOType

      public static String getDOType(String type, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • isNumericType

      public static boolean isNumericType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • isTextType

      public static boolean isTextType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • isDateType

      public static boolean isDateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • isBooleanType

      public static boolean isBooleanType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • isPrimitiveType

      public static boolean isPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • getClassForPrimitiveType

      public static String getClassForPrimitiveType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
    • hasUnidirectionalRelationOnAbstractType

      public static boolean hasUnidirectionalRelationOnAbstractType(org.nuiton.eugene.models.object.ObjectModelAttribute attr, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.

      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 tester
      model - 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)
      Deprecated.
      Renvoie le nom unique de table pour une relation ManyToMany en fonction de l'attribut attr
      Parameters:
      attr - l'attribut servant de base au calcul du nom
      Returns:
      le nom de la table
    • getNMultiplicityHibernateType

      public static String getNMultiplicityHibernateType(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
      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)
      Deprecated.
      Obtain the list of entities classes with the possibility to sort the result.
      Parameters:
      model - the current model to scan
      sort - 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)
      Deprecated.
      Obtain the list of classes for a given stereotype with the possibility to sort the result.
      Parameters:
      stereotype - filter stereotype
      model - the current model to scan
      sort - flag to allow sort the result
      Returns:
      the list of filtred classes by their stereotype
    • getImports

      public static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, String... incomingFqns)
      Deprecated.
      Obtain the list of fqn of object involed in the given class.
      Parameters:
      aClass - the clazz to inspect
      incomingFqns - incoming fqns
      Returns:
      the list of fqn of attributes
    • getImports

      protected static void getImports(org.nuiton.eugene.models.object.ObjectModelClass aClass, Set<String> fqns)
      Deprecated.
      Obtain the list of fqn of object involed in the given class.
      Parameters:
      aClass - the class to inspect
      fqns - where to store found fqns
    • getImports

      protected static void getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, Set<String> fqns)
      Deprecated.
      Obtain the list of fqn of object involed in the given interface.
      Parameters:
      anInterface - the interface to inspect
      fqns - where to store found fqns
    • getImports

      protected static void getImports(org.nuiton.eugene.models.object.ObjectModelOperation operation, Set<String> fqns)
      Deprecated.
      Obtain the fqn's list of all involed type in a givne operation.
      Parameters:
      operation - operation to inspect
      fqns - where to store found fqns
    • cleanImports

      protected static List<String> cleanImports(String packageName, Set<String> fqns)
      Deprecated.
      Clean a set of fqns, transform it into a List and sort it.
      Parameters:
      packageName - the current package name
      fqns - the dirty set of fqns
      Returns:
      the sorted cleaned list of fqns.
    • searchDirectUsages

      public static Map<org.nuiton.eugene.models.object.ObjectModelClass,Set<org.nuiton.eugene.models.object.ObjectModelClass>> searchDirectUsages(org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
    • searchDirectUsages

      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)
      Deprecated.
    • isImportNeeded

      public static boolean isImportNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations, String importName)
      Deprecated.
    • isCollectionNeeded

      public static boolean isCollectionNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
      Deprecated.
    • isSetNeeded

      public static boolean isSetNeeded(Collection<org.nuiton.eugene.models.object.ObjectModelOperation> operations)
      Deprecated.
    • isEntity

      public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelAttribute attribute, org.nuiton.eugene.models.object.ObjectModel model)
      Deprecated.
      Check if the given attribute type is an entity.
      Parameters:
      attribute - attribute to test
      model - model containing the attribute
      Returns:
      true if type of attribute is an entity, false otherwise
      Since:
      2.7
      See Also:
    • isEntity

      public static boolean isEntity(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
      Deprecated.
      Check if the given classifier has the TopiaCoreTagValues.Store.entity and is not an enumeration
      Parameters:
      classifier - classifier to test
      Returns:
      true if stereotype was found and classifier is not enumeration, false otherwise
      Since:
      2.5
      See Also:
    • getInheritanceStrategy

      public static String getInheritanceStrategy(org.nuiton.eugene.models.object.ObjectModelClassifier classifier)
      Deprecated.
      Obtain the value of the TopiaHibernateTagValues.Store.inheritanceStrategy tag value on the given classifier.
      Parameters:
      classifier - classifier to seek
      Returns:
      the none empty value of the found tag value or null if not found nor empty.
      Since:
      3.0
      See Also:
    • getLegacyDaoName

      @Deprecated public static String getLegacyDaoName(org.nuiton.eugene.models.object.ObjectModelClass input)
      Deprecated.
    • getElementsWithStereotype

      @Deprecated public static <Type extends org.nuiton.eugene.models.object.ObjectModelElement> Collection<Type> getElementsWithStereotype(Collection<Type> elements, String... stereotypes)
      Deprecated.
      since 3.0, not used anywhere in ToPIA
      Type Parameters:
      Type - FIXME
      Parameters:
      elements - FIXME
      stereotypes - FIXME
      Returns:
      FIXME
    • hasStereotypes

      @Deprecated public static boolean hasStereotypes(org.nuiton.eugene.models.object.ObjectModelElement element, String... stereotypes)
      Deprecated.
      since 3.0, not used anywhere in ToPIA
      Parameters:
      element - FIXME
      stereotypes - FIXME
      Returns:
      FIXME
    • getPrimaryKeyAttributesListDeclaration

      @Deprecated public static String getPrimaryKeyAttributesListDeclaration(org.nuiton.eugene.models.object.ObjectModelClass clazz, boolean includeName)
      Deprecated.
      since 3.0, not used anywhere in ToPIA
      Parameters:
      clazz - FIXME
      includeName - FIXME
      Returns:
      FIXME
    • isAssociationClassDoublon

      @Deprecated public static boolean isAssociationClassDoublon(org.nuiton.eugene.models.object.ObjectModelAttribute attr)
      Deprecated.
      since 3.0, not used anywhere in ToPIA
      Parameters:
      attr - FIXME
      Returns:
      FIXME
    • getImports

      @Deprecated public static List<String> getImports(org.nuiton.eugene.models.object.ObjectModelInterface anInterface, String... incomingFqns)
      Deprecated.
      since 3.0, not used anywhere in ToPIA
      Obtain the list of fqn of object involed in the given interface.
      Parameters:
      anInterface - the interface to inspect
      incomingFqns - incoming fqns
      Returns:
      the list of fqn of attributes
    • hasNothingOrAbstractMethods

      @Deprecated public static boolean hasNothingOrAbstractMethods(org.nuiton.eugene.models.object.ObjectModelClass clazz)
      Deprecated.
      since 3.0, used nowhere in ToPIA
      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

      @Deprecated public static boolean shouldBeAbstract(org.nuiton.eugene.models.object.ObjectModelClass clazz)
      Deprecated.
      since 3.0, used nowhere in ToPIA
      Indique si la classe specifiee devrait etre abstraite
      Parameters:
      clazz - l'instance de ObjectModelClass
      Returns:
      true dans ce cas, false sinon
    • getDAOImplementation

      @Deprecated public static Class<?> getDAOImplementation(org.nuiton.eugene.models.object.ObjectModel model)
      Obtain the class to use as abstract dao. It will look after a tag value TopiaCoreTagValues.Store.daoSuperClass in model and if not found will use the default value which is AbstractTopiaDao.
      Parameters:
      model - the model which could contains
      Returns:
      the type of the abstract dao to use
      Since:
      2.5