AndroMDA Hibernate Cartridge Namespace Components

  • cartridge
  • metafacades
  • profile

AndroMDA Hibernate Cartridge Namespace Properties

entities(Back to Outlets)
Required property
No default value available
The directory to which hibernate entities are generated. Please NOTE that the entity implementation classes will also be generated to this location when no operations are present on the entity with instance scope.
entity-impls(Back to Outlets)
Required property
No default value available
The location to which hibernate entity implementation files are generated. Please NOTE that the entity implementation classes will be generated to the entities outlet when no operations are present on the entity with instance scope.
entity-mappings(Back to Outlets)
Required property
No default value available
The location to which hibernate entity mapping files are generated, these are the ones with the .hbm.xml extension.
user-types(Back to Outlets)
Required property
No default value available
The location to which hibernate enumeration user-types are generated. This includes String CLOB, BLOB and enumeration user-types.
session-beans(Back to Outlets)
Optional property
No default value available
The directory to which Session EJB service wrappers are generated. If this property is not specified, Session EJB service wrappers will not be generated.
session-impls(Back to Outlets)
Optional property
No default value available
The directory to which Session Bean implementation files are generated.
configuration(Back to Outlets)
Optional property
No default value available
The directory to which the hibernate.cfg.xml file is generated.
test-configuration(Back to Outlets)
Optional property
No default value available
The location where manual session bean and entity test resources such as persistence.xml and log4j.xml are generated. These will not be regenerated and may require user intervention.
cache(Back to Outlets)
Optional property
No default value available
The directory to which the ehcache.xml file is generated.
hibernateEnableCache(Back to Caching)
Optional property
Default value: false
Enable/disable hibernate's second level cache features for the cartridge.
hibernateEnableDistributedCache(Back to Caching)
Optional property
Default value: false
If this property is set to true, distributed caching will be enabled. To enable distributed caching for an entity, you must set this property to true AND tag the entity using the tagged value andromda_hibernate_entity_cache_distributed tagged value.
  • true
  • false
hibernateDistributedCacheMulticastPort(Back to Caching)
Optional property
Default value: 4446
The multicast port to be used for multicast group communication when using a distributed cache provider (see hibernateEnableDistributedCache).
hibernateDistributedCacheMulticastAddress(Back to Caching)
Optional property
Default value: 230.0.0.1
The address to be used for multicast group communication when using a distributed cache provider (see hibernateEnableDistributedCache).
hibernateDistributedCacheSocketTimeout(Back to Caching)
Optional property
Default value: 2000
The number of seconds client sockets will wait when sending messages to this listener until they give up.
hibernateEntityCache(Back to Caching)
Optional property
Default value: read-write
Defines the default strategy for Entities caching. Can be overwritten using the corresponding tagged value. Possible values are:
  • read-write
  • nonstrict-read-write
  • read-only
hibernateAssociationCache(Back to Caching)
Optional property
Default value: read-write
Defines the default strategy for associations between Entities caching. Can be overwritten with the corresponding tagged value. Possible values are:
  • read-write
  • nonstrict-read-write
  • read-only
hibernateUseQueryCache(Back to Caching)
Optional property
Default value: false
The default query cache usage. Can be overwritten using andromda_hibernate_query_useCache. Possible values are:
  • true
  • false
hibernateEnableAssociationsCache(Back to Caching)
Optional property
Default value: false
Enable/disable Hibernate's second level cache feature for entity associations. Please NOTE that hibernateEnableCache should also be enabled when specifying this property.
hibernateEhCacheDiskStore(Back to Caching)
Optional property
Default value: java.io.tmpdir
Defines the path to the directory where cache files will be created
hibernateCacheProvider(Back to Caching)
Optional property
Default value: net.sf.hibernate.cache.EhCacheProvider
Defines Hibernate Cache Provider implementation class. Possible values for Hibernate2 are:
  • net.sf.hibernate.cache.EhCacheProvider
  • net.sf.hibernate.cache.HashtableCacheProvider
  • net.sf.hibernate.cache.JCSCacheProvider
  • net.sf.hibernate.cache.SwarmCacheProvider
  • net.sf.hibernate.cache.TreeCacheProvider
  • net.sf.hibernate.cache.OSCacheProvider
