The page describes the modeling standards one must follow to in order to use the Hibernate Cartridge.
| Tagged Value | Used With | Description |
|---|---|---|
| @andromda.hibernate.query |
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.persistence.table | <<Entity>> or a many-to many association. | Defines the relational table name for entity persistence. |
| @andromda.persistence.column | Attribute | Represents the column name for entity persistence. |
| @andromda.persistence.column.length | Attribute | Represents the column length for entity persistence. |
| @andromda.persistence.immutable | Class | Identifies an <<EmbeddedValue>> as immutable . |
| @andromda.hibernate.inheritance | <<Entity>> |
Used to override the default hibernate inheritance
strategy defined by the hibernateInheritanceStrategy
namespace property.
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. |
| @andromda.persistence.column.index | Attribute | The name of an index to create on an entity attribute/column. |
| @andromda.hibernate.formula | 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. | Provides the ability to specify the name to be used (if different than the actual name of the actor). |
| @andromda.hibernate.entity.cache | <<Entity>> |
Defines the cache strategy for the Entity. Permited values are:
|
| @andromda.hibernate.query.useCache | <<FinderMethod>> | Defines is caching is enabled for this query. |
| @andromda.hibernate.entity.proxy | <<Entity>> |
Defines if a proxy will be enabled for the entity. Overrrides the "hibernateProxy" namespace property.
|
| @andromda.hibernate.entity.dynamicInsert | <<Entity>> |
Defines if the entity will limit the SQL insert statement to properties with values. This value overrides the namespace property for this entity.
|
| @andromda.hibernate.entity.dynamicUpdate | <<Entity>> |
Defines if the entity will limit the SQL update statements to properties that are modified. This value overrides the namespace property for this entity.
|
| @andromda.hibernate.ehcache.maxElementsInMemory | <<Entity>> | EhCache property. Defines the maximum number of objects that will be created in memory. |
| @andromda.hibernate.ehcache.eternal | <<Entity>> |
EhCache property. Defines if elements are eternal.
|
| @andromda.hibernate.ehcache.timeToIdleSeconds | <<Entity>> | EhCache property. Defines the time to idle for an element before it expires. |
| @andromda.hibernate.ehcache.timeToLiveSeconds | <<Entity>> | EhCache property. Defines the time to live for an element before it expires. |
| @andromda.hibernate.ehcache.overflowToDisk | <<Entity>> |
EhCache property. Defines if elements can overflow to disk
|
| @andromda.hibernate.version | <<Entity>> | Specfies 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. |
| @andromda.role.name | An actor with a dependency to a <<Service>> or a <<Service>> operation. | Provides the ability to specify the name to be used (if different than the actual name of the actor). |
| @andromda.hibernate.generator.class | <<Entity>> |
Used to define the generator class used for the hibernate entity.
Any of the hibernate generator classes may be used.
|
| Tagged Value | Used With | Description |
|---|---|---|
| @andromda.ejb.viewType | <<Service>> | Defines the view type for a Session EJB. If undefined, the default defined by ejbViewType will be assumed. |
| @andromda.ejb.transaction.type | Service Operation |
Defines a transaction type for the method.
|
| Tagged Value | Used With | Description |
|---|---|---|
| @andromda.hibernate.lazy | Association ends between <<Entity>> classes |
Used to denote how a relationship must be loaded:
true
for
lazy
,
false
for
eager
. Defaults to
false
for composite
associations (unless
compositionDefinesEagerLoading is
set to
false
) and defaults to
true
for the other kinds.
|
| @andromda.hibernate.outerjoin | Association ends between <<Entity>> classes |
Defines if Hibernate will use a outer join for fetching the given assocation end.
|
| @andromda.hibernate.association.cache | Association between <<Entity>> classes |
Defines the cache strategy for the Association. Permited values are:
|
| @andromda.persistence.foreign.identifier | AssociationEnd connecting two entities | Indicates whether or not the entity should use the identifier of the foreign entity. This has the same effect as if you set @andromda.hibernate.generator.class to foreign . NOTE: that this can only be applied to the child end of a parent-child (one end is marked as composition) one-to-one association. |
| @andromda.persistence.assigned.identifier | An attribute marked as an <<Identifier>> . | Indicates whether or not the identifier is assigned (this means that the identifier is manually assigned as opposed to automatically generated). Note that setting this has the same affect as setting the @andromda.hibernate.generator.class to assigned , this is tagged value is just the preferred way as it can be applied to other frameworks besides Hibernate. |
| @andromda.hibernate.collection.type | Association ends between <<Entity>> classes |
Used to define the mapping for hibernate collections.
This value overrides the namespace property.
|
| @andromda.hibernate.sort.type | 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.
|
| @andromda.hibernate.orderByColumns | Association ends between <<Entity>> classes | Column names that will be used for sorting the collection, with asc or desc optionally. |
| @andromda.hibernate.whereClause | Association ends between <<Entity>> classes | Sql condition to define a subset of available data for the collection |
| @andromda.hibernate.collection.index | Association ends between <<Entity>> classes | Column containing the collection index, overrides the associationEndCollectionIndexName |
| @andromda.hibernate.collection.index.type | Association ends between <<Entity>> classes | The type of the column containing the collection index, overrides the associationEndCollectionIndexType |
| @andromda.persistence.column.index | Association ends between <<Entity>> classes | The name of an index to create on the foreign key generated by the association |
| @andromda.hibernate.cascade | Association end between <<Entity>> classes | Place an individual cascade value at an association end, overriding the properties hibernateDefaultCascade, hibernateCompositionCascade and hibernateAggregationCascade. |
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 persistence in Hibernate is controlled by cascading Hibernate operations. There are four points to adjust that: