r2182 - trunk/topia-persistence/src/main/java/org/nuiton/topia/generator
Author: tchemit Date: 2011-01-21 18:22:48 +0100 (Fri, 21 Jan 2011) New Revision: 2182 Url: http://nuiton.org/repositories/revision/topia/2182 Log: Evolution #1221: Updates Eugene to 2.3.1 (add documentation on stereotypes and tagvalues) Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaStereoTypes.java trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaTagValues.java Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaStereoTypes.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaStereoTypes.java 2011-01-21 16:20:09 UTC (rev 2181) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaStereoTypes.java 2011-01-21 17:22:48 UTC (rev 2182) @@ -46,7 +46,8 @@ * @deprecated since 2.5 : only BeanTransformer use it and it is a deprecated transformer, will be remove in version 3.0 */ @Deprecated - @StereotypeDefinition(target = ObjectModelClassifier.class) + @StereotypeDefinition(target = ObjectModelAttribute.class, + documentation = "Deprecated! To specify that an attribute is an array") String STEREOTYPE_ARRAY = "array"; /** @@ -63,7 +64,8 @@ * @see TopiaGeneratorUtil#hasEntityStereotype(ObjectModelClassifier) * @see TopiaGeneratorUtil#hasEntityStereotype(ObjectModelAttribute) */ - @StereotypeDefinition(target = {ObjectModelClassifier.class, ObjectModelAttribute.class}) + @StereotypeDefinition(target = {ObjectModelClassifier.class, ObjectModelAttribute.class}, + documentation = "To specify that a class is an Entity") String STEREOTYPE_ENTITY = "entity"; /** @@ -71,7 +73,8 @@ * * @see TopiaGeneratorUtil#hasDtoStereotype(ObjectModelClassifier) */ - @StereotypeDefinition(target = ObjectModelClassifier.class) + @StereotypeDefinition(target = ObjectModelClassifier.class, + documentation = "to specify that a class is a DTO") String STEREOTYPE_DTO = "dto"; /** @@ -81,7 +84,8 @@ * @see ServiceTransformer * @see TopiaGeneratorUtil#hasServiceStereotype(ObjectModelClassifier) */ - @StereotypeDefinition(target = ObjectModelClassifier.class) + @StereotypeDefinition(target = ObjectModelClassifier.class, + documentation = "To specify that a class is a Service") String STEREOTYPE_SERVICE = "service"; /** @@ -90,7 +94,8 @@ * @see TopiaGeneratorUtil#hasDaoStereotype(ObjectModelClassifier) * @see TopiaGeneratorUtil#hasDaoStereotype(ObjectModelOperation) */ - @StereotypeDefinition(target = {ObjectModelClassifier.class, ObjectModelOperation.class}) + @StereotypeDefinition(target = {ObjectModelClassifier.class, ObjectModelOperation.class}, + documentation = "To Specify that a classifier or an operation should be generated as (or in) a DAO") String STEREOTYPE_DAO = "dao"; /** @@ -98,7 +103,8 @@ * * @see TopiaGeneratorUtil#hasUniqueStereotype(ObjectModelAttribute) */ - @StereotypeDefinition(target = ObjectModelAttribute.class) + @StereotypeDefinition(target = ObjectModelAttribute.class, + documentation = "To specify that an attribute is unique (Hibernate mapping)") String STEREOTYPE_UNIQUE = "unique"; /** @@ -106,6 +112,7 @@ * * @see TopiaGeneratorUtil#hasPrimaryKeyStereotype(ObjectModelAttribute) */ - @StereotypeDefinition(target = ObjectModelAttribute.class) + @StereotypeDefinition(target = ObjectModelAttribute.class, + documentation = "To specify that an attribute is part of a primary key (Hibernate mapping)") String STEREOTYPE_PRIMARYKAY = "primaryKey"; } Modified: trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaTagValues.java =================================================================== --- trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaTagValues.java 2011-01-21 16:20:09 UTC (rev 2181) +++ trunk/topia-persistence/src/main/java/org/nuiton/topia/generator/TopiaTagValues.java 2011-01-21 17:22:48 UTC (rev 2182) @@ -60,7 +60,8 @@ * @see TopiaGeneratorUtil#getPersistenceTypeTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "") String TAG_PERSISTENCE_TYPE = "persistenceType"; /** @@ -70,7 +71,8 @@ * @see TopiaGeneratorUtil#getDbName(ObjectModelElement) * @see TopiaGeneratorUtil#getReverseDbName(ObjectModelAttribute) */ - @TagValueDefinition(target = {ObjectModelElement.class}) + @TagValueDefinition(target = {ObjectModelElement.class}, + documentation = "Sets the database name of an element of the model (a table or a column)") String TAG_DB_NAME = "dbName"; /** @@ -80,7 +82,8 @@ * @see TopiaGeneratorUtil#getDbSchemaNameTagValue(ObjectModelAttribute, ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class, ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class, ObjectModelAttribute.class}, + documentation = "Sets the database schema name") String TAG_SCHEMA_NAME = "dbSchema"; /** @@ -98,7 +101,8 @@ * @see TopiaGeneratorUtil#getLengthTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the length of an attribute in database") String TAG_LENGTH = "length"; /** @@ -107,7 +111,8 @@ * @see TopiaGeneratorUtil#getAnnotationTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets an annotation of an attribute") String TAG_ANNOTATION = "annotation"; /** @@ -116,7 +121,8 @@ * @see TopiaGeneratorUtil#getAccessTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the access type of an attribute (Hibernate mapping)") String TAG_ACCESS = "access"; /** @@ -126,7 +132,8 @@ * @see TopiaGeneratorUtil#isNaturalId(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets an attribute as part of a natural id (Hibernate Mapping)") String TAG_NATURAL_ID = "naturalId"; /** @@ -136,7 +143,8 @@ * @see TopiaGeneratorUtil#isNaturalIdMutable(ObjectModelClass) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "Sets if natural id of a entity is mutable (hibernate mapping)") String TAG_NATURAL_ID_MUTABLE = "naturalIdMutable"; /** @@ -149,7 +157,8 @@ * @see TopiaGeneratorUtil#getInverseTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @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)") String TAG_INVERSE = "inverse"; /** @@ -158,7 +167,8 @@ * @see TopiaGeneratorUtil#getLazyTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets if an association should be lazy (Hibernate mapping)") String TAG_LAZY = "lazy"; /** @@ -167,7 +177,8 @@ * @see TopiaGeneratorUtil#getFetchTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the fetch caracteristic of an attribute (Hibernate mapping)") String TAG_FETCH = "fetch"; /** @@ -176,7 +187,8 @@ * @see TopiaGeneratorUtil#getOrderByTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the order by propertie of an multiple association (Hibernate mapping)") String TAG_ORDER_BY = "orderBy"; /** @@ -185,7 +197,8 @@ * @see TopiaGeneratorUtil#getNotNullTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets if an attribute must be not null (Hibernate mapping)") String TAG_NOT_NULL = "notNull"; /** @@ -199,7 +212,8 @@ * @see TopiaGeneratorUtil#getPersistenceTypeTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModel.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)") String TAG_PROXY_INTERFACE = "hibernateProxyInterface"; /** @@ -208,7 +222,8 @@ * @see TopiaGeneratorUtil#getSecurityCreateTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "Sets the create permission on an entity") String TAG_SECURITY_CREATE = "securityCreate"; /** @@ -217,7 +232,8 @@ * @see TopiaGeneratorUtil#getSecurityLoadTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "Sets the load permission on an entity") String TAG_SECURITY_LOAD = "securityLoad"; /** @@ -226,7 +242,8 @@ * @see TopiaGeneratorUtil#getSecurityUpdateTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "Sets the update permission on an entity") String TAG_SECURITY_UPDATE = "securityUpdate"; /** @@ -235,17 +252,19 @@ * @see TopiaGeneratorUtil#getSecurityDeleteTagValue(ObjectModelClassifier) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class}, + documentation = "sets the delete permission on an entity") String TAG_SECURITY_DELETE = "securityDelete"; /** * Tag pour specifier de ne pas generer la methode toString. * - * @see TopiaGeneratorUtil#getNotGenerateToStringTagValue(ObjectModelClassifier,ObjectModel) + * @see TopiaGeneratorUtil#getNotGenerateToStringTagValue(ObjectModelClassifier, ObjectModel) * @see TopiaGeneratorUtil#generateToString(ObjectModelClass, ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}, + documentation = "To not generate the toString method on entities") String TAG_NOT_GENERATE_TO_STRING = "notGenerateToString"; /** @@ -255,7 +274,8 @@ * @see TopiaGeneratorUtil#sortAttribute(ObjectModelClass, ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}, + documentation = "To sort attribute while generation") String TAG_SORT_ATTRIBUTE = "sortAttribute"; /** @@ -265,7 +285,8 @@ * @see TopiaGeneratorUtil#shouldGenerateOperatorForDAOHelper(ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class}) + @TagValueDefinition(target = {ObjectModel.class}, + documentation = "To generate EntityOperation on generated DAOHelper") String TAG_GENERATE_OPERATOR_FOR_DAO_HELPER = "generateOperatorForDAOHelper"; /** @@ -278,7 +299,8 @@ * @see TopiaGeneratorUtil#shouldGenerateStandaloneEnumForDAOHelper(ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class}) + @TagValueDefinition(target = {ObjectModel.class}, + documentation = "To generate a standalon EntityEnum outside the DAOHelper") String TAG_GENERATE_STANDALONE_ENUM_FOR_DAO_HELPER = "generateStandaloneEnumForDAOHelper"; /** @@ -287,7 +309,8 @@ * @see TopiaGeneratorUtil#getTypeTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the hibernate type of an attribute (Hibernate mapping)") String TAG_TYPE = "type"; /** @@ -296,8 +319,10 @@ * @see TopiaGeneratorUtil#getSqlTypeTagValue(ObjectModelAttribute) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelAttribute.class}) + @TagValueDefinition(target = {ObjectModelAttribute.class}, + documentation = "Sets the sql type of an attribute (Hibernate mapping)") String TAG_SQL_TYPE = "sqlType"; + /** * To use the legacy DAO generation. * @@ -306,24 +331,25 @@ * @deprecated since 2.5, prefer use the tag value */ @Deprecated - @TagValueDefinition(target = {ObjectModel.class}) + @TagValueDefinition(target = {ObjectModel.class}, + documentation = "Deprecated! To use the previous DAO implementation in generated DAO (use Criteria api)") String TAG_USE_LEGACY_DAO = "useLegacyDAO"; /** * 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 TopiaGeneratorUtil#getDaoImplementationTagValue(ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class}) + @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))") String TAG_DAO_IMPLEMENTATION = "daoImplementation"; - /** * Tag pour specifier l'exception principale de l'application. * Utiliser dans le ServiceTransformer ou QueryHelperTransformer pour etre @@ -335,7 +361,8 @@ * @see TopiaGeneratorUtil#getExceptionClassTagValue(ObjectModel) * @since 2.3.2 */ - @TagValueDefinition(target = {ObjectModel.class}) + @TagValueDefinition(target = {ObjectModel.class}, + documentation = "Sets the fully qualified name of the exeception to generate in Services and QueryHelper") String TAG_EXCEPTION_CLASS = "exceptionClass"; // ------------------------------------------------------------------------- @@ -351,7 +378,8 @@ * @see TopiaGeneratorUtil#getTransactionTagValue(ObjectModelOperation) * @since 2.3.1 */ - @TagValueDefinition(target = {ObjectModelClassifier.class, ObjectModelOperation.class}) + @TagValueDefinition(target = {ObjectModelClassifier.class, ObjectModelOperation.class}, + documentation = "Sets if an operation or a complete service required transaction (if set to true then a TopiaContext parameter will be added to methods)") String TAG_TRANSACTION = "transaction"; /** @@ -362,7 +390,8 @@ * @see TopiaGeneratorUtil#getDoCommitTagValue(ObjectModelOperation, ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModelOperation.class}) + @TagValueDefinition(target = {ObjectModelOperation.class}, + documentation = "Sets if an operation needs a commit") String TAG_DO_COMMIT = "doCommit"; /** @@ -373,7 +402,8 @@ * @see TopiaGeneratorUtil#getErrorArgsTagValue(ObjectModelOperation) * @since 2.3.1 */ - @TagValueDefinition(target = {ObjectModelOperation.class}) + @TagValueDefinition(target = {ObjectModelOperation.class}, + documentation = "Sets if an operation required errors arguments ?") String TAG_ERROR_ARGS = "errorArgs"; /** @@ -387,6 +417,7 @@ * @see TopiaGeneratorUtil#getNoLogInServiceTagValue(ObjectModelClassifier, ObjectModel) * @since 2.5 */ - @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}) + @TagValueDefinition(target = {ObjectModel.class, ObjectModelClassifier.class}, + documentation = "Sets to true if you do NOT want any log in service (should be the default behaviour...)") String TAG_NO_LOG_IN_SERVICE = "noLogInService"; }
participants (1)
-
tchemit@users.nuiton.org