public class EntityMappings extends Object
The entity-mappings element is the root element of a mapping file. It contains the following four types of elements:
The persistence-unit-metadata element contains metadata for the entire persistence unit. It is undefined if this element occurs in multiple mapping files within the same persistence unit.
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.
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. It is undefined to have more than one sequence-generator or table-generator of the same name in the same or different mapping files in a persistence unit. It is undefined to have more than one named-query, named-native-query, sql-result-set-mapping, or named-stored-procedure-query of the same name in the same or different mapping files in a persistence unit. It is also undefined to have more than one converter for the same target type in the same or different mapping files in a persistence unit.
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.
<p>Java class for anonymous complex type.
<p>The following schema fragment specifies the expected content contained within this class.
<pre> <complexType> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="persistence-unit-metadata" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}persistence-unit-metadata" minOccurs="0"/> <element name="package" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="access" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}access-type" minOccurs="0"/> <element name="sequence-generator" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}sequence-generator" maxOccurs="unbounded" minOccurs="0"/> <element name="table-generator" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}table-generator" maxOccurs="unbounded" minOccurs="0"/> <element name="named-query" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}named-query" maxOccurs="unbounded" minOccurs="0"/> <element name="named-native-query" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}named-native-query" maxOccurs="unbounded" minOccurs="0"/> <element name="named-stored-procedure-query" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}named-stored-procedure-query" maxOccurs="unbounded" minOccurs="0"/> <element name="sql-result-set-mapping" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}sql-result-set-mapping" maxOccurs="unbounded" minOccurs="0"/> <element name="mapped-superclass" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}mapped-superclass" maxOccurs="unbounded" minOccurs="0"/> <element name="entity" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}entity" maxOccurs="unbounded" minOccurs="0"/> <element name="embeddable" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}embeddable" maxOccurs="unbounded" minOccurs="0"/> <element name="converter" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}converter" maxOccurs="unbounded" minOccurs="0"/> </sequence> <attribute name="version" use="required" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}versionType" fixed="2.1" /> </restriction> </complexContent> </complexType> </pre>
| Modifier and Type | Field and Description |
|---|---|
protected String |
_package |
protected AccessType |
access |
protected String |
catalog |
protected List<Converter> |
converter |
protected String |
description |
protected List<Embeddable> |
embeddable |
protected List<Entity> |
entity |
protected List<MappedSuperclass> |
mappedSuperclass |
protected List<NamedNativeQuery> |
namedNativeQuery |
protected List<NamedQuery> |
namedQuery |
protected List<NamedStoredProcedureQuery> |
namedStoredProcedureQuery |
protected PersistenceUnitMetadata |
persistenceUnitMetadata |
protected String |
schema |
protected List<SequenceGenerator> |
sequenceGenerator |
protected List<SqlResultSetMapping> |
sqlResultSetMapping |
protected List<TableGenerator> |
tableGenerator |
protected String |
version |
| Constructor and Description |
|---|
EntityMappings() |
| Modifier and Type | Method and Description |
|---|---|
AccessType |
getAccess()
Gets the value of the access property.
|
String |
getCatalog()
Gets the value of the catalog property.
|
List<Converter> |
getConverter()
Gets the value of the converter property.
|
String |
getDescription()
Gets the value of the description property.
|
List<Embeddable> |
getEmbeddable()
Gets the value of the embeddable property.
|
List<Entity> |
getEntity()
Gets the value of the entity property.
|
List<MappedSuperclass> |
getMappedSuperclass()
Gets the value of the mappedSuperclass property.
|
List<NamedNativeQuery> |
getNamedNativeQuery()
Gets the value of the namedNativeQuery property.
|
List<NamedQuery> |
getNamedQuery()
Gets the value of the namedQuery property.
|
List<NamedStoredProcedureQuery> |
getNamedStoredProcedureQuery()
Gets the value of the namedStoredProcedureQuery property.
|
String |
getPackage()
Gets the value of the package property.
|
PersistenceUnitMetadata |
getPersistenceUnitMetadata()
Gets the value of the persistenceUnitMetadata property.
|
String |
getSchema()
Gets the value of the schema property.
|
List<SequenceGenerator> |
getSequenceGenerator()
Gets the value of the sequenceGenerator property.
|
List<SqlResultSetMapping> |
getSqlResultSetMapping()
Gets the value of the sqlResultSetMapping property.
|
List<TableGenerator> |
getTableGenerator()
Gets the value of the tableGenerator property.
|
String |
getVersion()
Gets the value of the version property.
|
void |
setAccess(AccessType value)
Sets the value of the access property.
|
void |
setCatalog(String value)
Sets the value of the catalog property.
|
void |
setDescription(String value)
Sets the value of the description property.
|
void |
setPackage(String value)
Sets the value of the package property.
|
void |
setPersistenceUnitMetadata(PersistenceUnitMetadata value)
Sets the value of the persistenceUnitMetadata property.
|
void |
setSchema(String value)
Sets the value of the schema property.
|
void |
setVersion(String value)
Sets the value of the version property.
|
protected String description
protected PersistenceUnitMetadata persistenceUnitMetadata
protected String _package
protected String schema
protected String catalog
protected AccessType access
protected List<SequenceGenerator> sequenceGenerator
protected List<TableGenerator> tableGenerator
protected List<NamedQuery> namedQuery
protected List<NamedNativeQuery> namedNativeQuery
protected List<NamedStoredProcedureQuery> namedStoredProcedureQuery
protected List<SqlResultSetMapping> sqlResultSetMapping
protected List<MappedSuperclass> mappedSuperclass
protected List<Embeddable> embeddable
protected String version
public String getDescription()
Gets the value of the description property.
Stringpublic void setDescription(String value)
Sets the value of the description property.
value - allowed object is
Stringpublic PersistenceUnitMetadata getPersistenceUnitMetadata()
Gets the value of the persistenceUnitMetadata property.
PersistenceUnitMetadatapublic void setPersistenceUnitMetadata(PersistenceUnitMetadata value)
Sets the value of the persistenceUnitMetadata property.
value - allowed object is
PersistenceUnitMetadatapublic String getPackage()
Gets the value of the package property.
Stringpublic void setPackage(String value)
Sets the value of the package property.
value - allowed object is
Stringpublic String getSchema()
Gets the value of the schema property.
Stringpublic void setSchema(String value)
Sets the value of the schema property.
value - allowed object is
Stringpublic String getCatalog()
Gets the value of the catalog property.
Stringpublic void setCatalog(String value)
Sets the value of the catalog property.
value - allowed object is
Stringpublic AccessType getAccess()
Gets the value of the access property.
AccessTypepublic void setAccess(AccessType value)
Sets the value of the access property.
value - allowed object is
AccessTypepublic List<SequenceGenerator> getSequenceGenerator()
Gets the value of the sequenceGenerator property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the sequenceGenerator property.
<p> For example, to add a new item, do as follows: <pre> getSequenceGenerator().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
SequenceGenerator
public List<TableGenerator> getTableGenerator()
Gets the value of the tableGenerator property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the tableGenerator property.
<p> For example, to add a new item, do as follows: <pre> getTableGenerator().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
TableGenerator
public List<NamedQuery> getNamedQuery()
Gets the value of the namedQuery property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the namedQuery property.
<p> For example, to add a new item, do as follows: <pre> getNamedQuery().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
NamedQuery
public List<NamedNativeQuery> getNamedNativeQuery()
Gets the value of the namedNativeQuery property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the namedNativeQuery property.
<p> For example, to add a new item, do as follows: <pre> getNamedNativeQuery().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
NamedNativeQuery
public List<NamedStoredProcedureQuery> getNamedStoredProcedureQuery()
Gets the value of the namedStoredProcedureQuery property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the namedStoredProcedureQuery property.
<p> For example, to add a new item, do as follows: <pre> getNamedStoredProcedureQuery().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
NamedStoredProcedureQuery
public List<SqlResultSetMapping> getSqlResultSetMapping()
Gets the value of the sqlResultSetMapping property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the sqlResultSetMapping property.
<p> For example, to add a new item, do as follows: <pre> getSqlResultSetMapping().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
SqlResultSetMapping
public List<MappedSuperclass> getMappedSuperclass()
Gets the value of the mappedSuperclass property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the mappedSuperclass property.
<p> For example, to add a new item, do as follows: <pre> getMappedSuperclass().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
MappedSuperclass
public List<Entity> getEntity()
Gets the value of the entity property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the entity property.
<p> For example, to add a new item, do as follows: <pre> getEntity().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
Entity
public List<Embeddable> getEmbeddable()
Gets the value of the embeddable property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the embeddable property.
<p> For example, to add a new item, do as follows: <pre> getEmbeddable().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
Embeddable
public List<Converter> getConverter()
Gets the value of the converter property.
<p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the converter property.
<p> For example, to add a new item, do as follows: <pre> getConverter().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
Converter
public String getVersion()
Gets the value of the version property.
StringCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.