Possible values for Hibernate3 are:
  • org.hibernate.cache.EhCacheProvider
  • org.hibernate.cache.HashtableCacheProvider
  • org.hibernate.cache.JCSCacheProvider
  • org.hibernate.cache.SwarmCacheProvider
  • org.hibernate.cache.TreeCacheProvider
  • org.hibernate.cache.OSCacheProvider
hibernateQueryCacheFactory(Back to Caching)
Optional property
Default value: net.sf.hibernate.cache.StandardQueryCacheFactory
Defines Hibernate Query Cache Factory implementation class. Possible value for Hibernate2 is:
  • net.sf.hibernate.cache.StandardQueryCacheFactory
Possible value for Hibernate3 is:
  • org.hibernate.cache.StandardQueryCacheFactory
hibernateConnectionReleaseMode(Back to Caching)
Optional property
No default value available
Specify when Hibernate should release JDBC connections. By default, a JDBC connection is held until the session is explicitly closed or disconnected. For an application server JTA datasource, you should use after_statement to aggressively release connections after every JDBC call. For a non-JTA connection, it often makes sense to release the connection at the end of each transaction, by using after_transaction. auto will choose after_statement for the JTA and CMT transaction strategies and after_transaction for the JDBC transaction strategy.
    Valid values are:
  • on_close
  • - default
  • after_transaction
  • after_statement
  • auto
ehCacheMaxElementsInMemory(Back to Caching)
Optional property
Default value: 10000
Defines the default maximum number of objects that will be created in memory.
ehCacheEternal(Back to Caching)
Optional property
Default value: false
Defines a default value for the eternal parameter.
ehCacheTimeToIdleSeconds(Back to Caching)
Optional property
Default value: 120
Defines the default time to idle for an element before it expires.
ehCacheTimeToLiveSeconds(Back to Caching)
Optional property
Default value: 120
Defines the default time to live for an element before it expires.
ehCacheOverflowToDisk(Back to Caching)
Optional property
Default value: true
Defines the default value for the overflow to disk property.
driver(Back to JDBC)
Optional property
No default value available
JDBC Driver to make database connection, this should be a fully qualified Java class name.
username(Back to JDBC)
Optional property
No default value available
The database user login name.
password(Back to JDBC)
Optional property
No default value available
The database user password.
connectionUrl(Back to JDBC)
Optional property
No default value available
URL for the JDBC Driver to make the connection to the database.
testDialect(Back to JDBC)
Optional property
No default value available
JDBC Test Dialect for hibernate. For H2 we can use Oracle or DB2 in emulation mode set in connection URL
testDriver(Back to JDBC)
Optional property
No default value available
JDBC Driver to make test database connection, this should be a fully qualified Java class name.
testUsername(Back to JDBC)
Optional property
No default value available
The test database user login name.
testPassword(Back to JDBC)
Optional property
No default value available
The test database user password.
testConnectionUrl(Back to JDBC)
Optional property
No default value available
URL for the JDBC Driver to make the connection to the test database.
dataSource(Back to JDBC)
Optional property
No default value available
JNDI name of data source to use. (would be used instead of the connection properties, driver, username, password, etc).
hibernateShowSql(Back to JDBC)
Optional property
No default value available
Whether or not to log SQL statements.
hibernateDialect(Back to JDBC)
Optional property
No default value available
SQL dialect of the database.
  • org.hibernate.dialect.Cache71Dialect
  • org.hibernate.dialect.DataDirectOracle9Dialect
  • org.hibernate.dialect.DB2390Dialect
  • org.hibernate.dialect.DB2400Dialect
  • org.hibernate.dialect.DB2Dialect
  • org.hibernate.dialect.DerbyDialect
  • org.hibernate.dialect.FirebirdDialect
  • org.hibernate.dialect.FrontbaseDialect
  • org.hibernate.dialect.H2Dialect
  • org.hibernate.dialect.HSQLDialect
  • org.hibernate.dialect.InformixDialect
  • org.hibernate.dialect.IngresDialect
  • org.hibernate.dialect.IngresDialect9
  • org.hibernate.dialect.IngresDialect10
  • org.hibernate.dialect.InterbaseDialect
  • org.hibernate.dialect.JDataStoreDialect
  • org.hibernate.dialect.MckoiDialect
  • org.hibernate.dialect.MimerSQLDialect
  • org.hibernate.dialect.MySQL5Dialect
  • org.hibernate.dialect.MySQL5InnoDBDialect
  • org.hibernate.dialect.MySQLDialect
  • org.hibernate.dialect.MySQLInnoDBDialect
  • org.hibernate.dialect.MySQLMyISAMDialect
  • org.hibernate.dialect.OracleDialect
  • org.hibernate.dialect.Oracle8iDialect
  • org.hibernate.dialect.Oracle9Dialect
  • org.hibernate.dialect.Oracle9iDialect
  • org.hibernate.dialect.Oracle10gDialect
  • org.hibernate.dialect.PointbaseDialect
  • org.hibernate.dialect.PostgresPlusDialect
  • org.hibernate.dialect.PostgreSQLDialect
  • org.hibernate.dialect.ProgressDialect
  • org.hibernate.dialect.RDMSOS2200Dialect
  • org.hibernate.dialect.SAPDBDialect
  • org.hibernate.dialect.SQLServer2008Dialect
  • org.hibernate.dialect.SQLServerDialect
  • org.hibernate.dialect.SybaseDialect
  • org.hibernate.dialect.Sybase11Dialect
  • org.hibernate.dialect.SybaseAnywhereDialect
  • org.hibernate.dialect.SybaseASE15Dialect
  • org.hibernate.dialect.TeradataDialect
  • org.hibernate.dialect.TimesTenDialect
