This is an automated email from the git hooks/post-receive script. New commit to branch feature/3858_javadoc_jdk8 in repository topia. See http://git.nuiton.org/topia.git commit 7e60561901a6b4e61a97b2271470a978b61a7802 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Dec 30 16:29:09 2015 +0100 Fix javadoc in templates module (See #3858) --- .../topia/templates/EntityDaoTransformer.java | 4 +- .../templates/EntityHibernateMappingGenerator.java | 2 +- .../nuiton/topia/templates/EntityTransformer.java | 8 +- .../nuiton/topia/templates/TopiaGeneratorUtil.java | 34 +++-- .../nuiton/topia/templates/TopiaJavaValidator.java | 2 +- .../nuiton/topia/templates/TopiaStereoTypes.java | 1 + .../org/nuiton/topia/templates/TopiaTagValues.java | 151 ++++++++++++--------- .../topia/templates/TopiaTemplateHelper.java | 23 ++-- .../org/nuiton/topia/templates/package-info.java | 2 +- 9 files changed, 127 insertions(+), 100 deletions(-) diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java index 82b6b57..0cba1c8 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityDaoTransformer.java @@ -63,7 +63,7 @@ import java.util.Set; import java.util.TreeMap; /** - * To generate all <code>DAO</code> related classes for a given entity. + * To generate all {@code DAO} related classes for a given entity. * * @author Tony Chemit - chemit@codelutin.com * @since 2.5.4 @@ -77,7 +77,7 @@ public class EntityDaoTransformer extends ObjectModelTransformerToJava { /** * map of direct usages (values) for each entity (key). - * <p/> + * * This map is used to generate the findUsages methods for DAOAbstract. */ protected Map<ObjectModelClass, Set<ObjectModelClass>> usages; diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java index c3f3868..1cded91 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityHibernateMappingGenerator.java @@ -54,7 +54,7 @@ import java.util.TreeMap; /** * - * @author poussin <poussin@codelutin.com> + * @author Benjamin Poussin - poussin@codelutin.com * @plexus.component role="org.nuiton.eugene.Template" role-hint="org.nuiton.topia.templates.EntityHibernateMappingGenerator" */ public class EntityHibernateMappingGenerator extends ObjectModelGenerator { diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityTransformer.java b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityTransformer.java index bea9385..996da47 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/EntityTransformer.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/EntityTransformer.java @@ -358,8 +358,8 @@ public class EntityTransformer extends ObjectModelTransformerToJava { /** * Ajout les methodes necessaire à l'interface {@link TopiaEntityContextable} * si le tagValue {@link TopiaTagValues#TAG_CONTEXTABLE} est renseigné. - * @param input - * @param outputAbstract + * @param input FIXME + * @param outputAbstract FIXME */ protected void addContextableMethods(ObjectModelClass input, ObjectModelClass outputAbstract) { @@ -582,8 +582,8 @@ public class EntityTransformer extends ObjectModelTransformerToJava { * Generate properties from {@code attributes}. Generate * constant, attribute and operations for each property. * @param attributes Input attributes - * @param aClass - * @param aPackage + * @param aClass FIXME + * @param aPackage FIXME */ protected void generateProperties(Collection<ObjectModelAttribute> attributes, ObjectModelClassifier aClass, ObjectModelPackage aPackage) { for (ObjectModelAttribute attribute : attributes) { diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java index f335bff..76b16df 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaGeneratorUtil.java @@ -27,7 +27,6 @@ package org.nuiton.topia.templates; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; import com.google.common.collect.Lists; - import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; @@ -66,13 +65,13 @@ import java.util.TreeMap; /** * Classe regroupant divers méthodes utiles pour la génération des entités - * <p/> + * * Created: 13 déc. 2005 * * @author Arnaud Thimel (Code Lutin) - * @author tchemit <tchemit@codelutin.com> - * @author fdesbois <fdesbois@codelutin.com> - * @author chatellier <chatellier@codelutin.com> + * @author Tony Chemit - tchemit@codelutin.com + * @author Florian Desbois- fdebois@codelutin.com + * @author Éric Chatellier - chatellier@codelutin.com * @deprecated since 3.0, prefer use {@link TopiaTemplateHelper}. */ @Deprecated @@ -257,7 +256,7 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { /** * Obtain the reverse db name of an attribute. - * <p/> + * * If attribute has a specific reverse attribute, use his db name, otherwise * suffix the db name of the attribute by {@code _id}. * @@ -490,7 +489,7 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { * - cette relation est unidirectionnelle * - le type de l'attribut représente un entité * - cette entité a des sous-classes dans le modèle - * <p/> + * * Ce cas correspond à une incompatibilité d'Hibernate qui nous oblige a * adopter un comportement particulier. * </p> @@ -524,10 +523,7 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { /** * Renvoie le nom unique de table pour une relation ManyToMany en fonction - * de l'attribut <code>attr</code> - * <p/> - * Plusieurs cas de figure: - * <li> + * de l'attribut {@code attr} * * @param attr l'attribut servant de base au calcul du nom * @return le nom de la table @@ -904,6 +900,10 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { } /** + * @param <Type> FIXME + * @param elements FIXME + * @param stereotypes FIXME + * @return FIXME * @deprecated since 3.0, not used anywhere in ToPIA */ @Deprecated @@ -919,6 +919,9 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { } /** + * @param element FIXME + * @param stereotypes FIXME + * @return FIXME * @deprecated since 3.0, not used anywhere in ToPIA */ @Deprecated @@ -933,6 +936,9 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { } /** + * @param clazz FIXME + * @param includeName FIXME + * @return FIXME * @deprecated since 3.0, not used anywhere in ToPIA */ @Deprecated @@ -955,11 +961,13 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { } /** + * @param attr FIXME + * @return FIXME * @deprecated since 3.0, not used anywhere in ToPIA */ @Deprecated public static boolean isAssociationClassDoublon(ObjectModelAttribute attr) { - return attr.getReverseAttribute() != null && + return attr.getReverseAttribute() != null && attr.getDeclaringElement().equals( attr.getReverseAttribute().getDeclaringElement()) && !GeneratorUtil.isFirstAttribute(attr); @@ -1018,7 +1026,7 @@ public class TopiaGeneratorUtil extends JavaGeneratorUtil { /** * Obtain the class to use as abstract dao. - * <p/> + * * It will look after a tag value {@link TopiaTagValues#TAG_DAO_IMPLEMENTATION} in model * and if not found will use the default value which is {@link AbstractTopiaDao}. * diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaJavaValidator.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaJavaValidator.java index 914f454..c9eb9eb 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaJavaValidator.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaJavaValidator.java @@ -42,7 +42,7 @@ import java.util.Set; * - les nom des attributs * - les duplication d'attibuts * - * @author chatellier <chatellier@codelutin.com> + * @author Éric Chatellier - chatellier@codelutin.com */ public class TopiaJavaValidator extends ObjectModelValidator { diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaStereoTypes.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaStereoTypes.java index 5744dca..01af013 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaStereoTypes.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaStereoTypes.java @@ -63,6 +63,7 @@ public class TopiaStereoTypes extends StereotypeDefinitionProvider { /** * Check if the given classifier has the {@link TopiaStereoTypes#STEREOTYPE_ENTITY} stereotype. * + * @param aPackage FIXME * @param classifier classifier to test * @return {@code true} if stereotype was found, {@code false otherwise} * @see TopiaStereoTypes#STEREOTYPE_ENTITY diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java index b28becb..53430c6 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTagValues.java @@ -70,7 +70,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelClassifier.class}, - documentation = "TODO") + documentation = "TODO") public static final String TAG_PERSISTENCE_TYPE = "persistenceType"; /** @@ -91,7 +91,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @see TopiaTemplateHelper#getReverseDbName(ObjectModelAttribute) */ @TagValueDefinition(target = {ObjectModelElement.class}, - documentation = "Sets the database name of an element of the model (a table or a column)") + documentation = "Sets the database name of an element of the model (a table or a column)") public static final String TAG_DB_NAME = "dbName"; /** @@ -100,7 +100,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @see TopiaTemplateHelper#getReverseDbName(ObjectModelAttribute) */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the database name of the reverse db name attribute of the model (a column)") + documentation = "Sets the database name of the reverse db name attribute of the model (a column)") public static final String TAG_REVERSE_DB_NAME = "reverseDbName"; /** @@ -111,7 +111,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.9.2 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the database table name of a many to many relation for a attribute of the model") + documentation = "Sets the database table name of a many to many relation for a attribute of the model") public static final String TAG_MANY_TO_MANY_TABLE_NAME = "manyToManyTableName"; /** @@ -121,7 +121,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class, ObjectModelAttribute.class}, - documentation = "Sets the database schema name") + documentation = "Sets the database schema name") public static final String TAG_SCHEMA_NAME = "dbSchema"; /** @@ -131,7 +131,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the length of an attribute in database") + documentation = "Sets the length of an attribute in database") public static final String TAG_LENGTH = "length"; /** @@ -141,7 +141,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets an annotation of an attribute") + documentation = "Sets an annotation of an attribute") public static final String TAG_ANNOTATION = "annotation"; /** @@ -151,7 +151,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the access type of an attribute (Hibernate mapping)") + documentation = "Sets the access type of an attribute (Hibernate mapping)") public static final String TAG_ACCESS = "access"; /** @@ -161,7 +161,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets an attribute as part of a natural id (Hibernate Mapping)") + documentation = "Sets an attribute as part of a natural id (Hibernate Mapping)") public static final String TAG_NATURAL_ID = "naturalId"; /** @@ -171,7 +171,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelClassifier.class}, - documentation = "Sets if natural id of a entity is mutable (hibernate mapping)") + documentation = "Sets if natural id of a entity is mutable (hibernate mapping)") public static final String TAG_NATURAL_ID_MUTABLE = "naturalIdMutable"; /** @@ -185,7 +185,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets which part of a N-N relation is master (inverse=true) and slave (inverse=false) (must be put on each side on a such relation) (Hibernate mapping)") + documentation = "Sets which part of a N-N relation is master (inverse=true) and slave (inverse=false) (must be put on each side on a such relation) (Hibernate mapping)") public static final String TAG_INVERSE = "inverse"; /** @@ -195,7 +195,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets if an association should be lazy (Hibernate mapping)") + documentation = "Sets if an association should be lazy (Hibernate mapping)") public static final String TAG_LAZY = "lazy"; /** @@ -205,7 +205,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the fetch caracteristic of an attribute (Hibernate mapping)") + documentation = "Sets the fetch caracteristic of an attribute (Hibernate mapping)") public static final String TAG_FETCH = "fetch"; /** @@ -215,7 +215,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the order by propertie of an multiple association (Hibernate mapping)") + documentation = "Sets the order by propertie of an multiple association (Hibernate mapping)") public static final String TAG_ORDER_BY = "orderBy"; /** @@ -225,7 +225,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets if an attribute must be not null (Hibernate mapping)") + documentation = "Sets if an attribute must be not null (Hibernate mapping)") public static final String TAG_NOT_NULL = "notNull"; /** @@ -238,39 +238,39 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 3.0 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class, ObjectModelAttribute.class}, - documentation = "'true' if the value of this attribute of type Enumeration should be stored with its name (instead of using ordinal)", - defaultValue = "true") + documentation = "'true' if the value of this attribute of type Enumeration should be stored with its name (instead of using ordinal)", + defaultValue = "true") public static final String TAG_USE_ENUMERATION_NAME = "useEnumerationName"; /** * Tag pour configurer l'interface du proxy sur autre chose que l'implementation par defaut. - * <p/> + * * Par defaut : - * null > generere le proxy sur l'interface de l'implementation + * null → generere le proxy sur l'interface de l'implementation * Autre valeur : - * "none" > laisse la configuration par defaut d'hibernate + * "none" → laisse la configuration par defaut d'hibernate * * @see #getPersistenceTypeTagValue(ObjectModelClassifier) * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class}, - documentation = "Configure the proxy interface on something else than the default implementation (null to use our default implementation, none to let hibernate deal it) (Hibernate mapping)") + documentation = "Configure the proxy interface on something else than the default implementation (null to use our default implementation, none to let hibernate deal it) (Hibernate mapping)") public static final String TAG_PROXY_INTERFACE = "hibernateProxyInterface"; /** * Tag pour configurer la stategie d'heritage choisie. - * <p/> + * * Par defaut : union-subclass : Table per class strategy * Autre valeur : - * "subclass" > Single table per class hierarchy strategy - * "joined-subclass" > Joined subclass strategy + * "subclass" → Single table per class hierarchy strategy + * "joined-subclass" → Joined subclass strategy * * @see #getPersistenceTypeTagValue(ObjectModelClassifier) * @since 3.0 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class}, - documentation = "Configure the proxy interface on something else than the default implementation (null to use our default implementation, none to let hibernate deal it) (Hibernate mapping)", - defaultValue = "union-subclass") + documentation = "Configure the proxy interface on something else than the default implementation (null to use our default implementation, none to let hibernate deal it) (Hibernate mapping)", + defaultValue = "union-subclass") public static final String TAG_INHERITANCE_STRATEGY = "inheritanceStrategy"; /** @@ -280,8 +280,8 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class}, - defaultValue = "true", - documentation = "Tag to skip toString() methods generation on entities.") + defaultValue = "true", + documentation = "Tag to skip toString() methods generation on entities.") public static final String TAG_NOT_GENERATE_TO_STRING = "notGenerateToString"; /** @@ -291,7 +291,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelClassifier.class}, - documentation = "To sort attribute while generation") + documentation = "To sort attribute while generation") public static final String TAG_SORT_ATTRIBUTE = "sortAttribute"; /** @@ -301,7 +301,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class}, - documentation = "To generate EntityOperation on generated DAOHelper") + documentation = "To generate EntityOperation on generated DAOHelper") public static final String TAG_GENERATE_OPERATOR_FOR_DAO_HELPER = "generateOperatorForDAOHelper"; /** @@ -314,7 +314,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { */ @Deprecated @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the hibernate type of an attribute (Hibernate mapping)") + documentation = "Sets the hibernate type of an attribute (Hibernate mapping)") public static final String TAG_TYPE = "type"; /** @@ -324,21 +324,21 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.5 */ @TagValueDefinition(target = {ObjectModelAttribute.class}, - documentation = "Sets the sql type of an attribute (Hibernate mapping)") + documentation = "Sets the sql type of an attribute (Hibernate mapping)") public static final String TAG_SQL_TYPE = "sqlType"; /** * To specify the abstract dao to use. - * <p/> + * * If none given, will use the {@code org.nuiton.topia.persistence.TopiaDAOImpl}. - * <p/> + * * Other value possible is {@code org.nuiton.topia.persistence.TopiaDAOLegacy} * * @see #getDaoImplementationTagValue(ObjectModel) * @since 2.5 */ @TagValueDefinition(target = {ObjectModel.class}, - documentation = "Sets the fully qualified name of the DAO implementation to use in generated DAO (default is DAOImpl (base on TopiaQuery))") + documentation = "Sets the fully qualified name of the DAO implementation to use in generated DAO (default is DAOImpl (base on TopiaQuery))") public static final String TAG_DAO_IMPLEMENTATION = "daoImplementation"; /** @@ -348,8 +348,8 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 2.6.5 */ @TagValueDefinition(target = {ObjectModel.class, ObjectModelPackage.class, ObjectModelAttribute.class}, - defaultValue = "true", - documentation = "Specifies if an nm-multiplicity attribute (or all nm-multiplicity attributes of a given model) needs an index in db (Hibernate mapping)") + defaultValue = "true", + documentation = "Specifies if an nm-multiplicity attribute (or all nm-multiplicity attributes of a given model) needs an index in db (Hibernate mapping)") public static final String TAG_INDEX_FOREIGN_KEYS = "indexForeignKeys"; /** @@ -365,7 +365,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Tag to specify a super class to use instead of * {@link org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext}. - * <p/> + * * <strong>Note:</strong> the class must implements * {@link org.nuiton.topia.persistence.internal.AbstractTopiaPersistenceContext}. * @@ -374,13 +374,13 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 3.0 */ @TagValueDefinition(target = {ObjectModel.class}, - documentation = "Change the super class to use when generating PersistenceContext.") + documentation = "Change the super class to use when generating PersistenceContext.") public static final String TAG_PERSISTENCE_CONTEXT_SUPER_CLASS = "persistenceContextSuperClass"; /** * Tag to specify a super class to use instead of * {@link org.nuiton.topia.persistence.internal.AbstractTopiaApplicationContext}. - * <p/> + * * <strong>Note:</strong> the class must implement * {@link org.nuiton.topia.persistence.internal.AbstractTopiaApplicationContext}. * @@ -389,12 +389,12 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 3.0 */ @TagValueDefinition(target = {ObjectModel.class}, - documentation = "Change the super class to use when generating ApplicationContext.") + documentation = "Change the super class to use when generating ApplicationContext.") public static final String TAG_APPLICATION_CONTEXT_SUPER_CLASS = "applicationContextSuperClass"; /** * Tag to specify a super class to use instead of {@link org.nuiton.topia.persistence.internal.AbstractTopiaDao}. - * <p/> + * * <strong>Note:</strong> the class must implements {@link org.nuiton.topia.persistence.TopiaDao}. * * @see org.nuiton.topia.persistence.internal.AbstractTopiaDao @@ -402,12 +402,12 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 3.0 */ @TagValueDefinition(target = {ObjectModelClassifier.class, ObjectModelPackage.class, ObjectModel.class}, - documentation = "Change the super class to use when generating dao.") + documentation = "Change the super class to use when generating dao.") public static final String TAG_DAO_SUPER_CLASS = "daoSuperClass"; /** * Tag to specify a super class to use instead of {@link org.nuiton.topia.persistence.internal.AbstractTopiaEntity}. - * <p/> + * * <strong>Note:</strong> the class must implements {@link TopiaEntity}. * * @see TopiaEntity @@ -415,58 +415,59 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * @since 3.0 */ @TagValueDefinition(target = {ObjectModelClassifier.class, ObjectModelPackage.class, ObjectModel.class}, - documentation = "Change the super class to use when generating Entity.") + documentation = "Change the super class to use when generating Entity.") public static final String TAG_ENTITY_SUPER_CLASS = "entitySuperClass"; /** * Tag to change the type of an attribute in a hibernate mapping. - * <p/> + * * This is a special tagValue that is dynamic. - * <p/> + * * For example to change the type {@code String} into hibernate mapping type {@code text}, add this: * <pre> * model.tagValue.hibernateAttributeType.String=text * </pre> - * <p/> + * * Before 3.0, you could do the same thing using: * <pre> * model.tagValue.String=text * </pre> - * <p/> + * * The new way permits us to validate the usage of the tagValue, old way can't. * * @see #getHibernateAttributeType(ObjectModelAttribute, ObjectModelClassifier, ObjectModelPackage, ObjectModel) * @since 3.0 */ @TagValueDefinition(target = {ObjectModelAttribute.class, ObjectModelPackage.class, ObjectModelClassifier.class, ObjectModel.class}, - documentation = "Change the super class to use when generating Entity.", - matcherClass = StartsWithTagNameMatcher.class) + documentation = "Change the super class to use when generating Entity.", + matcherClass = StartsWithTagNameMatcher.class) public static final String TAG_HIBERNATE_ATTRIBUTE_TYPE = "hibernateAttributeType"; /** * Tag to change the type of an attribute. - * <p/> + * * This is a special tagValue that is dynamic. - * <p/> + * * For example to change the type {@code String} into type {@code java.lang.String}, add this: * <pre> * model.tagValue.attributeType.String=java.lang.String * </pre> - * <p/> + * * Before 3.0, you could do the same thing using: * <pre> * model.tagValue.String=java.lang.String * </pre> - * <p/> + * * The new way permits us to validate the usage of the tagValue, old way can't. * * @see #getHibernateAttributeType(ObjectModelAttribute, ObjectModelClassifier, ObjectModelPackage, ObjectModel) * @since 3.0 */ @TagValueDefinition(target = {ObjectModelAttribute.class, ObjectModelPackage.class, ObjectModelClassifier.class, ObjectModel.class}, - documentation = "Change an attribute type.", - matcherClass = StartsWithTagNameMatcher.class) + documentation = "Change an attribute type.", + matcherClass = StartsWithTagNameMatcher.class) public static final String TAG_ATTRIBUTE_TYPE = "attributeType"; + /** * Tag to specify if PropertyChangeListener support should be generated * @@ -508,7 +509,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtain the value of the {@link #TAG_DB_NAME} tag value on the given element. - * <p/> + * * <strong>Note:</strong> We just try a direct search on the element and do not * walk through his declaring elements if not found (see https://forge.nuiton.org/issues/2342). * @@ -527,7 +528,8 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * * @param classifier classifier to seek * @param aPackage package to seek - * @param model model to seek @return the none empty value of the found tag value or {@code null} if not found nor empty. + * @param model model to seek + * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_SCHEMA_NAME * @since 2.5 */ @@ -539,7 +541,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtain the value of the {@link TopiaTagValues#TAG_MANY_TO_MANY_TABLE_NAME} * tag value on the given attribute. - * <p/> + * * * 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 @@ -623,6 +625,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * Obtain the value of the {@link #TAG_CONTEXTABLE} tag value on the given classifier or model. * * @param classifier classifier to seek + * @param aPackage FIXME * @param model model to seek * @return the boolean value of the found tag value or {@code false} if not found nor empty. * @see #TAG_CONTEXTABLE @@ -702,6 +705,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * Obtain the value of the {@link #TAG_PROXY_INTERFACE} tag value on the given classifier. * * @param classifier classifier to seek + * @param aPackage FIXME * @param model model to seek * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_PROXY_INTERFACE @@ -715,8 +719,9 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtain the value of the {@link #TAG_NOT_GENERATE_TO_STRING} tag value on the given class. * - * @param clazz class to seek - * @param model model to seek + * @param clazz class to seek + * @param aPackage FIXME + * @param model model to seek * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_NOT_GENERATE_TO_STRING * @since 2.5 @@ -730,6 +735,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * Obtain the value of the {@link #TAG_SORT_ATTRIBUTE} tag value on the given classifier. * * @param classifier classifier to seek + * @param aPackage FIXME * @param model model to seek * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_SORT_ATTRIBUTE @@ -754,7 +760,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { */ public boolean isGenerateForeignKeyNames(ObjectModelClassifier classifier, ObjectModel model) { boolean value = findBooleanTagValue(TAG_GENERATE_FOREIGN_KEY_NAMES, classifier, model); - return value ; + return value; } protected static final Map<String, String> HIBERNATE_ATTRIBUTE_TYPE_DEFAULT_VALUES = Maps.newHashMap(); @@ -780,7 +786,10 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtain the value of the {@link #TAG_HIBERNATE_ATTRIBUTE_TYPE} tag value on the given attribute, classifier or model. * - * @param attribute attribute to seek + * @param attribute attribute to seek + * @param aPackage FIXME + * @param model FIXME + * @param classifier FIXME * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_HIBERNATE_ATTRIBUTE_TYPE * @since 3.0 @@ -800,7 +809,10 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtain the value of the {@link #TAG_ATTRIBUTE_TYPE} tag value on the given attribute, classifier or model. * - * @param attribute attribute to seek + * @param attribute attribute to seek + * @param aPackage FIXME + * @param model FIXME + * @param classifier FIXME * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_ATTRIBUTE_TYPE * @since 3.0.1 @@ -848,6 +860,7 @@ public class TopiaTagValues extends TagValueDefinitionProvider { * * @param attribute attribute to test * @param model model to test + * @param aPackage FIXME * @return none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_INDEX_FOREIGN_KEYS * @since 2.6.5 @@ -892,7 +905,9 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtains the value of the {@link #TAG_DAO_SUPER_CLASS} tag value on the given classifier or on the model. * - * @param model model to seek + * @param model model to seek + * @param aPackage FIXME + * @param classifier FIXME * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_DAO_SUPER_CLASS * @since 3.0 @@ -905,7 +920,9 @@ public class TopiaTagValues extends TagValueDefinitionProvider { /** * Obtains the value of the {@link #TAG_ENTITY_SUPER_CLASS} tag value on the given classifier or on the model. * - * @param model model to seek + * @param model model to seek + * @param aPackage FIXME + * @param classifier FIXME * @return the none empty value of the found tag value or {@code null} if not found nor empty. * @see #TAG_ENTITY_SUPER_CLASS * @since 3.0 diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java index ec57837..a17e749 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/TopiaTemplateHelper.java @@ -64,10 +64,10 @@ import java.util.TreeMap; /** * Classe regroupant divers méthodes utiles pour la génération des entités. - * <p/> + * * Remplace {@code TopiageneratorUtil} car on ne veut plus utiliser de méthodes * statiques (par exemple pour avoir les valeurs par défaut des tagValues,...). - * <p/> + * * Created on 7/6/14. * * @author Tony Chemit - chemit@codelutin.com @@ -244,7 +244,7 @@ public class TopiaTemplateHelper { /** * Obtain the reverse db name of an attribute. - * <p/> + * * Try first to get the reverse db Name from the reverseDbname tag-value, then * if attribute has a specific reverse attribute, use his db name, otherwise * suffix the db name of the attribute by {@code _id}. @@ -288,10 +288,11 @@ public class TopiaTemplateHelper { * * <strong>Note that the reverse attribute can't be null here.</strong> * <ul> - * <li>Try first to get the reverse db Name from the ReverseDbname tag-value</li> - * <li>If not found, try then the ReverseDbname tag-value on the same attribute but from this other side of the relation</li> - * <li>If not found, try then just get the name of the reverse attribute</li> + * <li>Try first to get the reverse db Name from the ReverseDbname tag-value</li> + * <li>If not found, try then the ReverseDbname tag-value on the same attribute but from this other side of the relation</li> + * <li>If not found, try then just get the name of the reverse attribute</li> * </ul> + * * @param attr the attribute to seek * @return the value of the reverse db name on the reverse attribute * @since 2.9.5.2 @@ -517,7 +518,7 @@ public class TopiaTemplateHelper { * - cette relation est unidirectionnelle * - le type de l'attribut représente un entité * - cette entité a des sous-classes dans le modèle - * <p/> + * * Ce cas correspond à une incompatibilité d'Hibernate qui nous oblige a * adopter un comportement particulier. * </p> @@ -552,10 +553,7 @@ public class TopiaTemplateHelper { /** * Renvoie le nom unique de table pour une relation ManyToMany en fonction - * de l'attribut <code>attr</code> - * <p/> - * Plusieurs cas de figure: - * <li> + * de l'attribut {@code attr} * * @param attr l'attribut servant de base au calcul du nom * @return le nom de la table @@ -931,6 +929,7 @@ public class TopiaTemplateHelper { return collectionType; } + public Class<?> getCollectionInstanceType(ObjectModelAttribute attribute) { boolean unique = EugeneStereoTypes.hasUniqueStereotype(attribute); @@ -965,6 +964,8 @@ public class TopiaTemplateHelper { /** * dependency to add extra operations for entity dao. * + * @param input FIXME + * @return FIXME * @since 2.3.4 * @deprecated only used for warn to help migration to 3.0, should be deleted */ diff --git a/topia-templates/src/main/java/org/nuiton/topia/templates/package-info.java b/topia-templates/src/main/java/org/nuiton/topia/templates/package-info.java index 676b67c..fe38534 100644 --- a/topia-templates/src/main/java/org/nuiton/topia/templates/package-info.java +++ b/topia-templates/src/main/java/org/nuiton/topia/templates/package-info.java @@ -88,7 +88,7 @@ * méthodes l'utilise dans les signatures de méthode lorsqu'il y a un * lien entre deux entités.</p> * - * @author poussin <poussin@codelutin.com> + * @author Benjamin Poussin - poussin@codelutin.com */ package org.nuiton.topia.templates; -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.