diff --git a/jpa2-backend/pom.xml b/jpa2-backend/pom.xml index 57ecc47..3c52918 100644 --- a/jpa2-backend/pom.xml +++ b/jpa2-backend/pom.xml @@ -46,7 +46,7 @@ ${project.basedir} - 3.0.103 + 3.0.104 4.2.3.Final 3.2.3.RELEASE 3.1.4.RELEASE diff --git a/jpa2-backend/src/main/config/maven-celerio-plugin/celerio.xsd b/jpa2-backend/src/main/config/maven-celerio-plugin/celerio.xsd index fa4c2ed..0f5fd71 100644 --- a/jpa2-backend/src/main/config/maven-celerio-plugin/celerio.xsd +++ b/jpa2-backend/src/main/config/maven-celerio-plugin/celerio.xsd @@ -341,7 +341,78 @@ - + + + + + + + + + + + + + + + + change the prefix/suffix conventions for a given method + + + + + Example: GET_LOCALIZED]]> + + + + + Example: get]]> + + + + + Example: Localized]]> + + + + + + + + Restrict the generation to the following classTypes + + + + + + + + + + Restrict the generation to the following wellKnownFolders + + + + + + + + + + Restrict the generation to the following generatedPackages + + + + + + + + + + + + The ManyToManyConfig allows you to fine tune your @ManyToMany association. The ManyToManyConfig element must be a child of a columnConfig element referencing (i.e foreignkey) the entity that is the target of this @ManyToMany association. The columnConfig necessarily belongs to a 'join entity'. + @@ -370,7 +441,7 @@ - Configure which actions should be generated for this association in the front end layer. + Configure which actions should or should not be generated for this association in the front end layer. @@ -384,11 +455,6 @@ The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). - - - The JPA orphanRemoval for this association. - - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. @@ -399,35 +465,54 @@ @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> - - - - Add Hibernate SafeHtml annotation on this field. - - - - - - - This setting allows you to change the column name that is passed to Celerio to calculate the default field name.
You can for example remove well known prefix pattern from your column names.]]>
-
- - + - The regular expression to apply on the column name. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. - +
+ + + + + + + + + + + + + + - The replacement String. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + The full class name that this entity extends. For example 'com.mycompany.MyClass'. This is taken into account only if the entity is a root entity. - + + + Describes an entity config + + + + The 2d level cache configuration for this entity. + + + + + Free parameters. Not used internally. + + + + + + + - The labels for this association. + The labels for this entity. They appear in the entity properties file located under 'src/main/resources/localization/domain'. @@ -435,420 +520,377 @@ - + - The list of JPA cascade types for the this association. + Inheritance configuration. + + + + + Specify the base class that this entity should extends. Only for root entity. + + + + + Specify the extra interfaces that this entity should implement. - + - + - The 2d level cache configuration for this association. + Meta attributes are free form key value pairs. + + + + + + + + + + This entity's columnConfigs. Note that for entities without inheritance or for entities with a JOIN inheritance strategy, if a column is present in the table's meta data but has no corresponding entityConfig in this list, then an entityConfig is created by default and added automatically to this list. + + + + + - + - Configure which actions should or should not be generated for this association in the front end layer. + List of custom annotations to apply on this entity. + + + + + - + - The variable name for association. It should be singular, for example: 'parent'. + For example, entityName="BankAccount".
By default, the entity name is deduced from the table name.
For example: 'bank_account' will become 'BankAccount';]]>
- + - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + Allows you to specify the sequence name to use in order to generate this entity pk value. When a sequence name is provided the corresponding @SequenceGenerator and @GeneratedValue annotations are added to the primary key attribute. - + - If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + The underlying table name for the entity. If not set, inheritance must be configured. -
- - - - + - JPA cascade type. Use NONE if you do not want any CascadeType to be set. + Should this entity be annotated with hibernate search @Indexed annotation? False by default, unless if one columnConfig is marked as indexed. - - - - + - Generate code in order to create a new target entity from the source entity main edit page. + By convention a table is considered as a many-to-many middle table if it has two foreign keys and no other regular columns. This attribute allows you to consider this table as a middle table, even if it has other regular columns. A regular column is a column that is neither a primary key nor a version (i.e. optimistic lock). - + - Generate code in order to edit a target entity from the source entity main edit page. + The comment that will be inserted in this entity's JavaDoc. - + - Generate code in order to view a target entity from the source entity main edit page. + Example: com.yourcompany]]> - + - Generate code in order to select an existing target entity from the source entity main edit page. Note: it does not apply to one-to-many association. + .domain." instead of ".domain". There is no sub-package by default.]]> - + - Generate code in order to select an existing target entity, using an autoComplete component, from the source entity main edit page. Note: it does not apply to one-to-many association. + The base label for this entity. You may either set it here or in a nested labels/label. - + - Generate code in order to remove a target entity from the source entity main edit page. + It is pertinent only if this entity's table plays the role of a middle table in a many-to-many association. In that case you can use this parameter to set the many-to-many association direction. + + + + + You can override the default collection type for this entity - + + - A pattern is a structure to help handling inclusion and exclusion of resources + Used to introduce a new 'namer' property on each Celerio's entity context instance. Entity namer properties are convenient when writing template for classes that support entities, for example: Controller, Service, Dao, Validator etc... example: var name is obtained with ${entity.property.var} and has the value "prefixEntityNameSuffix". - + -
  • ? matches one character
  • * matches zero or more characters
  • Some examples:
    • US?R - matches USER but also USOR or USAR etc.
    • TBL_* - matches all tables whose name starts with TBL_, for example TBL_USER
    ]]>
    + The property name.
    - + - The sequence name to use for the entity that is associated with the matching table. You can use the magic '{TABLE_NAME}' token which is replaced with the corresponding table name. For example: SEQ_{TABLE_NAME}. + The root package. Defaults to the globally defined root package. -
    - - - + - The name of the primary key generator to use + The sub package. For example: "security", "web.security". No defaults. - + - The primary key generation strategy that the persistence provider must use to generate the annotated entity primary key. - - - - - - Description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). - - - - - Foreign key column name - - - - - Foreign key name - - - - - Primary key column name being imported + Prefix prepended to the entity name. - + - Primary key table name being imported + Prefix appended to the entity name. - + - - - For large projects, you can split the content of the entityConfigs tag into multiple files and 'include' the files here. - - - - - - - - - - Configure the celerio generator, such as conventions, jdbc connectivity, and other - - - - - Configure the generated entities. - - - - - - - - - - Configure enums that will be used in multiple entities, and referenced by their name in ColumnConfig - + + + - + - - - - - The labels for this attribute. They appear in the entity properties file located under 'src/main/resources/localization/domain'. - - - - - - - - - - For future uses - - - - - - - - - - Specify the enum config to map this column to a Java enum. If this enum is used by other columns, you must declare instead a shared enum and reference it using the sharedEnumName attribute. - - - - - When this element is present, the SafeHtml annotation is added on this field. - - - - - When the column represents a single primary key, you can configure the GeneratedValue JPA annotation here. - - - - - When the column represents a single primary key, you can configure the GenericGenerator JPA annotation here. - - - - - Configure the Hibernate search Field annotation. If present, the field is annotated, if absent it is not. - - - - - List of custom annotations to apply on this property. - - - - - - - - - - - - - - + + + Description of the given table's indices and statistics + + + - References a shared enum name by its name. You cannot have both an enum configuration, and a shared enum name. + Column name - + - The base label for this column. You may either set it here or in a nested labels/label. + Index name - + - If set to true, the column will be ignored. Make sure you do not ignore not null columns. + Can index values be non-unique - + + + + + Override the class conventions such as GeneratedPackage, suffix and prefixes + + + - Override the default JdbcType. + The ClassType to override - + - Force the Java mapped type for this column instead of relying on Celerio's conventions. + Override the prefix for this ClassType - + - @Basic(fetch = FetchType.LAZY) is used. Defaults to 'true' for CLOB, BLOB or BYTES mapped types.]]> + Override the suffix for this ClassType - + - For primary key the field name is always forced to Example: 'first_name' will become 'firstName';]]> + Override the GeneratedPackage for this ClassType - + + + + + + + + + Global rule to map columns whose JDBC TYPE correspond to a number to a Java type. + + + - Allows you to use JPA secondary table if you set a table name that is different from the entity table name. Default to the entity table name. + The mapped type to use when both the column size and decimal digit value fall into the specified ranges. - + - The mandatory column name. + The minimum (inclusive) column size to fall into this mapping range. - + - Override the column size defined in the Metadata. Defaults to the size found when reversing the database schema. + The maximum (exclusive) column size to fall into this mapping range. - + - Minimum length for String. When present it is used in the @Size validation annotation. No default value. + The minimum (inclusive) column decimal digit value to fall into this mapping range. - + - Override the column ordinal position defined in the Metadata. Defaults to the ordinal position found when reversing the database schema. + The maximum (exclusive) column decimal digit value to fall into this mapping range. - + + + + - The order of appearance of this column in forms, from top to bottom and in search results, from left to right. It defaults to the ordinal position. + Generate code in order to create a new target entity from the source entity main edit page. - + - Sets the 'type' attribute passed to the 'org.hibernate.annotations.Type' annotation. By default, no Type annotation is used. + Generate code in order to edit a target entity from the source entity main edit page. - + - Indicates if this property is part of the entity business key. You may set it on several properties at the same time if your business key involves more than one column. If set to true, the property will be used in equals/hashCode methods. As soon as you declare this attribute on a property, convention no longer applies for the entity. + Generate code in order to view a target entity from the source entity main edit page. - + - If set to true, all the annotations for the corresponding getter will be commented and a @Transient annotation will be set.]]> + Generate code in order to select an existing target entity from the source entity main edit page. Note: it does not apply to one-to-many association. - + - Override the comment defined in the Metadata. The comment that will be inserted as JavaDoc in the corresponding getter method. Defaults to the comment found when reversing the database schema. + Generate code in order to select an existing target entity, using an autoComplete component, from the source entity main edit page. Note: it does not apply to one-to-many association. - + - Override the column decimal digits defined in the Metadata. Defaults to the decimal digits found when reversing the database schema. + Generate code in order to remove a target entity from the source entity main edit page. - + + + + A pattern is a structure to help handling inclusion and exclusion of resources + + + - Override the default value defined in the Metadata. Defaults to the default value found when reversing the database schema. +
  • ? matches one character
  • * matches zero or more characters
  • ** matches zero or more 'directories' in a path
  • Some examples:
    • com/t?st.jsp - matches com/test.jsp but also com/tast.jsp or com/txst.jsp
    • com/yourcompany/**\/*.jsp - matches all .jsp files in the com/yourcompany directory
    ]]>
    - + - Indicates whether the possible values held by this column are used as keys to resolve the associated localized values. + True is is an inclusion pattern, false for an exclusion ? - +
    + + + Description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). + + + - Does this column contain html? When true, some special escaping on the front is performed. + Foreign key column name - + - If this column represents a foreign key that points to the target of a ManyToMany association it can be set to true to change the default inverse side of the ManyToMany association. By convention, the column with the highest ordinal position refers to the inverse side. + Foreign key name - + - If this column represents an importedKey, should it be bidirectionnal or unidirectionnal + Primary key column name being imported - - - If this column represents an importedKey, and the column is unique, should the one to one be handled via a collection ? - - - - - Override the autoIncrement value defined in the Metadata. You should use it only in case your driver is unable to determine whether the primary key is auto incremented or not. - - - - - Override the nullable value defined in the Metadata. Defaults to the nullable value found when reversing the database schema. - - - - - Should this column appear in edit form? By default, most columns appear in the edit form. Note that this configuration is taken into account only if at least one of the entity's columnConfig formField attribute (could be this one) is set to true. - - - - - Should this column appear in search form? - - - - - Should this column appear in search results? - - - + - Should this column be part of the label representation + Primary key table name being imported - + + + + A pack is the aggregation of templates and static files that produces functionalities. + + + + + Control the generation output by filtering the generated files based on their filename. + + + + + + + + + + Control the generation output by filtering the execution of the generation templates based on their filename. + + + + + + + + + - Override the uniqueness defined in the indexes from the metadata. + Name of the pack - + - Should this column be visible to the users ? + Example: src/main/packs/my-own-pack/]]> - + - Should this column be used to provide optimistic locking? If true, this column will be mapped with a @Version annotation providing the mapped type is compatible with @Version expected type. Defaults to true if the fieldName is "version" and if the mapped type is compatible with @Version. + Should this pack be used ? - + - If you use a legacy database schema that does not declare foreign keys, you can manually set the target table name. If you do, you may also need to set the targetColumnName. This attribute is not taken into account if a foreign key is already declared in your schema. + Specify the pack order, its main interest is when two packs produce the same artifacts. - + + + + Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + + + - Once you have set the targetTableName, you can adjust the targetColumnName if it is different from the primaryKey column. Defaults to the targetTableName's primary key column. + The Hibernate type to use for Joda LocalDate. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDate". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDate" if you use hibernate 3. - + - Should this column be considered as storing a password ? This will impact input types attribute on the web tier. + The Hibernate type to use for Joda LocalDateTime. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDateTime" if you use hibernate 3. @@ -901,367 +943,495 @@
    - - - The ManyToManyConfig allows you to fine tune your @ManyToMany association. The ManyToManyConfig element must be a child of a columnConfig element referencing (i.e foreignkey) the entity that is the target of this @ManyToMany association. The columnConfig necessarily belongs to a 'join entity'. - + - + - The labels for this association. + Set comments for this enum value. - + - + - The list of JPA cascade types for the this association. + The labels for this enum value. They appear in the enum properties file located under 'src/main/resources/localization/domain'. - + - - - The 2d level cache configuration for this association. - - - - - Configure which actions should or should not be generated for this association in the front end layer. - - - + - The variable name for the collection. It should be plural, for example: 'children'. Please configure also the elementVar as the singular of this var. + The enum constant that defines an instance of the enum type. Example: For a Civility enum, this could be MISS or MISTER. - + - The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). + The value really stored in the database. Only applies if the enumConfig's type is CUSTOM. Note that the mapping leverages Jadira as it is not supported natively by JPA. - + - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + The base label for this enum value. You may either set it here or in a nested labels/label. - + + + + + + For large projects, you can split the content of the entityConfigs tag into multiple files and 'include' the files here. + + + + + + + + + + Configure the celerio generator, such as conventions, jdbc connectivity, and other + + + + + Configure the generated entities. + + + + + + + + + + Configure enums that will be used in multiple entities, and referenced by their name in ColumnConfig + + + + + + + + + + + + Describes all the metadata for a given table + + + + + Describes all the columns metadata for this table + + + + + + + + + + Describes all the indexes for this table + + + + + + + + + + Describes all the imported keys for this table + + + + + + + + + + Describes all the primary keys for this table + + + + + + + + + - @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> + Example: USER]]> - + - If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + Type of the table - - - - Allows you to configure Hibernate Search Field annotation. - - - + - The full type of the field bridge implementation to use. When not null it is used by the @FieldBridge annotation. + Example: Table containing all the user related information]]> - - - - - - - - - - Information about the database where celerio extracted the metadata - - - - - - - - - - - - - - - + + + + + The labels for this attribute. They appear in the entity properties file located under 'src/main/resources/localization/domain'. + + + + + + + + + + For future uses + + + + + + + + + + Specify the enum config to map this column to a Java enum. If this enum is used by other columns, you must declare instead a shared enum and reference it using the sharedEnumName attribute. + + + + + When this element is present, the SafeHtml annotation is added on this field. + + + + + When the column represents a single primary key, you can configure the GeneratedValue JPA annotation here. + + + + + When the column represents a single primary key, you can configure the GenericGenerator JPA annotation here. + + + + + Configure the Hibernate search Field annotation. If present, the field is annotated, if absent it is not. + + + + + List of custom annotations to apply on this property. + + + + + + + + + + + + + + - The full class name that this entity extends. For example 'com.mycompany.MyClass'. This is taken into account only if the entity is a root entity. + References a shared enum name by its name. You cannot have both an enum configuration, and a shared enum name. + + + + + The base label for this column. You may either set it here or in a nested labels/label. + + + + + If set to true, the column will be ignored. Make sure you do not ignore not null columns. + + + + + Override the default JdbcType. - - - - Global rule to map columns whose JDBC TYPE correspond to a number to a Java type. - - - The mapped type to use when both the column size and decimal digit value fall into the specified ranges. + Force the Java mapped type for this column instead of relying on Celerio's conventions. - + - The minimum (inclusive) column size to fall into this mapping range. + @Basic(fetch = FetchType.LAZY) is used. Defaults to 'true' for CLOB, BLOB or BYTES mapped types.]]> - + - The maximum (exclusive) column size to fall into this mapping range. + For primary key the field name is always forced to Example: 'first_name' will become 'firstName';]]> - + - The minimum (inclusive) column decimal digit value to fall into this mapping range. + Allows you to use JPA secondary table if you set a table name that is different from the entity table name. Default to the entity table name. - + - The maximum (exclusive) column decimal digit value to fall into this mapping range. + The mandatory column name. - - - - A pattern is a structure to help handling inclusion and exclusion of resources - - - + -
  • ? matches one character
  • * matches zero or more characters
  • ** matches zero or more 'directories' in a path
  • Some examples:
    • com/t?st.jsp - matches com/test.jsp but also com/tast.jsp or com/txst.jsp
    • com/yourcompany/**\/*.jsp - matches all .jsp files in the com/yourcompany directory
    ]]>
    + Override the column size defined in the Metadata. Defaults to the size found when reversing the database schema.
    - + - True is is an inclusion pattern, false for an exclusion ? + Minimum length for String. When present it is used in the @Size validation annotation. No default value. -
    - - - - - - Table types to retrieve - - - - - - - - - + - Example: org.h2.Driver]]> + Override the column ordinal position defined in the Metadata. Defaults to the ordinal position found when reversing the database schema. - + - Example: Jdbc:h2:~/mydatabase]]> + The order of appearance of this column in forms, from top to bottom and in search results, from left to right. It defaults to the ordinal position. - + - Example: myuser]]> + Sets the 'type' attribute passed to the 'org.hibernate.annotations.Type' annotation. By default, no Type annotation is used. - + - Example: mypassword]]> + Indicates if this property is part of the entity business key. You may set it on several properties at the same time if your business key involves more than one column. If set to true, the property will be used in equals/hashCode methods. As soon as you declare this attribute on a property, convention no longer applies for the entity. - - + - Example: PROJECT_%]]> + If set to true, all the annotations for the corresponding getter will be commented and a @Transient annotation will be set.]]> - + - Should Celerio retrieve remarks on oracle, beware this is a very time consuming operation + Override the comment defined in the Metadata. The comment that will be inserted as JavaDoc in the corresponding getter method. Defaults to the comment found when reversing the database schema. - + - Should Celerio retrieve synonyms on oracle + Override the column decimal digits defined in the Metadata. Defaults to the decimal digits found when reversing the database schema. - + - When false, no indexes is reversed at all. + Override the default value defined in the Metadata. Defaults to the default value found when reversing the database schema. - + - when true, reverse only indexes for unique values; when false, reverse indexes regardless of whether unique or not. + Indicates whether the possible values held by this column are used as keys to resolve the associated localized values. - + - "" retrieves those without a catalog
    empty means that the catalog name should not be used to narrow the search]]>
    + Does this column contain html? When true, some special escaping on the front is performed. +
    +
    + + + If this column represents a foreign key that points to the target of a ManyToMany association it can be set to true to change the default inverse side of the ManyToMany association. By convention, the column with the highest ordinal position refers to the inverse side. + + + + + If this column represents an importedKey, should it be bidirectionnal or unidirectionnal + + + + + If this column represents an importedKey, and the column is unique, should the one to one be handled via a collection ? + + + + + Override the autoIncrement value defined in the Metadata. You should use it only in case your driver is unable to determine whether the primary key is auto incremented or not. + + + + + Override the nullable value defined in the Metadata. Defaults to the nullable value found when reversing the database schema. + + + + + Should this column appear in edit form? By default, most columns appear in the edit form. Note that this configuration is taken into account only if at least one of the entity's columnConfig formField attribute (could be this one) is set to true. + + + + + Should this column appear in search form? + + + + + Should this column appear in search results? + + + + + Should this column be part of the label representation + + + + + Override the uniqueness defined in the indexes from the metadata. + + + + + Should this column be visible to the users ? + + + + + Should this column be used to provide optimistic locking? If true, this column will be mapped with a @Version annotation providing the mapped type is compatible with @Version expected type. Defaults to true if the fieldName is "version" and if the mapped type is compatible with @Version. + + + + + If you use a legacy database schema that does not declare foreign keys, you can manually set the target table name. If you do, you may also need to set the targetColumnName. This attribute is not taken into account if a foreign key is already declared in your schema. + + + + + Once you have set the targetTableName, you can adjust the targetColumnName if it is different from the primaryKey column. Defaults to the targetTableName's primary key column. + + + + + Should this column be considered as storing a password ? This will impact input types attribute on the web tier.
    - - - - - Entry point to extend Celerio engine's Velocity context. Only needed if you develop new Celerio templates. - - - - - List of template packs to execute during the generation. Defaults to the template packs found in the classpath. - - - - - - - - - - List of modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - - - - - - - - - - List of custom modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - - - - - - - - - - Control the generation output by filtering the generated files based on their filename. - - - - - - - - - - Control the generation output by filtering the execution of the generation templates based on their filename. - - - - - - - - - - Filter the tables you want to be generated - - - - - - - - - - Defines sequence names based on table name - - - - - - - - - - The list of number mappings. The first match is used. If no match is found, convention applies. - - - - - - - - + + + Override the convention for a given GeneratedPackage + + + + + The GeneratedPackage to override + + + + + Example: com.yourcompany]]> + + + + + Example: my.subpackage]]> + + + + + + + + JPA cascade type. Use NONE if you do not want any CascadeType to be set. + + + + + + Information about the database where celerio extracted the metadata + + + + + + + + + + + + + + + Include a configuration file dedicated to entityConfigs. Use it on large project to split your entityConfigs configuration into smaller pieces. + + + + + The path to a configuration file whose entityConfigs tag will be loaded. The path must be relative to the folder containing the main configuration file. Beware, only the entityConfigs tag will be loaded from this file. For example: includes/ref/country.xml + + + + + + + + The full interface name that this entity implements. For example 'com.mycompany.MyInterface' + + + + + + This setting allows you to change the column name that is passed to Celerio to calculate the default field name.
    You can for example remove well known prefix pattern from your column names.]]>
    +
    + + + + The regular expression to apply on the column name. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + + + + + The replacement String. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + + +
    + + + + + The full qualified custom annotation to apply to this property. For example: @com.mycompany.MyAnnotation(debug = true) + + + + + + Configuration of a column, the data reflect the jdbc metadata + + + - The list of date mappings. The first match is used. If no match is found, convention applies. + Enum values if the column represents an enum - + - - - Default Entity 2d level cache configuration. Uses ehcache. To disable default cache annotation generation for entity having no CacheConfig element, simply remove this element. - - - - - Default many-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default one-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default inverse one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default inverse many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. - - - - - Configure the java convention such as classnames, packages, methods - - - For future use + Enum values if the column represents an enum @@ -1269,196 +1439,128 @@ - - - Miscellaneous generation configuration - - - - - The JDBC settings enabling Celerio to retrieve your database meta data. - - - - - Restrict the generation to the given elements - - - + - Choose the default association direction + Column name - + - Example: casino]]> + Default value - + - Example: com.mycompany]]> + The number of fractional digits - - - - Description of the given table's indices and statistics - - - + - Column name + Is Auto Increment? - + - Index name + Is NULL allowed ? - + - Can index values be non-unique + Index of column in table (starting at 1) - - - - - - - - - - - - - - - - - Configuration element for Hibernate/EhCache 2d level cache. - - - + - Hibernate/EhCache CacheConcurrencyStrategy. Use NONE if you do not want any Cache annotation to be set. + Comment describing the column + + + + + Column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision. + + + + + This column jdbc type - - - - - Specify your own file header comments - + - + - Set each line to be added to the header files. + Table types to retrieve - + - + - Should the header be present in the generated files ? + Example: org.h2.Driver]]> - + - Should the template name be present in the header. This is useful when dealing with large amount of templates and packs for debugging purposes or support information. + Example: Jdbc:h2:~/mydatabase]]> - - - - - - - - - - Used to introduce a new 'namer' property on each Celerio's entity context instance. Entity namer properties are convenient when writing template for classes that support entities, for example: Controller, Service, Dao, Validator etc... example: var name is obtained with ${entity.property.var} and has the value "prefixEntityNameSuffix". - - - + - The property name. + Example: myuser]]> - + - The root package. Defaults to the globally defined root package. + Example: mypassword]]> - + + - The sub package. For example: "security", "web.security". No defaults. + Example: PROJECT_%]]> - + - Prefix prepended to the entity name. + Should Celerio retrieve remarks on oracle, beware this is a very time consuming operation - + - Prefix appended to the entity name. + Should Celerio retrieve synonyms on oracle - - - - Override the convention for a given GeneratedPackage - - - + - The GeneratedPackage to override + When false, no indexes is reversed at all. - + - Example: com.yourcompany]]> + when true, reverse only indexes for unique values; when false, reverse indexes regardless of whether unique or not. - + - Example: my.subpackage]]> + "" retrieves those without a catalog
    empty means that the catalog name should not be used to narrow the search]]>
    - - - - - - - - - - - - - - - - Meta attributes are free form key value pairs - + - + - name of you meta attribute + The name of the primary key generator to use - + - value for this attribute + The primary key generation strategy that the persistence provider must use to generate the annotated entity primary key. @@ -1554,625 +1656,523 @@
    - - - Override the class conventions such as GeneratedPackage, suffix and prefixes - - - - - The ClassType to override - - - - - Override the prefix for this ClassType - - - - - Override the suffix for this ClassType - - - - - Override the GeneratedPackage for this ClassType - - - - - - change the convention for a given well known folder - - - - - WellKnownFolder to override - - - - - Override the folder for this WellKnownFolder - - - - - Override the generated folder for this WellKnownFolder - - - - - - Entry point to configure an enum generation. - - - - - Specify the enum constants. - - - - - - - - - - Set comments for this enumeration. - - - - - - - - - - - Example: name="CreditCardEnum"]]> - - - - - Example: com.yourcompany]]> - - - - - .domain." instead of ".domain". Same applies for other enum related classes. There is no sub-package by default.]]> - - - - - The JPA enum type. The CUSTOM type (not a JPA type) allows you to do advanced enum mapping with Jadira or a custom user type. - - - - - Example: name="com.youcompany.hibernate.support.CustomDateUserType"]]> - - - - Global rule to map columns whose JDBC TYPE is DATE, TIME or TIMESTAMP to a Java type. - - - - - The mapped type to use when both the jdbcType and the columnNamePattern matches what is expected. - - - - - Only column with this JdbcType are concerned by this mapping. Accepted JdbcType are DATE, TIME, TIMESTAMP. When set to null, we assume the column JdbcType may be DATE, TIME, or TIMESTAMP. - - - - - An optional regular expression to restrict the mapping by column name. The matching is case insensitive. - - - - - - - - Set comments for this enum value. - - - - - - - - - - The labels for this enum value. They appear in the enum properties file located under 'src/main/resources/localization/domain'. - - - - - - - - - - - The enum constant that defines an instance of the enum type. Example: For a Civility enum, this could be MISS or MISTER. - - - - - The value really stored in the database. Only applies if the enumConfig's type is CUSTOM. Note that the mapping leverages Jadira as it is not supported natively by JPA. - - - - - The base label for this enum value. You may either set it here or in a nested labels/label. - - - - - - Configuration of a column, the data reflect the jdbc metadata - - - - - Enum values if the column represents an enum - - - - - - - - - - Enum values if the column represents an enum - - - - - - - - - - - Column name - - - - - Default value - - - - - The number of fractional digits - - - - - Is Auto Increment? - - - + Global rule to map columns whose JDBC TYPE is DATE, TIME or TIMESTAMP to a Java type. + + + - Is NULL allowed ? + The mapped type to use when both the jdbcType and the columnNamePattern matches what is expected. - + - Index of column in table (starting at 1) + Only column with this JdbcType are concerned by this mapping. Accepted JdbcType are DATE, TIME, TIMESTAMP. When set to null, we assume the column JdbcType may be DATE, TIME, or TIMESTAMP. - + - Comment describing the column + An optional regular expression to restrict the mapping by column name. The matching is case insensitive. - + + + + A pattern is a structure to help handling inclusion and exclusion of resources + + + - Column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision. +
  • ? matches one character
  • * matches zero or more characters
  • Some examples:
    • US?R - matches USER but also USOR or USAR etc.
    • TBL_* - matches all tables whose name starts with TBL_, for example TBL_USER
    ]]>
    - + - This column jdbc type + The sequence name to use for the entity that is associated with the matching table. You can use the magic '{TABLE_NAME}' token which is replaced with the corresponding table name. For example: SEQ_{TABLE_NAME}.
    - + - Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + change the convention for a given well known folder - + - The Hibernate type to use for Joda LocalDate. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDate". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDate" if you use hibernate 3. + WellKnownFolder to override - + - The Hibernate type to use for Joda LocalDateTime. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDateTime" if you use hibernate 3. + Override the folder for this WellKnownFolder - - - - + - The full interface name that this entity implements. For example 'com.mycompany.MyInterface' + Override the generated folder for this WellKnownFolder - - - Describes an entity config - + - - - The 2d level cache configuration for this entity. - - - + - Free parameters. Not used internally. + The labels for this association. - + - + - The labels for this entity. They appear in the entity properties file located under 'src/main/resources/localization/domain'. + The list of JPA cascade types for the this association. - + - + - Inheritance configuration. + The 2d level cache configuration for this association. - + - Specify the base class that this entity should extends. Only for root entity. + Configure which actions should or should not be generated for this association in the front end layer. - + + + + The variable name for association. It should be singular, for example: 'parent'. + + + + + The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + + + + + If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + + + + + + - Specify the extra interfaces that this entity should implement. + The labels for this association. - + - + - Meta attributes are free form key value pairs. + The list of JPA cascade types for the this association. - + - + - This entity's columnConfigs. Note that for entities without inheritance or for entities with a JOIN inheritance strategy, if a column is present in the table's meta data but has no corresponding entityConfig in this list, then an entityConfig is created by default and added automatically to this list. + The 2d level cache configuration for this association. - - - - - - + - List of custom annotations to apply on this entity. + Configure which actions should be generated for this association in the front end layer. - - - - - - + - For example, entityName="BankAccount".
    By default, the entity name is deduced from the table name.
    For example: 'bank_account' will become 'BankAccount';]]>
    + The variable name for the collection. It should be plural, for example: 'children'. Please configure also the elementVar as the singular of this var.
    - + - Allows you to specify the sequence name to use in order to generate this entity pk value. When a sequence name is provided the corresponding @SequenceGenerator and @GeneratedValue annotations are added to the primary key attribute. + The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). - + - The underlying table name for the entity. If not set, inheritance must be configured. + The JPA orphanRemoval for this association. - + - Should this entity be annotated with hibernate search @Indexed annotation? False by default, unless if one columnConfig is marked as indexed. + The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. - + - By convention a table is considered as a many-to-many middle table if it has two foreign keys and no other regular columns. This attribute allows you to consider this table as a middle table, even if it has other regular columns. A regular column is a column that is neither a primary key nor a version (i.e. optimistic lock). + @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> - +
    + + + Allows you to configure Hibernate Search Field annotation. + + + - The comment that will be inserted in this entity's JavaDoc. + The full type of the field bridge implementation to use. When not null it is used by the @FieldBridge annotation. - + + + + + + + + + + + - Example: com.yourcompany]]> + Enable Formatter for all XML generated file. Default to false. Note: currently formatting sort attributes in alphabetical order. This is not convenient for certain tags. - + + + + + + + + + + + + + Meta attributes are free form key value pairs + + + - .domain." instead of ".domain". There is no sub-package by default.]]> + name of you meta attribute - + - The base label for this entity. You may either set it here or in a nested labels/label. + value for this attribute - + + + + - It is pertinent only if this entity's table plays the role of a middle table in a many-to-many association. In that case you can use this parameter to set the many-to-many association direction. + The label's language, for example 'fr'. Leave it null for the base. - + - You can override the default collection type for this entity + The label. It is copied in properties file located in the folder 'src/main/resources/localization/domain'. - + + + Add Hibernate SafeHtml annotation on this field. + + + + + + + + + + + - + - Restrict the generation to the following classTypes + Entry point to extend Celerio engine's Velocity context. Only needed if you develop new Celerio templates. + + + + + List of template packs to execute during the generation. Defaults to the template packs found in the classpath. - + - + - Restrict the generation to the following wellKnownFolders + List of modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - + + + + + + + List of custom modules enabled during the generation. Modules are cross cutting functionalities that span across packs. + + + + + + + + + + Control the generation output by filtering the generated files based on their filename. + + + + - + - Restrict the generation to the following generatedPackages + Control the generation output by filtering the execution of the generation templates based on their filename. - + - - - - - Include a configuration file dedicated to entityConfigs. Use it on large project to split your entityConfigs configuration into smaller pieces. - - - - - The path to a configuration file whose entityConfigs tag will be loaded. The path must be relative to the folder containing the main configuration file. Beware, only the entityConfigs tag will be loaded from this file. For example: includes/ref/country.xml - - - - - - - - - - - - - change the prefix/suffix conventions for a given method - - - - - Example: GET_LOCALIZED]]> - - - - - Example: get]]> - - - - - Example: Localized]]> - - - - - - - - - - - - - Enable Formatter for all XML generated file. Default to false. Note: currently formatting sort attributes in alphabetical order. This is not convenient for certain tags. - - - - - - - - + + + Filter the tables you want to be generated + - + - - - - - Describes all the metadata for a given table - - - + - Describes all the columns metadata for this table + Defines sequence names based on table name - + - + - Describes all the indexes for this table + The list of number mappings. The first match is used. If no match is found, convention applies. - + - + - Describes all the imported keys for this table + The list of date mappings. The first match is used. If no match is found, convention applies. - + - + - Describes all the primary keys for this table + Default Entity 2d level cache configuration. Uses ehcache. To disable default cache annotation generation for entity having no CacheConfig element, simply remove this element. + + + + + Default many-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default one-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default inverse one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default inverse many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + + + + + Configure the java convention such as classnames, packages, methods + + + + + For future use - + + + + Miscellaneous generation configuration + + + + + The JDBC settings enabling Celerio to retrieve your database meta data. + + + + + Restrict the generation to the given elements + + - - - Example: USER]]> - - - + - Type of the table + Choose the default association direction - + - Example: Table containing all the user related information]]> + Example: casino]]> - - - - + - The full qualified custom annotation to apply to this property. For example: @com.mycompany.MyAnnotation(debug = true) + Example: com.mycompany]]> - - - + + + Specify your own file header comments + + + + + Set each line to be added to the header files. + + + + + + + + + - The label's language, for example 'fr'. Leave it null for the base. + Should the header be present in the generated files ? - + - The label. It is copied in properties file located in the folder 'src/main/resources/localization/domain'. + Should the template name be present in the header. This is useful when dealing with large amount of templates and packs for debugging purposes or support information. - + - A pack is the aggregation of templates and static files that produces functionalities. + Entry point to configure an enum generation. - + - Control the generation output by filtering the generated files based on their filename. + Specify the enum constants. - + - + - Control the generation output by filtering the execution of the generation templates based on their filename. + Set comments for this enumeration. - + - Name of the pack + Example: name="CreditCardEnum"]]> - + - Example: src/main/packs/my-own-pack/]]> + Example: com.yourcompany]]> - + - Should this pack be used ? + .domain." instead of ".domain". Same applies for other enum related classes. There is no sub-package by default.]]> - + - Specify the pack order, its main interest is when two packs produce the same artifacts. + The JPA enum type. The CUSTOM type (not a JPA type) allows you to do advanced enum mapping with Jadira or a custom user type. + + + + + Example: name="com.youcompany.hibernate.support.CustomDateUserType"]]> + + + + + + Configuration element for Hibernate/EhCache 2d level cache. + + + + + Hibernate/EhCache CacheConcurrencyStrategy. Use NONE if you do not want any Cache annotation to be set. + + \ No newline at end of file diff --git a/jpa2-backend/src/main/config/maven-celerio-plugin/metadata.xml b/jpa2-backend/src/main/config/maven-celerio-plugin/metadata.xml index 01dba9a..fa9a56b 100644 --- a/jpa2-backend/src/main/config/maven-celerio-plugin/metadata.xml +++ b/jpa2-backend/src/main/config/maven-celerio-plugin/metadata.xml @@ -9,7 +9,7 @@ - + @@ -30,7 +30,7 @@
    - + @@ -47,7 +47,7 @@
    - + @@ -63,7 +63,7 @@
    - + @@ -84,7 +84,7 @@
    - + @@ -98,7 +98,7 @@
    - + @@ -116,7 +116,7 @@
    - + @@ -138,7 +138,7 @@
    - + diff --git a/jpa2-backend/src/main/config/maven-celerio-plugin/nonamespace.xsd b/jpa2-backend/src/main/config/maven-celerio-plugin/nonamespace.xsd index 314437e..fced0e1 100644 --- a/jpa2-backend/src/main/config/maven-celerio-plugin/nonamespace.xsd +++ b/jpa2-backend/src/main/config/maven-celerio-plugin/nonamespace.xsd @@ -1,9 +1,9 @@ - - - - - + + + + + @@ -13,10 +13,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/jpa2-backend/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java b/jpa2-backend/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java index 344565c..f776cf7 100644 --- a/jpa2-backend/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java +++ b/jpa2-backend/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java @@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayList; import static com.jaxio.repository.support.JpaUtil.applyPagination; -import static com.jaxio.repository.support.MetamodelUtil.toAttribute; import java.io.Serializable; import java.lang.reflect.Method; @@ -502,14 +501,14 @@ public void delete(E entity) { List> ret = newArrayList(); for (Method m : type.getMethods()) { if (m.getAnnotation(Field.class) != null) { - ret.add(toAttribute(BeanUtils.findPropertyForMethod(m).getName(), type)); + ret.add(MetamodelUtil.toAttribute(BeanUtils.findPropertyForMethod(m).getName(), type)); } } return ret; } public boolean isIndexed(String property) { - return indexedAttributes.contains(toAttribute(property, type)); + return indexedAttributes.contains(MetamodelUtil.toAttribute(property, type)); } // ----------------- diff --git a/jsf2-spring-conversation/pom.xml b/jsf2-spring-conversation/pom.xml index 38de925..a67b02e 100644 --- a/jsf2-spring-conversation/pom.xml +++ b/jsf2-spring-conversation/pom.xml @@ -46,7 +46,7 @@ ${project.basedir} - 3.0.103 + 3.0.104 4.2.3.Final 3.2.3.RELEASE 3.1.4.RELEASE diff --git a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/celerio.xsd b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/celerio.xsd index fa4c2ed..0f5fd71 100644 --- a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/celerio.xsd +++ b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/celerio.xsd @@ -341,7 +341,78 @@ - + + + + + + + + + + + + + + + + change the prefix/suffix conventions for a given method + + + + + Example: GET_LOCALIZED]]> + + + + + Example: get]]> + + + + + Example: Localized]]> + + + + + + + + Restrict the generation to the following classTypes + + + + + + + + + + Restrict the generation to the following wellKnownFolders + + + + + + + + + + Restrict the generation to the following generatedPackages + + + + + + + + + + + + The ManyToManyConfig allows you to fine tune your @ManyToMany association. The ManyToManyConfig element must be a child of a columnConfig element referencing (i.e foreignkey) the entity that is the target of this @ManyToMany association. The columnConfig necessarily belongs to a 'join entity'. + @@ -370,7 +441,7 @@ - Configure which actions should be generated for this association in the front end layer. + Configure which actions should or should not be generated for this association in the front end layer. @@ -384,11 +455,6 @@ The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). - - - The JPA orphanRemoval for this association. - - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. @@ -399,35 +465,54 @@ @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> - - - - Add Hibernate SafeHtml annotation on this field. - - - - - - - This setting allows you to change the column name that is passed to Celerio to calculate the default field name.
    You can for example remove well known prefix pattern from your column names.]]>
    -
    - - + - The regular expression to apply on the column name. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. - +
    + + + + + + + + + + + + + + - The replacement String. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + The full class name that this entity extends. For example 'com.mycompany.MyClass'. This is taken into account only if the entity is a root entity. - + + + Describes an entity config + + + + The 2d level cache configuration for this entity. + + + + + Free parameters. Not used internally. + + + + + + + - The labels for this association. + The labels for this entity. They appear in the entity properties file located under 'src/main/resources/localization/domain'. @@ -435,420 +520,377 @@ - + - The list of JPA cascade types for the this association. + Inheritance configuration. + + + + + Specify the base class that this entity should extends. Only for root entity. + + + + + Specify the extra interfaces that this entity should implement. - + - + - The 2d level cache configuration for this association. + Meta attributes are free form key value pairs. + + + + + + + + + + This entity's columnConfigs. Note that for entities without inheritance or for entities with a JOIN inheritance strategy, if a column is present in the table's meta data but has no corresponding entityConfig in this list, then an entityConfig is created by default and added automatically to this list. + + + + + - + - Configure which actions should or should not be generated for this association in the front end layer. + List of custom annotations to apply on this entity. + + + + + - + - The variable name for association. It should be singular, for example: 'parent'. + For example, entityName="BankAccount".
    By default, the entity name is deduced from the table name.
    For example: 'bank_account' will become 'BankAccount';]]>
    - + - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + Allows you to specify the sequence name to use in order to generate this entity pk value. When a sequence name is provided the corresponding @SequenceGenerator and @GeneratedValue annotations are added to the primary key attribute. - + - If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + The underlying table name for the entity. If not set, inheritance must be configured. -
    - - - - + - JPA cascade type. Use NONE if you do not want any CascadeType to be set. + Should this entity be annotated with hibernate search @Indexed annotation? False by default, unless if one columnConfig is marked as indexed. - - - - + - Generate code in order to create a new target entity from the source entity main edit page. + By convention a table is considered as a many-to-many middle table if it has two foreign keys and no other regular columns. This attribute allows you to consider this table as a middle table, even if it has other regular columns. A regular column is a column that is neither a primary key nor a version (i.e. optimistic lock). - + - Generate code in order to edit a target entity from the source entity main edit page. + The comment that will be inserted in this entity's JavaDoc. - + - Generate code in order to view a target entity from the source entity main edit page. + Example: com.yourcompany]]> - + - Generate code in order to select an existing target entity from the source entity main edit page. Note: it does not apply to one-to-many association. + .domain." instead of ".domain". There is no sub-package by default.]]> - + - Generate code in order to select an existing target entity, using an autoComplete component, from the source entity main edit page. Note: it does not apply to one-to-many association. + The base label for this entity. You may either set it here or in a nested labels/label. - + - Generate code in order to remove a target entity from the source entity main edit page. + It is pertinent only if this entity's table plays the role of a middle table in a many-to-many association. In that case you can use this parameter to set the many-to-many association direction. + + + + + You can override the default collection type for this entity - + + - A pattern is a structure to help handling inclusion and exclusion of resources + Used to introduce a new 'namer' property on each Celerio's entity context instance. Entity namer properties are convenient when writing template for classes that support entities, for example: Controller, Service, Dao, Validator etc... example: var name is obtained with ${entity.property.var} and has the value "prefixEntityNameSuffix". - + -
  • ? matches one character
  • * matches zero or more characters
  • Some examples:
    • US?R - matches USER but also USOR or USAR etc.
    • TBL_* - matches all tables whose name starts with TBL_, for example TBL_USER
    ]]>
    + The property name.
    - + - The sequence name to use for the entity that is associated with the matching table. You can use the magic '{TABLE_NAME}' token which is replaced with the corresponding table name. For example: SEQ_{TABLE_NAME}. + The root package. Defaults to the globally defined root package. -
    - - - + - The name of the primary key generator to use + The sub package. For example: "security", "web.security". No defaults. - + - The primary key generation strategy that the persistence provider must use to generate the annotated entity primary key. - - - - - - Description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). - - - - - Foreign key column name - - - - - Foreign key name - - - - - Primary key column name being imported + Prefix prepended to the entity name. - + - Primary key table name being imported + Prefix appended to the entity name. - + - - - For large projects, you can split the content of the entityConfigs tag into multiple files and 'include' the files here. - - - - - - - - - - Configure the celerio generator, such as conventions, jdbc connectivity, and other - - - - - Configure the generated entities. - - - - - - - - - - Configure enums that will be used in multiple entities, and referenced by their name in ColumnConfig - + + + - + - - - - - The labels for this attribute. They appear in the entity properties file located under 'src/main/resources/localization/domain'. - - - - - - - - - - For future uses - - - - - - - - - - Specify the enum config to map this column to a Java enum. If this enum is used by other columns, you must declare instead a shared enum and reference it using the sharedEnumName attribute. - - - - - When this element is present, the SafeHtml annotation is added on this field. - - - - - When the column represents a single primary key, you can configure the GeneratedValue JPA annotation here. - - - - - When the column represents a single primary key, you can configure the GenericGenerator JPA annotation here. - - - - - Configure the Hibernate search Field annotation. If present, the field is annotated, if absent it is not. - - - - - List of custom annotations to apply on this property. - - - - - - - - - - - - - - + + + Description of the given table's indices and statistics + + + - References a shared enum name by its name. You cannot have both an enum configuration, and a shared enum name. + Column name - + - The base label for this column. You may either set it here or in a nested labels/label. + Index name - + - If set to true, the column will be ignored. Make sure you do not ignore not null columns. + Can index values be non-unique - + + + + + Override the class conventions such as GeneratedPackage, suffix and prefixes + + + - Override the default JdbcType. + The ClassType to override - + - Force the Java mapped type for this column instead of relying on Celerio's conventions. + Override the prefix for this ClassType - + - @Basic(fetch = FetchType.LAZY) is used. Defaults to 'true' for CLOB, BLOB or BYTES mapped types.]]> + Override the suffix for this ClassType - + - For primary key the field name is always forced to Example: 'first_name' will become 'firstName';]]> + Override the GeneratedPackage for this ClassType - + + + + + + + + + Global rule to map columns whose JDBC TYPE correspond to a number to a Java type. + + + - Allows you to use JPA secondary table if you set a table name that is different from the entity table name. Default to the entity table name. + The mapped type to use when both the column size and decimal digit value fall into the specified ranges. - + - The mandatory column name. + The minimum (inclusive) column size to fall into this mapping range. - + - Override the column size defined in the Metadata. Defaults to the size found when reversing the database schema. + The maximum (exclusive) column size to fall into this mapping range. - + - Minimum length for String. When present it is used in the @Size validation annotation. No default value. + The minimum (inclusive) column decimal digit value to fall into this mapping range. - + - Override the column ordinal position defined in the Metadata. Defaults to the ordinal position found when reversing the database schema. + The maximum (exclusive) column decimal digit value to fall into this mapping range. - + + + + - The order of appearance of this column in forms, from top to bottom and in search results, from left to right. It defaults to the ordinal position. + Generate code in order to create a new target entity from the source entity main edit page. - + - Sets the 'type' attribute passed to the 'org.hibernate.annotations.Type' annotation. By default, no Type annotation is used. + Generate code in order to edit a target entity from the source entity main edit page. - + - Indicates if this property is part of the entity business key. You may set it on several properties at the same time if your business key involves more than one column. If set to true, the property will be used in equals/hashCode methods. As soon as you declare this attribute on a property, convention no longer applies for the entity. + Generate code in order to view a target entity from the source entity main edit page. - + - If set to true, all the annotations for the corresponding getter will be commented and a @Transient annotation will be set.]]> + Generate code in order to select an existing target entity from the source entity main edit page. Note: it does not apply to one-to-many association. - + - Override the comment defined in the Metadata. The comment that will be inserted as JavaDoc in the corresponding getter method. Defaults to the comment found when reversing the database schema. + Generate code in order to select an existing target entity, using an autoComplete component, from the source entity main edit page. Note: it does not apply to one-to-many association. - + - Override the column decimal digits defined in the Metadata. Defaults to the decimal digits found when reversing the database schema. + Generate code in order to remove a target entity from the source entity main edit page. - + + + + A pattern is a structure to help handling inclusion and exclusion of resources + + + - Override the default value defined in the Metadata. Defaults to the default value found when reversing the database schema. +
  • ? matches one character
  • * matches zero or more characters
  • ** matches zero or more 'directories' in a path
  • Some examples:
    • com/t?st.jsp - matches com/test.jsp but also com/tast.jsp or com/txst.jsp
    • com/yourcompany/**\/*.jsp - matches all .jsp files in the com/yourcompany directory
    ]]>
    - + - Indicates whether the possible values held by this column are used as keys to resolve the associated localized values. + True is is an inclusion pattern, false for an exclusion ? - +
    + + + Description of the primary key columns that are referenced by a table's foreign key columns (the primary keys imported by a table). + + + - Does this column contain html? When true, some special escaping on the front is performed. + Foreign key column name - + - If this column represents a foreign key that points to the target of a ManyToMany association it can be set to true to change the default inverse side of the ManyToMany association. By convention, the column with the highest ordinal position refers to the inverse side. + Foreign key name - + - If this column represents an importedKey, should it be bidirectionnal or unidirectionnal + Primary key column name being imported - - - If this column represents an importedKey, and the column is unique, should the one to one be handled via a collection ? - - - - - Override the autoIncrement value defined in the Metadata. You should use it only in case your driver is unable to determine whether the primary key is auto incremented or not. - - - - - Override the nullable value defined in the Metadata. Defaults to the nullable value found when reversing the database schema. - - - - - Should this column appear in edit form? By default, most columns appear in the edit form. Note that this configuration is taken into account only if at least one of the entity's columnConfig formField attribute (could be this one) is set to true. - - - - - Should this column appear in search form? - - - - - Should this column appear in search results? - - - + - Should this column be part of the label representation + Primary key table name being imported - + + + + A pack is the aggregation of templates and static files that produces functionalities. + + + + + Control the generation output by filtering the generated files based on their filename. + + + + + + + + + + Control the generation output by filtering the execution of the generation templates based on their filename. + + + + + + + + + - Override the uniqueness defined in the indexes from the metadata. + Name of the pack - + - Should this column be visible to the users ? + Example: src/main/packs/my-own-pack/]]> - + - Should this column be used to provide optimistic locking? If true, this column will be mapped with a @Version annotation providing the mapped type is compatible with @Version expected type. Defaults to true if the fieldName is "version" and if the mapped type is compatible with @Version. + Should this pack be used ? - + - If you use a legacy database schema that does not declare foreign keys, you can manually set the target table name. If you do, you may also need to set the targetColumnName. This attribute is not taken into account if a foreign key is already declared in your schema. + Specify the pack order, its main interest is when two packs produce the same artifacts. - + + + + Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + + + - Once you have set the targetTableName, you can adjust the targetColumnName if it is different from the primaryKey column. Defaults to the targetTableName's primary key column. + The Hibernate type to use for Joda LocalDate. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDate". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDate" if you use hibernate 3. - + - Should this column be considered as storing a password ? This will impact input types attribute on the web tier. + The Hibernate type to use for Joda LocalDateTime. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDateTime" if you use hibernate 3. @@ -901,367 +943,495 @@
    - - - The ManyToManyConfig allows you to fine tune your @ManyToMany association. The ManyToManyConfig element must be a child of a columnConfig element referencing (i.e foreignkey) the entity that is the target of this @ManyToMany association. The columnConfig necessarily belongs to a 'join entity'. - + - + - The labels for this association. + Set comments for this enum value. - + - + - The list of JPA cascade types for the this association. + The labels for this enum value. They appear in the enum properties file located under 'src/main/resources/localization/domain'. - + - - - The 2d level cache configuration for this association. - - - - - Configure which actions should or should not be generated for this association in the front end layer. - - - + - The variable name for the collection. It should be plural, for example: 'children'. Please configure also the elementVar as the singular of this var. + The enum constant that defines an instance of the enum type. Example: For a Civility enum, this could be MISS or MISTER. - + - The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). + The value really stored in the database. Only applies if the enumConfig's type is CUSTOM. Note that the mapping leverages Jadira as it is not supported natively by JPA. - + - The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + The base label for this enum value. You may either set it here or in a nested labels/label. - + + + + + + For large projects, you can split the content of the entityConfigs tag into multiple files and 'include' the files here. + + + + + + + + + + Configure the celerio generator, such as conventions, jdbc connectivity, and other + + + + + Configure the generated entities. + + + + + + + + + + Configure enums that will be used in multiple entities, and referenced by their name in ColumnConfig + + + + + + + + + + + + Describes all the metadata for a given table + + + + + Describes all the columns metadata for this table + + + + + + + + + + Describes all the indexes for this table + + + + + + + + + + Describes all the imported keys for this table + + + + + + + + + + Describes all the primary keys for this table + + + + + + + + + - @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> + Example: USER]]> - + - If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + Type of the table - - - - Allows you to configure Hibernate Search Field annotation. - - - + - The full type of the field bridge implementation to use. When not null it is used by the @FieldBridge annotation. + Example: Table containing all the user related information]]> - - - - - - - - - - Information about the database where celerio extracted the metadata - - - - - - - - - - - - - - - + + + + + The labels for this attribute. They appear in the entity properties file located under 'src/main/resources/localization/domain'. + + + + + + + + + + For future uses + + + + + + + + + + Specify the enum config to map this column to a Java enum. If this enum is used by other columns, you must declare instead a shared enum and reference it using the sharedEnumName attribute. + + + + + When this element is present, the SafeHtml annotation is added on this field. + + + + + When the column represents a single primary key, you can configure the GeneratedValue JPA annotation here. + + + + + When the column represents a single primary key, you can configure the GenericGenerator JPA annotation here. + + + + + Configure the Hibernate search Field annotation. If present, the field is annotated, if absent it is not. + + + + + List of custom annotations to apply on this property. + + + + + + + + + + + + + + - The full class name that this entity extends. For example 'com.mycompany.MyClass'. This is taken into account only if the entity is a root entity. + References a shared enum name by its name. You cannot have both an enum configuration, and a shared enum name. + + + + + The base label for this column. You may either set it here or in a nested labels/label. + + + + + If set to true, the column will be ignored. Make sure you do not ignore not null columns. + + + + + Override the default JdbcType. - - - - Global rule to map columns whose JDBC TYPE correspond to a number to a Java type. - - - The mapped type to use when both the column size and decimal digit value fall into the specified ranges. + Force the Java mapped type for this column instead of relying on Celerio's conventions. - + - The minimum (inclusive) column size to fall into this mapping range. + @Basic(fetch = FetchType.LAZY) is used. Defaults to 'true' for CLOB, BLOB or BYTES mapped types.]]> - + - The maximum (exclusive) column size to fall into this mapping range. + For primary key the field name is always forced to Example: 'first_name' will become 'firstName';]]> - + - The minimum (inclusive) column decimal digit value to fall into this mapping range. + Allows you to use JPA secondary table if you set a table name that is different from the entity table name. Default to the entity table name. - + - The maximum (exclusive) column decimal digit value to fall into this mapping range. + The mandatory column name. - - - - A pattern is a structure to help handling inclusion and exclusion of resources - - - + -
  • ? matches one character
  • * matches zero or more characters
  • ** matches zero or more 'directories' in a path
  • Some examples:
    • com/t?st.jsp - matches com/test.jsp but also com/tast.jsp or com/txst.jsp
    • com/yourcompany/**\/*.jsp - matches all .jsp files in the com/yourcompany directory
    ]]>
    + Override the column size defined in the Metadata. Defaults to the size found when reversing the database schema.
    - + - True is is an inclusion pattern, false for an exclusion ? + Minimum length for String. When present it is used in the @Size validation annotation. No default value. -
    - - - - - - Table types to retrieve - - - - - - - - - + - Example: org.h2.Driver]]> + Override the column ordinal position defined in the Metadata. Defaults to the ordinal position found when reversing the database schema. - + - Example: Jdbc:h2:~/mydatabase]]> + The order of appearance of this column in forms, from top to bottom and in search results, from left to right. It defaults to the ordinal position. - + - Example: myuser]]> + Sets the 'type' attribute passed to the 'org.hibernate.annotations.Type' annotation. By default, no Type annotation is used. - + - Example: mypassword]]> + Indicates if this property is part of the entity business key. You may set it on several properties at the same time if your business key involves more than one column. If set to true, the property will be used in equals/hashCode methods. As soon as you declare this attribute on a property, convention no longer applies for the entity. - - + - Example: PROJECT_%]]> + If set to true, all the annotations for the corresponding getter will be commented and a @Transient annotation will be set.]]> - + - Should Celerio retrieve remarks on oracle, beware this is a very time consuming operation + Override the comment defined in the Metadata. The comment that will be inserted as JavaDoc in the corresponding getter method. Defaults to the comment found when reversing the database schema. - + - Should Celerio retrieve synonyms on oracle + Override the column decimal digits defined in the Metadata. Defaults to the decimal digits found when reversing the database schema. - + - When false, no indexes is reversed at all. + Override the default value defined in the Metadata. Defaults to the default value found when reversing the database schema. - + - when true, reverse only indexes for unique values; when false, reverse indexes regardless of whether unique or not. + Indicates whether the possible values held by this column are used as keys to resolve the associated localized values. - + - "" retrieves those without a catalog
    empty means that the catalog name should not be used to narrow the search]]>
    + Does this column contain html? When true, some special escaping on the front is performed. +
    +
    + + + If this column represents a foreign key that points to the target of a ManyToMany association it can be set to true to change the default inverse side of the ManyToMany association. By convention, the column with the highest ordinal position refers to the inverse side. + + + + + If this column represents an importedKey, should it be bidirectionnal or unidirectionnal + + + + + If this column represents an importedKey, and the column is unique, should the one to one be handled via a collection ? + + + + + Override the autoIncrement value defined in the Metadata. You should use it only in case your driver is unable to determine whether the primary key is auto incremented or not. + + + + + Override the nullable value defined in the Metadata. Defaults to the nullable value found when reversing the database schema. + + + + + Should this column appear in edit form? By default, most columns appear in the edit form. Note that this configuration is taken into account only if at least one of the entity's columnConfig formField attribute (could be this one) is set to true. + + + + + Should this column appear in search form? + + + + + Should this column appear in search results? + + + + + Should this column be part of the label representation + + + + + Override the uniqueness defined in the indexes from the metadata. + + + + + Should this column be visible to the users ? + + + + + Should this column be used to provide optimistic locking? If true, this column will be mapped with a @Version annotation providing the mapped type is compatible with @Version expected type. Defaults to true if the fieldName is "version" and if the mapped type is compatible with @Version. + + + + + If you use a legacy database schema that does not declare foreign keys, you can manually set the target table name. If you do, you may also need to set the targetColumnName. This attribute is not taken into account if a foreign key is already declared in your schema. + + + + + Once you have set the targetTableName, you can adjust the targetColumnName if it is different from the primaryKey column. Defaults to the targetTableName's primary key column. + + + + + Should this column be considered as storing a password ? This will impact input types attribute on the web tier.
    - - - - - Entry point to extend Celerio engine's Velocity context. Only needed if you develop new Celerio templates. - - - - - List of template packs to execute during the generation. Defaults to the template packs found in the classpath. - - - - - - - - - - List of modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - - - - - - - - - - List of custom modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - - - - - - - - - - Control the generation output by filtering the generated files based on their filename. - - - - - - - - - - Control the generation output by filtering the execution of the generation templates based on their filename. - - - - - - - - - - Filter the tables you want to be generated - - - - - - - - - - Defines sequence names based on table name - - - - - - - - - - The list of number mappings. The first match is used. If no match is found, convention applies. - - - - - - - - + + + Override the convention for a given GeneratedPackage + + + + + The GeneratedPackage to override + + + + + Example: com.yourcompany]]> + + + + + Example: my.subpackage]]> + + + + + + + + JPA cascade type. Use NONE if you do not want any CascadeType to be set. + + + + + + Information about the database where celerio extracted the metadata + + + + + + + + + + + + + + + Include a configuration file dedicated to entityConfigs. Use it on large project to split your entityConfigs configuration into smaller pieces. + + + + + The path to a configuration file whose entityConfigs tag will be loaded. The path must be relative to the folder containing the main configuration file. Beware, only the entityConfigs tag will be loaded from this file. For example: includes/ref/country.xml + + + + + + + + The full interface name that this entity implements. For example 'com.mycompany.MyInterface' + + + + + + This setting allows you to change the column name that is passed to Celerio to calculate the default field name.
    You can for example remove well known prefix pattern from your column names.]]>
    +
    + + + + The regular expression to apply on the column name. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + + + + + The replacement String. For example, assuming you want to remove from all column names the prefix string that consists of 3 chars and a '_', you can use 'regexp="^.{3}_" replace=""' or 'regexp="^qrtz_" replace="Quartz_"' + + +
    + + + + + The full qualified custom annotation to apply to this property. For example: @com.mycompany.MyAnnotation(debug = true) + + + + + + Configuration of a column, the data reflect the jdbc metadata + + + - The list of date mappings. The first match is used. If no match is found, convention applies. + Enum values if the column represents an enum - + - - - Default Entity 2d level cache configuration. Uses ehcache. To disable default cache annotation generation for entity having no CacheConfig element, simply remove this element. - - - - - Default many-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default one-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default inverse one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Default inverse many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. - - - - - Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. - - - - - Configure the java convention such as classnames, packages, methods - - - For future use + Enum values if the column represents an enum @@ -1269,196 +1439,128 @@ - - - Miscellaneous generation configuration - - - - - The JDBC settings enabling Celerio to retrieve your database meta data. - - - - - Restrict the generation to the given elements - - - + - Choose the default association direction + Column name - + - Example: casino]]> + Default value - + - Example: com.mycompany]]> + The number of fractional digits - - - - Description of the given table's indices and statistics - - - + - Column name + Is Auto Increment? - + - Index name + Is NULL allowed ? - + - Can index values be non-unique + Index of column in table (starting at 1) - - - - - - - - - - - - - - - - - Configuration element for Hibernate/EhCache 2d level cache. - - - + - Hibernate/EhCache CacheConcurrencyStrategy. Use NONE if you do not want any Cache annotation to be set. + Comment describing the column + + + + + Column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision. + + + + + This column jdbc type - - - - - Specify your own file header comments - + - + - Set each line to be added to the header files. + Table types to retrieve - + - + - Should the header be present in the generated files ? + Example: org.h2.Driver]]> - + - Should the template name be present in the header. This is useful when dealing with large amount of templates and packs for debugging purposes or support information. + Example: Jdbc:h2:~/mydatabase]]> - - - - - - - - - - Used to introduce a new 'namer' property on each Celerio's entity context instance. Entity namer properties are convenient when writing template for classes that support entities, for example: Controller, Service, Dao, Validator etc... example: var name is obtained with ${entity.property.var} and has the value "prefixEntityNameSuffix". - - - + - The property name. + Example: myuser]]> - + - The root package. Defaults to the globally defined root package. + Example: mypassword]]> - + + - The sub package. For example: "security", "web.security". No defaults. + Example: PROJECT_%]]> - + - Prefix prepended to the entity name. + Should Celerio retrieve remarks on oracle, beware this is a very time consuming operation - + - Prefix appended to the entity name. + Should Celerio retrieve synonyms on oracle - - - - Override the convention for a given GeneratedPackage - - - + - The GeneratedPackage to override + When false, no indexes is reversed at all. - + - Example: com.yourcompany]]> + when true, reverse only indexes for unique values; when false, reverse indexes regardless of whether unique or not. - + - Example: my.subpackage]]> + "" retrieves those without a catalog
    empty means that the catalog name should not be used to narrow the search]]>
    - - - - - - - - - - - - - - - - Meta attributes are free form key value pairs - + - + - name of you meta attribute + The name of the primary key generator to use - + - value for this attribute + The primary key generation strategy that the persistence provider must use to generate the annotated entity primary key. @@ -1554,625 +1656,523 @@
    - - - Override the class conventions such as GeneratedPackage, suffix and prefixes - - - - - The ClassType to override - - - - - Override the prefix for this ClassType - - - - - Override the suffix for this ClassType - - - - - Override the GeneratedPackage for this ClassType - - - - - - change the convention for a given well known folder - - - - - WellKnownFolder to override - - - - - Override the folder for this WellKnownFolder - - - - - Override the generated folder for this WellKnownFolder - - - - - - Entry point to configure an enum generation. - - - - - Specify the enum constants. - - - - - - - - - - Set comments for this enumeration. - - - - - - - - - - - Example: name="CreditCardEnum"]]> - - - - - Example: com.yourcompany]]> - - - - - .domain." instead of ".domain". Same applies for other enum related classes. There is no sub-package by default.]]> - - - - - The JPA enum type. The CUSTOM type (not a JPA type) allows you to do advanced enum mapping with Jadira or a custom user type. - - - - - Example: name="com.youcompany.hibernate.support.CustomDateUserType"]]> - - - - Global rule to map columns whose JDBC TYPE is DATE, TIME or TIMESTAMP to a Java type. - - - - - The mapped type to use when both the jdbcType and the columnNamePattern matches what is expected. - - - - - Only column with this JdbcType are concerned by this mapping. Accepted JdbcType are DATE, TIME, TIMESTAMP. When set to null, we assume the column JdbcType may be DATE, TIME, or TIMESTAMP. - - - - - An optional regular expression to restrict the mapping by column name. The matching is case insensitive. - - - - - - - - Set comments for this enum value. - - - - - - - - - - The labels for this enum value. They appear in the enum properties file located under 'src/main/resources/localization/domain'. - - - - - - - - - - - The enum constant that defines an instance of the enum type. Example: For a Civility enum, this could be MISS or MISTER. - - - - - The value really stored in the database. Only applies if the enumConfig's type is CUSTOM. Note that the mapping leverages Jadira as it is not supported natively by JPA. - - - - - The base label for this enum value. You may either set it here or in a nested labels/label. - - - - - - Configuration of a column, the data reflect the jdbc metadata - - - - - Enum values if the column represents an enum - - - - - - - - - - Enum values if the column represents an enum - - - - - - - - - - - Column name - - - - - Default value - - - - - The number of fractional digits - - - - - Is Auto Increment? - - - + Global rule to map columns whose JDBC TYPE is DATE, TIME or TIMESTAMP to a Java type. + + + - Is NULL allowed ? + The mapped type to use when both the jdbcType and the columnNamePattern matches what is expected. - + - Index of column in table (starting at 1) + Only column with this JdbcType are concerned by this mapping. Accepted JdbcType are DATE, TIME, TIMESTAMP. When set to null, we assume the column JdbcType may be DATE, TIME, or TIMESTAMP. - + - Comment describing the column + An optional regular expression to restrict the mapping by column name. The matching is case insensitive. - + + + + A pattern is a structure to help handling inclusion and exclusion of resources + + + - Column size. For char or date types this is the maximum number of characters, for numeric or decimal types this is precision. +
  • ? matches one character
  • * matches zero or more characters
  • Some examples:
    • US?R - matches USER but also USOR or USAR etc.
    • TBL_* - matches all tables whose name starts with TBL_, for example TBL_USER
    ]]>
    - + - This column jdbc type + The sequence name to use for the entity that is associated with the matching table. You can use the magic '{TABLE_NAME}' token which is replaced with the corresponding table name. For example: SEQ_{TABLE_NAME}.
    - + - Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + change the convention for a given well known folder - + - The Hibernate type to use for Joda LocalDate. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDate". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDate" if you use hibernate 3. + WellKnownFolder to override - + - The Hibernate type to use for Joda LocalDateTime. Defaults to "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime". You may set it instead to "org.joda.time.contrib.hibernate.PersistentLocalDateTime" if you use hibernate 3. + Override the folder for this WellKnownFolder - - - - + - The full interface name that this entity implements. For example 'com.mycompany.MyInterface' + Override the generated folder for this WellKnownFolder - - - Describes an entity config - + - - - The 2d level cache configuration for this entity. - - - + - Free parameters. Not used internally. + The labels for this association. - + - + - The labels for this entity. They appear in the entity properties file located under 'src/main/resources/localization/domain'. + The list of JPA cascade types for the this association. - + - + - Inheritance configuration. + The 2d level cache configuration for this association. - + - Specify the base class that this entity should extends. Only for root entity. + Configure which actions should or should not be generated for this association in the front end layer. - + + + + The variable name for association. It should be singular, for example: 'parent'. + + + + + The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. + + + + + If the target entity is part of a SINGLE_TABLE inheritance hierarchy, you must set name of the target entity as Celerio cannot guess it. + + + + + + - Specify the extra interfaces that this entity should implement. + The labels for this association. - + - + - Meta attributes are free form key value pairs. + The list of JPA cascade types for the this association. - + - + - This entity's columnConfigs. Note that for entities without inheritance or for entities with a JOIN inheritance strategy, if a column is present in the table's meta data but has no corresponding entityConfig in this list, then an entityConfig is created by default and added automatically to this list. + The 2d level cache configuration for this association. - - - - - - + - List of custom annotations to apply on this entity. + Configure which actions should be generated for this association in the front end layer. - - - - - - + - For example, entityName="BankAccount".
    By default, the entity name is deduced from the table name.
    For example: 'bank_account' will become 'BankAccount';]]>
    + The variable name for the collection. It should be plural, for example: 'children'. Please configure also the elementVar as the singular of this var.
    - + - Allows you to specify the sequence name to use in order to generate this entity pk value. When a sequence name is provided the corresponding @SequenceGenerator and @GeneratedValue annotations are added to the primary key attribute. + The variable name for an element of the collection. For example, if the variable name for the collection is 'children', the elementVar should be child. This elementVar will be used to generate convenient methods for the collection, such as an adder method addChild(YourType child). - + - The underlying table name for the entity. If not set, inheritance must be configured. + The JPA orphanRemoval for this association. - + - Should this entity be annotated with hibernate search @Indexed annotation? False by default, unless if one columnConfig is marked as indexed. + The JPA fetch type for this association. Use NONE if you do not want any fetchType to be set. - + - By convention a table is considered as a many-to-many middle table if it has two foreign keys and no other regular columns. This attribute allows you to consider this table as a middle table, even if it has other regular columns. A regular column is a column that is neither a primary key nor a version (i.e. optimistic lock). + @OrderBy annotation is used. Example: orderBy="birthdate DESC" will generate]]> - +
    + + + Allows you to configure Hibernate Search Field annotation. + + + - The comment that will be inserted in this entity's JavaDoc. + The full type of the field bridge implementation to use. When not null it is used by the @FieldBridge annotation. - + + + + + + + + + + + - Example: com.yourcompany]]> + Enable Formatter for all XML generated file. Default to false. Note: currently formatting sort attributes in alphabetical order. This is not convenient for certain tags. - + + + + + + + + + + + + + Meta attributes are free form key value pairs + + + - .domain." instead of ".domain". There is no sub-package by default.]]> + name of you meta attribute - + - The base label for this entity. You may either set it here or in a nested labels/label. + value for this attribute - + + + + - It is pertinent only if this entity's table plays the role of a middle table in a many-to-many association. In that case you can use this parameter to set the many-to-many association direction. + The label's language, for example 'fr'. Leave it null for the base. - + - You can override the default collection type for this entity + The label. It is copied in properties file located in the folder 'src/main/resources/localization/domain'. - + + + Add Hibernate SafeHtml annotation on this field. + + + + + + + + + + + - + - Restrict the generation to the following classTypes + Entry point to extend Celerio engine's Velocity context. Only needed if you develop new Celerio templates. + + + + + List of template packs to execute during the generation. Defaults to the template packs found in the classpath. - + - + - Restrict the generation to the following wellKnownFolders + List of modules enabled during the generation. Modules are cross cutting functionalities that span across packs. - + + + + + + + List of custom modules enabled during the generation. Modules are cross cutting functionalities that span across packs. + + + + + + + + + + Control the generation output by filtering the generated files based on their filename. + + + + - + - Restrict the generation to the following generatedPackages + Control the generation output by filtering the execution of the generation templates based on their filename. - + - - - - - Include a configuration file dedicated to entityConfigs. Use it on large project to split your entityConfigs configuration into smaller pieces. - - - - - The path to a configuration file whose entityConfigs tag will be loaded. The path must be relative to the folder containing the main configuration file. Beware, only the entityConfigs tag will be loaded from this file. For example: includes/ref/country.xml - - - - - - - - - - - - - change the prefix/suffix conventions for a given method - - - - - Example: GET_LOCALIZED]]> - - - - - Example: get]]> - - - - - Example: Localized]]> - - - - - - - - - - - - - Enable Formatter for all XML generated file. Default to false. Note: currently formatting sort attributes in alphabetical order. This is not convenient for certain tags. - - - - - - - - + + + Filter the tables you want to be generated + - + - - - - - Describes all the metadata for a given table - - - + - Describes all the columns metadata for this table + Defines sequence names based on table name - + - + - Describes all the indexes for this table + The list of number mappings. The first match is used. If no match is found, convention applies. - + - + - Describes all the imported keys for this table + The list of date mappings. The first match is used. If no match is found, convention applies. - + - + - Describes all the primary keys for this table + Default Entity 2d level cache configuration. Uses ehcache. To disable default cache annotation generation for entity having no CacheConfig element, simply remove this element. + + + + + Default many-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default one-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default inverse one-to-one configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Default inverse many-to-many configuration allowing you to configure FetchType, Cascade and Cache globally. + + + + + Configure the Hibernate type to use when mapping an attribute whose type is LocalDate or LocalDateTime. + + + + + Configure the java convention such as classnames, packages, methods + + + + + For future use - + + + + Miscellaneous generation configuration + + + + + The JDBC settings enabling Celerio to retrieve your database meta data. + + + + + Restrict the generation to the given elements + + - - - Example: USER]]> - - - + - Type of the table + Choose the default association direction - + - Example: Table containing all the user related information]]> + Example: casino]]> - - - - + - The full qualified custom annotation to apply to this property. For example: @com.mycompany.MyAnnotation(debug = true) + Example: com.mycompany]]> - - - + + + Specify your own file header comments + + + + + Set each line to be added to the header files. + + + + + + + + + - The label's language, for example 'fr'. Leave it null for the base. + Should the header be present in the generated files ? - + - The label. It is copied in properties file located in the folder 'src/main/resources/localization/domain'. + Should the template name be present in the header. This is useful when dealing with large amount of templates and packs for debugging purposes or support information. - + - A pack is the aggregation of templates and static files that produces functionalities. + Entry point to configure an enum generation. - + - Control the generation output by filtering the generated files based on their filename. + Specify the enum constants. - + - + - Control the generation output by filtering the execution of the generation templates based on their filename. + Set comments for this enumeration. - + - Name of the pack + Example: name="CreditCardEnum"]]> - + - Example: src/main/packs/my-own-pack/]]> + Example: com.yourcompany]]> - + - Should this pack be used ? + .domain." instead of ".domain". Same applies for other enum related classes. There is no sub-package by default.]]> - + - Specify the pack order, its main interest is when two packs produce the same artifacts. + The JPA enum type. The CUSTOM type (not a JPA type) allows you to do advanced enum mapping with Jadira or a custom user type. + + + + + Example: name="com.youcompany.hibernate.support.CustomDateUserType"]]> + + + + + + Configuration element for Hibernate/EhCache 2d level cache. + + + + + Hibernate/EhCache CacheConcurrencyStrategy. Use NONE if you do not want any Cache annotation to be set. + + \ No newline at end of file diff --git a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/metadata.xml b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/metadata.xml index 8643a05..5481aaf 100644 --- a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/metadata.xml +++ b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/metadata.xml @@ -9,7 +9,7 @@
    - + @@ -30,7 +30,7 @@
    - + @@ -47,7 +47,7 @@
    - + @@ -63,7 +63,7 @@
    - + @@ -84,7 +84,7 @@
    - + @@ -98,7 +98,7 @@
    - + @@ -116,7 +116,7 @@
    - + @@ -138,7 +138,7 @@
    - + diff --git a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/nonamespace.xsd b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/nonamespace.xsd index 314437e..fced0e1 100644 --- a/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/nonamespace.xsd +++ b/jsf2-spring-conversation/src/main/config/maven-celerio-plugin/nonamespace.xsd @@ -1,9 +1,9 @@ - - - - - + + + + + @@ -13,10 +13,10 @@ - - - - - + + + + + \ No newline at end of file diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java index 344565c..f776cf7 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/repository/support/GenericRepository.java @@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.collect.Lists.newArrayList; import static com.jaxio.repository.support.JpaUtil.applyPagination; -import static com.jaxio.repository.support.MetamodelUtil.toAttribute; import java.io.Serializable; import java.lang.reflect.Method; @@ -502,14 +501,14 @@ public void delete(E entity) { List> ret = newArrayList(); for (Method m : type.getMethods()) { if (m.getAnnotation(Field.class) != null) { - ret.add(toAttribute(BeanUtils.findPropertyForMethod(m).getName(), type)); + ret.add(MetamodelUtil.toAttribute(BeanUtils.findPropertyForMethod(m).getName(), type)); } } return ret; } public boolean isIndexed(String property) { - return indexedAttributes.contains(toAttribute(property, type)); + return indexedAttributes.contains(MetamodelUtil.toAttribute(property, type)); } // ----------------- diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AccountExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AccountExcelExporter.java index 5478dc8..33a1738 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AccountExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AccountExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Account}. - * It exposes a {@link Account} instance so it can be used in search by-example-query. + * Exports to excel document {@link Account} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AddressExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AddressExcelExporter.java index 6cf0451..f4f5818 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AddressExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/AddressExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Address}. - * It exposes a {@link Address} instance so it can be used in search by-example-query. + * Exports to excel document {@link Address} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CurrencyExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CurrencyExcelExporter.java index 1e8e3cb..bcc7370 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CurrencyExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CurrencyExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Currency}. - * It exposes a {@link Currency} instance so it can be used in search by-example-query. + * Exports to excel document {@link Currency} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CustomerExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CustomerExcelExporter.java index c05c503..c18181b 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CustomerExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/CustomerExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Customer}. - * It exposes a {@link Customer} instance so it can be used in search by-example-query. + * Exports to excel document {@link Customer} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/RoleExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/RoleExcelExporter.java index 3ac7ee7..9813b1d 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/RoleExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/RoleExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Role}. - * It exposes a {@link Role} instance so it can be used in search by-example-query. + * Exports to excel document {@link Role} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/SavedSearchExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/SavedSearchExcelExporter.java index efec9dd..99811ae 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/SavedSearchExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/SavedSearchExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link SavedSearch}. - * It exposes a {@link SavedSearch} instance so it can be used in search by-example-query. + * Exports to excel document {@link SavedSearch} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/TransactionExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/TransactionExcelExporter.java index 694bfc4..b2157a8 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/TransactionExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/TransactionExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link Transaction}. - * It exposes a {@link Transaction} instance so it can be used in search by-example-query. + * Exports to excel document {@link Transaction} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/UserExcelExporter.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/UserExcelExporter.java index 99ce851..ba5f203 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/UserExcelExporter.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/UserExcelExporter.java @@ -18,8 +18,7 @@ import com.jaxio.web.faces.ConversationContextScoped; /** - * View Helper to search {@link User}. - * It exposes a {@link User} instance so it can be used in search by-example-query. + * Exports to excel document {@link User} search criteria and result. */ @Named @ConversationContextScoped diff --git a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/support/GenericController.java b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/support/GenericController.java index c7d9017..e9ee428 100644 --- a/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/support/GenericController.java +++ b/jsf2-spring-conversation/src/main/generated-java/com/jaxio/web/domain/support/GenericController.java @@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Throwables.propagate; import static com.google.common.collect.Lists.newArrayList; -import static com.jaxio.repository.support.MetamodelUtil.toAttribute; import static com.jaxio.web.conversation.ConversationHolder.getCurrentConversation; import static org.apache.commons.lang.StringUtils.isBlank; @@ -33,6 +32,7 @@ import com.jaxio.printer.support.TypeAwarePrinter; import com.jaxio.repository.support.GenericRepository; import com.jaxio.repository.support.JpaUniqueUtil; +import com.jaxio.repository.support.MetamodelUtil; import com.jaxio.repository.support.SearchParameters; import com.jaxio.repository.support.TermSelector; import com.jaxio.web.conversation.ConversationCallBack; @@ -150,7 +150,7 @@ public List complete(String value) { E template = repository.getNew(); for (String property : completeProperties()) { if (repository.isIndexed(property)) { - TermSelector termSelector = new TermSelector(toAttribute(property, repository.getType())); + TermSelector termSelector = new TermSelector(MetamodelUtil.toAttribute(property, repository.getType())); termSelector.setSelected(value); searchParameters.addTerm(termSelector); } else { @@ -200,7 +200,7 @@ public List completeProperty(String toMatch, String property, Integer ma private List completePropertyUsingFullText(String term, String property, Integer maxResults) { try { SearchParameters searchParameters = new SearchParameters().limitBroadSearch().distinct(); - TermSelector termSelector = new TermSelector(toAttribute(property, repository.getType())); + TermSelector termSelector = new TermSelector(MetamodelUtil.toAttribute(property, repository.getType())); termSelector.setSelected(term); searchParameters.addTerm(termSelector); if (maxResults != null) { diff --git a/produce.sh b/produce.sh index 73f24f2..08cf913 100755 --- a/produce.sh +++ b/produce.sh @@ -1,6 +1,6 @@ #!/bin/bash git checkout master -for release in {103..103} +for release in {104..104} do version=3.0.${release} @@ -25,5 +25,5 @@ do git add . --a git commit -m "generated with Celerio v${version} - http://www.springfuse.com/" git tag ${version} -git checkout master +#git checkout master done;