Dependencies can be used between Services and Entities, they won't need any stereotype assigned to them. These dependencies are used to reference an entity from another entity or service, or to reference a service from an entity or another service. Entity query operations (i.e. finders) can be denoted by setting the query flag on the modeled operation to true (they do not require any stereotypes). Actors represent roles within your model. To designate that a role has access to a given service you must draw a dependency from an Actor to the <<Service>>. To designate the role has access to to a given operation, you must draw a dependency from an Actor to the operation. Transitive persistencein Hibernate is controlled by cascading Hibernate operations. There are four points to adjust that: the hibernateDefaultCascadenamespace property: the overall default for cascade the hibernateCompositionCascadenamespace property: how an UML composition should be interpreted as cascade the hibernateAggregationCascadenamespace property: how an UML aggregation should be interpreted as cascade the andromda_hibernate_cascade tagged value at the individual association end The idea is to visualize the cascading hierarchy by using UML composition and aggregation. The inverse direction is marked with cascade="none" to get a clear direction.

AndroMDA Hibernate Cartridge Profile

This profile contains all elements that can be applied on the model used as the MDA transformation process. These elements are specific to the AndroMDA Hibernate Cartridge component.

Stereotypes
Stereotypes are the names you sometimes see appear in UML diagrams, they typically look like <<MyStereotype>> and can be applied on any type of UML model element.

Entity(Back to Stereotypes)
Applied on: class
Denotes a class is representing an Hibernate POJO. This will instruct the cartridge to generate an .hbm.xml descriptor and the corresponding class from it.
Service(Back to Stereotypes)
Applied on: class
Denotes a class is representing an EJB session bean that is supposed to be used as a facade for a set of entities.
Enumeration(Back to Stereotypes)
Applied on: class
This class will instruct the generation of a type-safe enumeration class. The class implements the required Hibernate interface to be able to be persisted. That way it is possible for Entities to use this enumeration type for their attributes.
andromda_hibernate_query(Back to Tagged Values)
Applied on: An Entity operation marked as a query.
Defines a hibernate query expression. Note that it's encouraged to model your query body as an OCL constraint (instead of using this tagged value).
andromda_hibernate_query_useNamedParameters(Back to Tagged Values)
Applied on: An Entity operation marked as a query.
Defines whether the marked finder will use named parameters or not.
Allowed values for this element:
  • true
  • false
andromda_ejb_viewType(Back to Tagged Values)
Applied on: <<Service>>
Defines the view type for a Session EJB. If undefined, the default defined by the ejbViewType namespace property will be assumed.
Allowed values for this element:
  • local
  • remote
  • both
andromda_ejb_transaction_type(Back to Tagged Values)
Applied on: Service Operation
Defines a transaction type for the method.
Allowed values for this element:
  • NotSupported
  • Supports
  • Required
  • RequiresNew
  • Mandatory
  • Never
andromda_hibernate_lazy(Back to Tagged Values)
Applied on: <<Entity>>classes, association ends between <<Entity>>classes, or attributes of an <<Entity>>
Used to denote how entities, relationships or attributes must be loaded: truefor lazy, falsefor eager. Defaults to falsefor composite associations (unless compositionDefinesEagerLoadingis set to false) and defaults to truefor the other kinds. For entities, defaults to false for Hibernate 2 and true for Hibernate 3 and NHibernate.
Allowed values for this element:
  • true
  • false
andromda_hibernate_inheritance(Back to Tagged Values)
Applied on: <<Entity>>
Used to override the default hibernate inheritance strategy defined by the hibernateInheritanceStrategy namespace property.
    Permitted values are:
  • class - table per hierarchy.
  • subclass - table per class in hierarchy.
  • concrete - Table per class.
  • union-subclass - Table per class (only on Hibernate 3).
  • interface - Root class is defined as an interface and the attributes remapped to the subclasses. This is useful in the concrete case because it has limitations in the associations.

The tagged value of andromda_hibernate_inheritance is set on the base/root class. All subclasses must then follow the same strategy unless interface or concrete is the predecessor strategy. The default strategy is defined by the hibernateInheritanceStrategy namespace property.