hibernateMaxFetchDepth(Back to JDBC)
Optional property
No default value available
Sets a maximum "depth" for the outer join fetch tree. Recommended values between 0 and 3
hibernateJdbcFetchSize(Back to JDBC)
Optional property
No default value available
A non-zero value determines the JDBC fetch size
hibernateJdbcBatchSize(Back to JDBC)
Optional property
No default value available
A nonzero value enables use of JDBC2 batch updates by Hibernate. Recommended values between 5 and 30
hibernateJdbcUseScrollableResultSet(Back to JDBC)
Optional property
No default value available
Whether or not to enable use of JDBC2 scrollable resultsets by Hibernate. This property is only necessary when using user supplied connections. Hibernate uses connection metadata otherwise.
hibernateJdbcUseStreamsForBinary(Back to JDBC)
Optional property
No default value available
Whether or not to use streams when writing / reading binary or serializable types to/from JDBC.
hibernateHbm2DDLAuto(Back to JDBC)
Optional property
No default value available
Automatically export schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly. Permitted values are:
  1. update
  2. create
  3. create-drop
  4. validate (since Hibernate 3)
hibernateQuerySubstitutions(Back to JDBC)
Optional property
No default value available
Allows you to define new Hibernate query tokens. For example: giving this a value of true=1, false=0 would cause the tokens true and false to be translated to integer literals in the generated SQL.
sequenceIdentifierSuffix(Back to JDBC)
Optional property
Default value: _SEQ
The suffix to use for identifier sequences.
hibernateUseOuterJoin(Back to JDBC)
Optional property
No default value available
Whether or not to use outer join.
entityManagerName(Back to JDBC)
Optional property
No default value available
The name assigned to the entity manager. If no name is specified, the name of the containing persistence archive without the .par extension is used.
entityManagerJTADataSource(Back to JDBC)
Optional property
Default value: java:/DefaultDS
Specifies the global JNDI name of the JTA data source.
entityNamePattern(Back to Name Patterns)
Optional property
Default value: {0}
The pattern to use when constructing an entity name. {0} is used to represent the entity name in the model, so if you specified a value of {0}Entity all the entities generated would have a suffix of "Entity".
entityImplementationNamePattern(Back to Name Patterns)
Optional property
Default value: {0}Impl
The pattern to use when constructing the entity implementation name.
embeddedValueImplementationNamePattern(Back to Name Patterns)
Optional property
Default value: {0}Impl
The pattern to use when constructing an embedded value implementation name.
enumerationNamePattern(Back to Name Patterns)
Optional property
Default value: {0}Enum
The pattern to use when constructing hibernate enumerations.
ejbJndiNamePrefix(Back to Name Patterns)
Optional property
No default value available
The prefix to give to the Session EJB JNDI names (this allows the same Session EJB to be deployed multiple times in the same container)
serviceOperationTransactionType(Back to Transactions)
Optional property
Default value: Required
The default value to use for service operations transaction types.
    Permitted values are:
  • NotSupported
  • Supports
  • Required
  • RequiresNew
  • Mandatory
  • Never
