org.hibernate.xsd.mapping.mapping-2.1.0.xsd Maven / Gradle / Ivy
...
]]>
The entity-mappings element is the root element of a mapping
file. It contains the following four types of elements:
1. The persistence-unit-metadata element contains metadata
for the entire persistence unit. The behavior is undefined if this element
occurs in multiple mapping files within the same persistence unit.
2. The package, schema, catalog and access elements apply to all of
the entity, mapped-superclass and embeddable elements defined in
the same file in which they occur.
3. The sequence-generator, table-generator, converter, named-query,
named-native-query, named-stored-procedure-query, and
sql-result-set-mapping elements are global to the persistence
unit.
a. The behavior is undefined when having more than one sequence-generator
or table-generator occur in a persistence unit (whether in the same or
different mapping file).
b. The behavior is undefined when having more than one named-query,
named-native-query, sql-result-set-mapping, or named-stored-procedure-query
of the same name in a persistence unit (whether in the same or different
mapping file).
c. The behavior is undefined when having more than one converter for the same
target type in a persistence unit (whether in the same or different mapping file).
4. The entity, mapped-superclass and embeddable elements each define
the mapping information for a managed persistent class. The mapping
information contained in these elements may be complete or it may
be partial.
Metadata that applies to the persistence unit and not just to the mapping
file in which it is contained.
If the xml-mapping-metadata-complete element is specified,
the complete set of mapping metadata for the persistence unit
is contained in the XML mapping files for the persistence unit.
These defaults are applied to the persistence unit as a whole unless they
are overridden by local annotation or XML element settings.
schema - Used as the schema for all tables, secondary tables, join
tables, collection tables, sequence generators, and table
generators that apply to the persistence unit
catalog - Used as the catalog for all tables, secondary tables, join
tables, collection tables, sequence generators, and table
generators that apply to the persistence unit
delimited-identifiers - Used to treat database identifiers as
delimited identifiers.
access - Used as the access type for all managed classes in
the persistence unit
cascade-persist - Adds cascade-persist to the set of cascade options
in all entity relationships of the persistence unit
entity-listeners - List of default entity listeners to be invoked
on each entity in the persistence unit.
javax.persistence.AccessType enum values
Hibernate specific "any" mapping, which is a polymorphic association to any different
tables based on a discriminator
the given identifier type. The first listed column is a VARCHAR column
holding the name of the class (for that row).
com.acme.Employee
]]>
This element contains the entity field or property mappings.
It may be sparsely populated to include only a subset of the
fields or properties. If metadata-complete for the entity is true
then the remainder of the attributes will be defaulted according
to the default rules.
@javax.persistence.AssociationOverride
@javax.persistence.AttributeOverride
See javax.persistence.Basic
Corresponds to the org.hibernate.annotations.Cache annotation.
Used to specify Hibernate-specific extra control over the caching
of entity and collection state.
org.hibernate.CacheMode enum values
javax.persistence.CascadeType enum values
org.hibernate.annotations.CascadeType enum values
org.hibernate.annotations.OnDeleteAction enum values
@CollectionTable annotation
See the javax.persistence.Column annotation.
Corresponds to the javax.persistence.Convert annotation
Corresponds to the javax.persistence.Converter annotation
@DiscriminatorColumn annotation
javax.persistence.DiscriminatorType enum values
@Target({TYPE}) @Retention(RUNTIME)
public @interface DiscriminatorValue {
String value();
}
Corresponds to the @ElementCollection annotation
See javax.persistence.Embeddable
Defines the settings and mappings for embeddable objects.
Again, with metadata-complete=false the mapping is used in
conjunction with annotations. Alternatively, metadata-complete=true
can be used to indicate that no annotations are to be processed
in the class. If this is the case then the defaulting rules will
be recursively applied.
Corresponds to the javax.persistence.Embedded annotation
Corresponds to the javax.persistence.EmbeddedId annotation
See javax.persistence.Entity
Defines the settings and mappings for an entity.
May be used in 2 ways:
1. sparsely populated (metadata-complete=false) and used in
conjunction with the annotations.
2. as complete self-contained metadata (metadata-complete=true)
indicating that no annotations on the entity class (and its fields
or properties) are to be processed. If this is the case then
the defaulting rules for the entity and its subelements will
be recursively applied.
Corresponds to the JPA javax.persistence.EntityListeners annotation
Corresponds to the JPA javax.persistence.EntityListener annotation
Defines an entity listener to be invoked at lifecycle events for
the entities that list this listener.
javax.persistence.EnumType enum values
Corresponds to the javax.persistence.Enumerated annotation.
javax.persistence.FetchType enum values
org.hibernate.annotations.FetchMode enum values
org.hibernate.FlushMode enum values
@ForeignKey annotation
See the javax.persistence.GeneratedValue annotation
javax.persistence.GenerationType rnum values
todo : add custom ones like INCREMENT, UUID, etc
Hibernate-specific element used declare and short-name custom
org.hibernate.id.IdentifierGenerator implementations
Corresponds to the javax.persistence.Id annotation
Corresponds to the javax.persistence.IdClass annotation
Corresponds to @Index annotation
Corresponds to the @Inheritance annotation
Corresponds to the JPA InheritanceType enumeration values + Hibernate's UNION_SUBCLASS
todo : make a singular enum to cover these
JoinColumn annotation
@JoinTable annotation
Corresponds to javax.persistence.Lob (marker) annotation
javax.persistence.LockModeType enum values
Hibernate specific "any" mapping (plural form), which is a polymorphic association to any different
tables based on a discriminator.
@ManyToMany annotation
Corresponds to the @ManyToOne annotation
@javax.persistence.MapKey
@javax.persistence.MapKeyClass
@javax.persistence.MapKeyColumn
@javax.persistence.MapKeyJoinColumn
See javax.persistence.MappedSuperclass
Defines the settings and mappings for a mapped superclass.
May be used in 2 ways:
1. sparsely populated (metadata-complete=false) and used in
conjunction with the annotations.
2. as complete self-contained metadata (metadata-complete=true)
indicating that no annotations are to be processed. If this is
the case then the defaulting rules will be recursively applied.
Hibernate-specific element used to describe the meta-value (discriminator)
mapping for ANY associations.
@NamedEntityGraph annotation
@NamedAttributeNode annotation
@NamedSubgraph annotation
Common Hibernate specific extensions available for named query definitions.
todo : a lot of these extensions could be handled by JPA QueryHint scheme
Mix of @javax.persistence.NamedNativeQuery and @org.hibernate.annotations.NamedNativeQuery
Mix of @javax.persistence.NamedQuery and @org.hibernate.annotations.NamedQuery
Corresponds to the javax.persistence.NamedStoredProcedureQuery annotation
Corresponds to javax.persistence.StoredProcedureParameter annotation
javax.persistence.ParameterMode enum values
@OneToMany annotation
Corresponds to the @OneToOne annotation
@javax.persistence.OrderBy annotation
@javax.persistence.OrderColumn annotation
Corresponds to the javax.persistence.PostLoad annotation
Corresponds to the javax.persistence.PostPersist annotation
Corresponds to the javax.persistence.PostRemove annotation
Corresponds to the javax.persistence.PostUpdate annotation
Corresponds to the javax.persistence.PrePersist annotation
Corresponds to the javax.persistence.PreRemove annotation
Corresponds to the javax.persistence.PreUpdate annotation
@PrimaryKeyJoinColumn annotation
@javax.persistence.QueryHint
Used only by tools to generate finder methods for named queries
@javax.persistence.SecondaryTable
@javax.persistence.SequenceGenerator
@javax.persistence.SqlResultSetMapping
@javax.persistence.ColumnResult
@javax.persistence.ConstructorResult
@javax.persistence.EntityResult
@javax.persistence.FieldResult
@javax.persistence.Table
@javax.persistence.TableGenerator
@javax.persistence.Temporal
javax.persistence.TemporalType enum values
@javax.persistence.Transient
@javax.persistence.UniqueConstraint
@javax.persistence.Version
element defines a single path to which the fetch
refers, as well as the style of fetch to apply. The 'root' of the
path is different depending upon the context in which the
containing occurs; within a element,
the entity-name of the containing class mapping is assumed...
]]>
Specifies a filter definition. After definition, a filter
can be applied to entity or collection by name.
Used to identify all bind parameters in the condition elemement
Applies a filter defined by hbm-filter-def usage
Names a org.hibernate.id.IdentifierGenerator implementation (class attribute)
as well as any configuration information need by the implementation (Hibernate
will pass it the parameters after instantiation).
Corresponds to the org.hibernate.annotations.Parameter annotation
The loader element allows specification of a named query to be used for fetching
an entity or collection
tags from hbm.xml dtd; renamed here for
self-documentation. This information is intended mainly for tooling.
]]>
Corresponds to the org.hibernate.annotations.Type annotation, naming
a org.hibernate.type.* or org.hibernate.usertype.* implementation to use.
name - names the type implementation class
param - If the type is able to accept parameters (implementation stems from
org.hibernate.type.Type, org.hibernate.type.CollectionType, or
org.hibernate.usertype.ParameterizedType) the specified parameters will be
passed to the type instance after instantiation.
A natural-id element allows declaration of unique business key
© 2015 - 2025 Weber Informatics LLC | Privacy Policy