Allowed values for this element:
  • class
  • subclass
  • concrete
  • union-subclass
  • interface
andromda_hibernate_outerjoin(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Defines if Hibernate will use a outer join for fetching the given assocation end. For Hibernate3 this will result in a fetch clause with values:
  • join
  • select
Allowed values for this element:
  • auto
  • true
  • false
andromda_hibernate_entity_dynamicInsert(Back to Tagged Values)
Applied on: <<Entity>>
Defines if the entity will limit the SQL insert statement to properties with values. This value overrides the namespace propertyfor this entity.
Allowed values for this element:
  • true
  • false
andromda_hibernate_entity_dynamicUpdate(Back to Tagged Values)
Applied on:
Defines if the entity will limit the SQL update statements to properties that are modified. This value overrides the namespace propertyfor this entity.
Allowed values for this element:
  • true
  • false
andromda_hibernate_generator_class(Back to Tagged Values)
Applied on: <<Entity>>
Used to define the generator class used for the hibernate entity. Any of the hibernate generator classes may be used.
Allowed values for this element:
  • increment
  • identity
  • sequence
  • hilo
  • seqhilo
  • guid
  • uuid
  • uuid.hex
  • uuid.string
  • native
  • assigned
  • select
  • foreign
andromda_hibernate_entity_proxy(Back to Tagged Values)
Applied on: <<Entity>>
Defines if a proxy will be enabled for the entity. Overrides the "hibernateProxy" namespace property.
Allowed values for this element:
  • true
  • false
andromda_hibernate_collection_type(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Used to define the mapping for hibernate collections. This value overrides the namespace property.
Allowed values for this element:
  • set
  • map
  • bag
  • list
andromda_hibernate_sort_type(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Used to define how elements will be sorted within the collection defined by the association. (Only available for maps and sets) This value overrides the namespace property.
Allowed values for this element:
  • unsorted
  • natural
  • comparatorClass
andromda_hibernate_orderByColumns(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Column names that will be used for sorting the collection, with asc or desc optionally.
Allowed values for this element:
  • Properties of this entity
andromda_hibernate_whereClause(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
SQL condition to define a subset of available data for the collection
Allowed values for this element:
  • An SQL code fragment
andromda_hibernate_collection_index(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Column containing the collection index, overrides the associationEndCollectionIndexName
Allowed values for this element:
  • A property of this entity
andromda_hibernate_collection_index_type(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
The type of the column containing the collection index, overrides the associationEndCollectionIndexType
Allowed values for this element:
  • A property of this entity
andromda_hibernate_version(Back to Tagged Values)
Applied on: <<Entity>>
Specifies wheter or not the entity will have a version property. If a value is present, then the entity will have a version property with the name specified within the tagged value.
Allowed values for this element:
  • The name of the version property
andromda_hibernate_cascade(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Place an individual cascade value at an association end, overriding the properties hibernateDefaultCascade, hibernateCompositionCascadeand hibernateAggregationCascade.
andromda_hibernate_formula(Back to Tagged Values)
Applied on: The attribute of an <<Entity>>
Defines an attribute of a class as a calculated value. This tagged value stores the SQL formula that will be used to assign a value to this property.
Allowed values for this element:
  • An SQL code fragment
andromda_persistence_discriminator_column_name(Back to Tagged Values)
Applied on: The <<Entity>> classes
Used at the class level of an entity and is optional. This value indicates the name of the column to be used for the discriminator. If not specified for the SINGLE_TABLE or JOINED inheritance mapping strategies, then default to TYPE.
Allowed values for this element:
  • column name
andromda_persistence_discriminator_type(Back to Tagged Values)
Applied on: The <<Entity>> classes
Used to override the default entity inheritance discriminator type defined by the entityDiscriminatorType namespace property.
    Permitted values are:
  • STRING
  • CHAR
  • INTEGER

The tagged value of andromda_persistence_discriminator_type is set once on the base/root class to indicate the type of the column used for the discriminator. The default discriminator type is defined by the entityDiscriminatorType namespace property.

Allowed values for this element:
  • STRING
  • CHAR
  • INTEGER
andromda_persistence_discriminator_value(Back to Tagged Values)
Applied on: The <<Entity>> classes
Used at the class level of an entity and is optional. This is the value that indicates that the row is an entity of the annotated entity type. It should be specified for each class in the hierarchy.
Allowed values for this element:
  • A String
andromda_hibernate_property_insert(Back to Tagged Values)
Applied on: the attribute of an <<Entity>>
Specifies whether a mapped column should be included in SQL INSERT statements. Setting to false allows the column to be initialized using other mechanisms such as a value defaulted by the database. Defaults to true.
Allowed values for this element:
  • true
  • false
andromda_hibernate_property_update(Back to Tagged Values)
Applied on: the attribute of an <<Entity>>
Specifies whether a mapped column should be included in SQL UPDATE statements. Setting to false allows the column to be updated using other mechanisms such as a value defaulted by the database. Defaults to true.
Allowed values for this element:
  • true
  • false
andromda_hibernate_xml_tagName(Back to Tagged Values)
Applied on: the attribute of an <<Entity>>, or an the <<Entity>> itself, or on an association end between <<Entity>> classes
Defines the name of the XML element that is generated when an entity, attribute, or associated entity is represented in XML format. Valid only when XML persistence has been enabled. Controls the node attribute in the Hibernate mapping file. See also hibernateXMLPersistence
Allowed values for this element:
  • Any valid XML tag name
andromda_hibernate_xml_embed(Back to Tagged Values)
Applied on: Association ends between <<Entity>> classes
Specifies wheter or not the entity attached to the association end should be embedded as a complete XML structure, or simply as a referenc to its ID. Controls the embed-xml attribute in the Hibernate mapping file. See also hibernateXMLPersistence
Allowed values for this element:
  • true
  • false
andromda_hibernate_query_useCache(Back to Tagged Values for caching)
Applied on: A query operation
Defines is caching is enabled for this query
Allowed values for this element:
  • true
  • false
andromda_hibernate_entity_cache(Back to Tagged Values for caching)
Applied on: <<Entity>>
Defines the cache strategy for the Entity.
Allowed values for this element:
  • read-write
  • nonstrict-read-write
  • read-only
andromda_hibernate_entity_cache_distributed(Back to Tagged Values for caching)
Applied on: <<Entity>>
Defines whether the cache for this entity is to be distributed.
Allowed values for this element:
  • true
  • false
andromda_hibernate_association_cache(Back to Tagged Values for caching)
Applied on: Association between <<Entity>> classes
Defines the cache strategy for the association.
Allowed values for this element:
  • read-write
  • nonstrict-read-write
  • read-only
andromda_hibernate_association_cache_distributed(Back to Tagged Values for caching)
Applied on: <<Entity>>
Defines whether the cache for this association is to be distributed.
Allowed values for this element:
  • true
  • false
andromda_hibernate_ehcache_maxElementsInMemory(Back to Tagged Values for caching)
Applied on: <<Entity>>
EhCache property. Defines the maximum number of objects that will be created in memory.
Allowed values for this element:
  • A strictly positive integer
andromda_hibernate_ehcache_eternal(Back to Tagged Values for caching)
Applied on: <<Entity>>
EhCache property. Defines if elements are eternal.
Allowed values for this element:
  • true
  • false
andromda_hibernate_ehcache_timeToIdleSeconds(Back to Tagged Values for caching)
Applied on: <<Entity>>
EhCache property. Defines the time to idle for an element before it expires.
Allowed values for this element:
  • A strictly positive integer
andromda_hibernate_ehcache_timeToLiveSeconds(Back to Tagged Values for caching)
Applied on: <<Entity>>
EhCache property. Defines the time to live for an element before it expires.
Allowed values for this element:
  • A strictly positive integer
andromda_hibernate_ehcache_overflowToDisk(Back to Tagged Values for caching)
Applied on: <<Entity>>
EhCache property. Defines if elements can overflow to disk.
Allowed values for this element:
  • true
  • false