NOTE: Can be overridden on a per entity basis with the andromda_ejb_transaction_type tagged value.
hibernateTransactionFactoryClass(Back to Transactions)
Optional property
Default value: net.sf.hibernate.transaction.JTATransactionFactory
The name of the hibernate transaction factory class to use.
hibernateTransactionManagerStrategy(Back to Transactions)
Optional property
No default value available
Strategy for obtaining the JTA TransactionManager.
hibernateUserTransactionName(Back to Transactions)
Optional property
Default value: UserTransaction
The JNDI name of the JTA UserTransaction object.
hibernateTransactionManagerLookup(Back to Transactions)
Optional property
No default value available
The fully qualified class name of the Hibernate TransactionFactory implementation.
deploymentPlatform(Back to Other)
Optional property
Default value: jboss7
The default container deployment platform name and version. Used when specifying specific annotations and dependencies and tests for different persistence containers. Possible values are:
  • jboss7
  • jboss6
  • jboss51
  • jboss5
  • jboss42
  • jboss4
  • jboss3
  • was8
  • was7
  • was61
  • wasce2
  • glassfish3
  • glassfish2
  • weblogic11
  • weblogic10
  • weblogic9
  • weblogic8
  • geronimo
  • jonas5
  • oracleas
  • resin3
  • resin4
  • sun8
persistenceContextUnitName(Back to Other)
Optional property
No default value available
Specifies the default persistence context unit name associated with the default Entity Manager.
javaVersion(Back to Other)
Optional property
Default value: 1.6
Determines if some annotations or JDK-specific features are output such as @Override compareTo(). v1.5 give compile error on @Override on methods that override interface methods. If 1.4, templating and generics should be turned off. Should be set by property java.version in pom.xml which is also used by the maven-compiler-plugin. Allowed values=1.4,1.5,1.6. Default=1.6.
hibernateVersion(Back to Other)
Optional property
Default value: 3
The version of Hibernate to use when generating. Allowable values are:
  • 2 - Hibernate 2.x
  • 3 - Hibernate 3.x
  • 4 - Hibernate 4.x
hibernateEntityAnnotations(Back to Other)
Optional property
Default value: true
Set to true to enable Hibernate @Annotations on Entity classes for ORM properties, no hbm.xml files will be generated. The hibernateVersion namespace property must be set to 3 or 4.
hibernateXMLPersistence(Back to Other)
Optional property
Default value: false
Set to true to enable Hibernate's XML persistence support using dom4J. The hibernateVersion namespace property must be set to 3.
hibernateXMLPersistIDAsAttribute(Back to Other)
Optional property
Default value: true
Set to true if the identifier for generated entities should be mapped to an attribute of the entity's XML tag, or as a separate field when XML persistence support is enabled. The hibernateXMLPersistence namespace property must be set to true for this option to have meaning.
hibernateJAXBPersistence(Back to Other)
Optional property
Default value: false
Set to true to enable JAXB XML annotations on Entity classes, used for serialization as part of REST services. The hibernateVersion namespace property must be set to 3.
defaultHibernateGeneratorClass(Back to Other)
Optional property
Default value: native
The default class to use for Hibernate ID generation (can be overridden on a per entity basis with the andromda_hibernate_generator_class tagged value).
hibernateOneToManyNotFoundAction(Back to Other)
Optional property
Default value: exception
Only applicable to Hibernate 3.x; this property sets the default handling of what will happen when an association is loaded and not found on a one-to-many association. The allowable values are:
  • exception
  • ignore
If ignore is set, then objects not found in associations will be returned as null, otherwise an ObjectNotFoundException is thrown by Hibernate. It is sometimes useful to set this value to ignore when you're using association caching.
hibernateDefaultCascade(Back to Other)
Optional property
Default value: none
The value of the default-cascade attribute of the hibernate entity XML mapping.
hibernateCompositionCascade(Back to Other)
Optional property
No default value available
Indicates how a UML composition should be interpreted as cascade.
  • If undefined, the cascade attribute is computed by AndroMDA in the following manner: if default-cascade is save-update or all, then cascade is all (0..1) or all-delete-orphan (many) otherwise cascade is delete.
  • If the property IS defined, its value is generated at each occurrence of a UML composition, and the inverse side is marked with cascade="none". The value must be a valid Hibernate cascade style. You should use a cascade value which includes delete to be conform with the UML concept of a composition, e.g. all-delete-orphan.
hibernateAggregationCascade(Back to Other)
Optional property
No default value available
Indicates how a UML aggregation should be interpreted as cascade. Possible values are are as follows:
  • If undefined, aggregation is not interpreted as a cascade value
  • If the property IS defined, its value is generated at each occurrence of a UML aggregation, and the inverse side is marked with cascade="none". The value must be a valid Hibernate cascade style, e.g. all.
hibernateEntityDynamicInsert(Back to Other)
Optional property
Default value: false
Defines the default value dynamic-insert property on entities.
hibernateEntityDynamicUpdate(Back to Other)
Optional property
Default value: false
Defines the default value dynamic-update property on entities.
hibernateProxy(Back to Other)
Optional property
Default value: false
Defines if proxies will be enabled for Hibernate Entities.
hibernateQueryUseNamedParameters(Back to Other)
Optional property
Default value: false
Whether or not named parameters (i.e. ':someParameter') or unnamed (i.e. '?') parameters should be used in the HQL queries embedded within the model. NOTE: Does not apply to queries written in OCL.
hibernateInheritanceStrategy(Back to Other)
Optional property
Default value: subclass
See Hibernate ORM. Defines the hibernate inheritance strategy (unless overridden on an entity level by the andromda_hibernate_inheritance tagged value, can be the following possible values:
  • class - single table per hierarchy. SINGLE_TABLE
  • hierarchy - table per subclass in hierarchy. JOINED
  • concrete - Table per class. Only concrete classes. TABLE_PER_CLASS
  • union-subclass - Table per class (Only Hibernate 3).
  • interface - Root class is defined as an interface and the attributes re-mapped to the subclasses. This is useful in the concrete case because it has limitations in the associations.
hibernateMappingStrategy(Back to Other)
Optional property
Default value: hierarchy
Denotes whether or not subclasses should be mapped into the same .hbm.xml file or in a separate one.
  • Set this value to subclass when you want to have a mapping file per entity
  • The default is hierarchy which will render a mapping file per subclass
defaultEntityDiscriminatorColumn(Back to Other)
Optional property
Default value: class
The default name of the discriminator-column on the hibernate entity XML mapping.
defaultEntityDiscriminatorType(Back to Other)
Optional property
Default value: string
The default type of the discriminator-column of the hibernate entity XML mapping.
compositionDefinesEagerLoading(Back to Other)
Optional property
Default value: true
Allows you to turn on/off whether or not composite associations will define eager loading.
ejbViewType(Back to Other)
Optional property
Default value: local
If EJBs are being used, this specifies the default view type for the EJB interfaces. Can be either local or remote.
hibernateAssociationCollectionType(Back to Other)
Optional property
Default value: set
Used to define the default mapping for hibernate collections.
hibernateAssociationSortType(Back to Other)
Optional property
Default value: unsorted
Used to define how elements will be sorted within the collection defined by the association. (Only available for maps and sets).
hibernateQueryUseSpecializedSetters(Back to Other)
Optional property
Default value: false
Defines if the finder setters method for parameters will use "setParameter" for all parameters (by default), or a specialized setter (setDate, setBoolean, etc.) in case the parameter type has it's own setter method.
versionProperty(Back to Other)
Optional property
No default value available
The name of the property/attribute to automatically add to entities for versioning purposes. If this value is not specified or it contains only whitespace characters it will be ignored and the property will not be generated. This value can be overridden with the andromda_hibernate_versiontagged value.
hibernateAssociationEndOuterJoin(Back to Other)
Optional property
Default value: auto
Defines the default outer join value for many to one and one to one association ends. Possible values are:
  • auto
  • true
  • false
For hibernate 3 the above values will be translated to
  • join
  • select
listTypeImplementation(Back to Other)
Optional property
Default value: java.util.ArrayList
The implementation type to use for association ends that are modeled as lists.
setTypeImplementation(Back to Other)
Optional property
Default value: java.util.HashSet
The implementation type to use for association ends that are modeled as sets.
mapTypeImplementation(Back to Other)
Optional property
Default value: java.util.HashMap
The implementation type to use for association ends that are modeled as maps.
bagTypeImplementation(Back to Other)
Optional property
Default value: java.util.ArrayList
The implementation type to use for association ends that are modeled as bags.
specificCollectionInterfaces(Back to Other)
Optional property
Default value: false
A flag indicating whether or not specific collection interfaces will be used in association end mutators and accessors (i.e. java.util.Set, java.util.List, etc). If this is set to false, then the value of the defaultCollectionInterface property will used to provide the collection interface.
defaultCollectionInterface(Back to Other)
Optional property
Default value: java.util.Collection
The default collection interface, this is the interface used with association end accessors and mutators if the specificCollectionInterfaces flag is set to false.
associationEndCollectionIndexName(Back to Other)
Optional property
No default value available
The default association end collection index name (this can be overridden by the andromda_hibernate_collection_index).
associationEndCollectionIndexType(Back to Other)
Optional property
Default value: datatype::String
The default association end collection index type (this can be overridden by the andromda_hibernate_collection_index_type (this is applicable when the collection is a map).
hibernateTypeMappingsUri(Back to Other)
Optional property
No default value available
URI specifying the specific mappings from model types to hibernate types. (i.e. file:${basedir}/HibernateTypeMappings.xml). This is not necessary but useful for defining hibernate user types (when hibernate doesn't support a specific type in the manner needed for your application).
securityRealm(Back to Other)
Optional property
No default value available
The name of the security realm (i.e. animal-quiz, other, etc). NOTE:This enables EJB security if specified.
customTypesPackage(Back to Other)
Optional property
Default value: org.andromda.persistence.hibernate
No documentation available
userTypesPackage(Back to Other)
Optional property
Default value: org.andromda.persistence.hibernate.usertypes
Defines the package for the Hibernate user types
enumTypesPackage(Back to Other)
Optional property
No default value available
Optional definition of the package name where all Hibernate enumeration types are to be generated. This will overrride the default model package name where the enumeration class itself will still be placed.
serviceLocatorName(Back to Other)
Optional property
Default value: ServiceLocator
The name to give to the generated service locator class.
hibernatePoolSize(Back to Other)
Optional property
No default value available
Hibernate connection pool size.
hibernateJndiName(Back to Other)
Optional property
Default value: java:/hibernate/SessionFactory
JNDI name bound to the SessionFactory.
xmlEncoding(Back to Other)
Optional property
Default value: UTF-8
Encoding for generated XML files.
dateTimeGeneratedText(Back to Other)
Optional property
Default value: true
Adds the current date and time to the generated files (as comment).
generateEntityEqualsAndHashCode(Back to Other)
Optional property
Default value: true
Indicates whether or not a default equals and hashCode implementation should be generated.
hibernateQueryFactory(Back to Other)
Optional property
Default value: org.hibernate.hql.classic.ClassicQueryTranslatorFactory
Hibernate3 comes with a brand-new, ANTLR-based HQL/SQL query translator. However, it is still buggy and so in mean time use the Hibernate 2.1 query parser which is still available. Possible values are:
  • org.hibernate.hql.ast.ASTQueryTranslatorFactory (for the new query parser)
  • org.hibernate.hql.classic.ClassicQueryTranslatorFactory (for the old parser)
generateDatabaseDependentCode(Back to Other)
Optional property
Default value: true
Indicates whether or not to generate code dependent on the defined (with hibernateDialect) database system, like sql-type, index and foreign-key attributes for all properties. These attributes are useful for DDL-schema generation but aren't at runtime. (This property is only supported for hibernate 3 code generation)
generateAttributeNameConstant(Back to Other)
Optional property
Default value: false
Indicates whether or not to generate a constant string with the attributes names in entities to easier the references in criteria (and other) queries.
attributeNameConstantPrefix(Back to Other)
Optional property
Default value: _
Prefix to be used in the constant name, when generateAttributeNameConstant=true