@Target(TYPE) @Retention(RUNTIME)
public @interface Entity {
String name() default "";
}
public class Entity extends Object
Defines the settings and mappings for an entity. Is allowed to be sparsely populated and used in conjunction with the annotations. Alternatively, the metadata-complete attribute can be used to indicate 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.
@Target(TYPE) @Retention(RUNTIME)
public @interface Entity {
String name() default "";
}
<p>Java class for entity complex type.
<p>The following schema fragment specifies the expected content contained within this class.
<pre> <complexType name="entity"> <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="table" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}table" minOccurs="0"/> <element name="secondary-table" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}secondary-table" maxOccurs="unbounded" minOccurs="0"/> <sequence> <element name="primary-key-join-column" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}primary-key-join-column" maxOccurs="unbounded" minOccurs="0"/> <element name="primary-key-foreign-key" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}foreign-key" minOccurs="0"/> </sequence> <element name="id-class" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}id-class" minOccurs="0"/> <element name="inheritance" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}inheritance" minOccurs="0"/> <element name="discriminator-value" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}discriminator-value" minOccurs="0"/> <element name="discriminator-column" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}discriminator-column" minOccurs="0"/> <element name="sequence-generator" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}sequence-generator" minOccurs="0"/> <element name="table-generator" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}table-generator" 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="exclude-default-listeners" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}emptyType" minOccurs="0"/> <element name="exclude-superclass-listeners" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}emptyType" minOccurs="0"/> <element name="entity-listeners" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}entity-listeners" minOccurs="0"/> <element name="pre-persist" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}pre-persist" minOccurs="0"/> <element name="post-persist" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}post-persist" minOccurs="0"/> <element name="pre-remove" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}pre-remove" minOccurs="0"/> <element name="post-remove" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}post-remove" minOccurs="0"/> <element name="pre-update" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}pre-update" minOccurs="0"/> <element name="post-update" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}post-update" minOccurs="0"/> <element name="post-load" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}post-load" minOccurs="0"/> <element name="attribute-override" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/> <element name="association-override" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}association-override" maxOccurs="unbounded" minOccurs="0"/> <element name="convert" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}convert" maxOccurs="unbounded" minOccurs="0"/> <element name="named-entity-graph" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}named-entity-graph" maxOccurs="unbounded" minOccurs="0"/> <element name="attributes" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}attributes" minOccurs="0"/> </sequence> <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="class" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="access" type="{http://xmlns.jcp.org/xml/ns/persistence/orm}access-type" /> <attribute name="cacheable" type="{http://www.w3.org/2001/XMLSchema}boolean" /> <attribute name="metadata-complete" type="{http://www.w3.org/2001/XMLSchema}boolean" /> </restriction> </complexContent> </complexType> </pre>
| Constructor and Description |
|---|
Entity() |
| Modifier and Type | Method and Description |
|---|---|
AccessType |
getAccess()
Gets the value of the access property.
|
List<AssociationOverride> |
getAssociationOverride()
Gets the value of the associationOverride property.
|
List<AttributeOverride> |
getAttributeOverride()
Gets the value of the attributeOverride property.
|
Attributes |
getAttributes()
Gets the value of the attributes property.
|
String |
getClazz()
Gets the value of the clazz property.
|
List<Convert> |
getConvert()
Gets the value of the convert property.
|
String |
getDescription()
Gets the value of the description property.
|
DiscriminatorColumn |
getDiscriminatorColumn()
Gets the value of the discriminatorColumn property.
|
String |
getDiscriminatorValue()
Gets the value of the discriminatorValue property.
|
EntityListeners |
getEntityListeners()
Gets the value of the entityListeners property.
|
EmptyType |
getExcludeDefaultListeners()
Gets the value of the excludeDefaultListeners property.
|
EmptyType |
getExcludeSuperclassListeners()
Gets the value of the excludeSuperclassListeners property.
|
IdClass |
getIdClass()
Gets the value of the idClass property.
|
Inheritance |
getInheritance()
Gets the value of the inheritance property.
|
String |
getName()
Gets the value of the name property.
|
List<NamedEntityGraph> |
getNamedEntityGraph()
Gets the value of the namedEntityGraph 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.
|
PostLoad |
getPostLoad()
Gets the value of the postLoad property.
|
PostPersist |
getPostPersist()
Gets the value of the postPersist property.
|
PostRemove |
getPostRemove()
Gets the value of the postRemove property.
|
PostUpdate |
getPostUpdate()
Gets the value of the postUpdate property.
|
PrePersist |
getPrePersist()
Gets the value of the prePersist property.
|
PreRemove |
getPreRemove()
Gets the value of the preRemove property.
|
PreUpdate |
getPreUpdate()
Gets the value of the preUpdate property.
|
ForeignKey |
getPrimaryKeyForeignKey()
Gets the value of the primaryKeyForeignKey property.
|
List<PrimaryKeyJoinColumn> |
getPrimaryKeyJoinColumn()
Gets the value of the primaryKeyJoinColumn property.
|
List<SecondaryTable> |
getSecondaryTable()
Gets the value of the secondaryTable property.
|
SequenceGenerator |
getSequenceGenerator()
Gets the value of the sequenceGenerator property.
|
List<SqlResultSetMapping> |
getSqlResultSetMapping()
Gets the value of the sqlResultSetMapping property.
|
Table |
getTable()
Gets the value of the table property.
|
TableGenerator |
getTableGenerator()
Gets the value of the tableGenerator property.
|
Boolean |
isCacheable()
Gets the value of the cacheable property.
|
Boolean |
isMetadataComplete()
Gets the value of the metadataComplete property.
|
void |
setAccess(AccessType value)
Sets the value of the access property.
|
void |
setAttributes(Attributes value)
Sets the value of the attributes property.
|
void |
setCacheable(Boolean value)
Sets the value of the cacheable property.
|
void |
setClazz(String value)
Sets the value of the clazz property.
|
void |
setDescription(String value)
Sets the value of the description property.
|
void |
setDiscriminatorColumn(DiscriminatorColumn value)
Sets the value of the discriminatorColumn property.
|
void |
setDiscriminatorValue(String value)
Sets the value of the discriminatorValue property.
|
void |
setEntityListeners(EntityListeners value)
Sets the value of the entityListeners property.
|
void |
setExcludeDefaultListeners(EmptyType value)
Sets the value of the excludeDefaultListeners property.
|
void |
setExcludeSuperclassListeners(EmptyType value)
Sets the value of the excludeSuperclassListeners property.
|
void |
setIdClass(IdClass value)
Sets the value of the idClass property.
|
void |
setInheritance(Inheritance value)
Sets the value of the inheritance property.
|
void |
setMetadataComplete(Boolean value)
Sets the value of the metadataComplete property.
|
void |
setName(String value)
Sets the value of the name property.
|
void |
setPostLoad(PostLoad value)
Sets the value of the postLoad property.
|
void |
setPostPersist(PostPersist value)
Sets the value of the postPersist property.
|
void |
setPostRemove(PostRemove value)
Sets the value of the postRemove property.
|
void |
setPostUpdate(PostUpdate value)
Sets the value of the postUpdate property.
|
void |
setPrePersist(PrePersist value)
Sets the value of the prePersist property.
|
void |
setPreRemove(PreRemove value)
Sets the value of the preRemove property.
|
void |
setPreUpdate(PreUpdate value)
Sets the value of the preUpdate property.
|
void |
setPrimaryKeyForeignKey(ForeignKey value)
Sets the value of the primaryKeyForeignKey property.
|
void |
setSequenceGenerator(SequenceGenerator value)
Sets the value of the sequenceGenerator property.
|
void |
setTable(Table value)
Sets the value of the table property.
|
void |
setTableGenerator(TableGenerator value)
Sets the value of the tableGenerator property.
|
protected String description
protected Table table
protected List<SecondaryTable> secondaryTable
protected List<PrimaryKeyJoinColumn> primaryKeyJoinColumn
protected ForeignKey primaryKeyForeignKey
protected IdClass idClass
protected Inheritance inheritance
protected String discriminatorValue
protected DiscriminatorColumn discriminatorColumn
protected SequenceGenerator sequenceGenerator
protected TableGenerator tableGenerator
protected List<NamedQuery> namedQuery
protected List<NamedNativeQuery> namedNativeQuery
protected List<NamedStoredProcedureQuery> namedStoredProcedureQuery
protected List<SqlResultSetMapping> sqlResultSetMapping
protected EmptyType excludeDefaultListeners
protected EmptyType excludeSuperclassListeners
protected EntityListeners entityListeners
protected PrePersist prePersist
protected PostPersist postPersist
protected PreRemove preRemove
protected PostRemove postRemove
protected PreUpdate preUpdate
protected PostUpdate postUpdate
protected PostLoad postLoad
protected List<AttributeOverride> attributeOverride
protected List<AssociationOverride> associationOverride
protected List<NamedEntityGraph> namedEntityGraph
protected Attributes attributes
protected String name
protected String clazz
protected AccessType access
protected Boolean cacheable
protected Boolean metadataComplete
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 Table getTable()
Gets the value of the table property.
Tablepublic void setTable(Table value)
Sets the value of the table property.
value - allowed object is
Tablepublic List<SecondaryTable> getSecondaryTable()
Gets the value of the secondaryTable 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 secondaryTable property.
<p> For example, to add a new item, do as follows: <pre> getSecondaryTable().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
SecondaryTable
public List<PrimaryKeyJoinColumn> getPrimaryKeyJoinColumn()
Gets the value of the primaryKeyJoinColumn 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 primaryKeyJoinColumn property.
<p> For example, to add a new item, do as follows: <pre> getPrimaryKeyJoinColumn().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
PrimaryKeyJoinColumn
public ForeignKey getPrimaryKeyForeignKey()
Gets the value of the primaryKeyForeignKey property.
ForeignKeypublic void setPrimaryKeyForeignKey(ForeignKey value)
Sets the value of the primaryKeyForeignKey property.
value - allowed object is
ForeignKeypublic IdClass getIdClass()
Gets the value of the idClass property.
IdClasspublic void setIdClass(IdClass value)
Sets the value of the idClass property.
value - allowed object is
IdClasspublic Inheritance getInheritance()
Gets the value of the inheritance property.
Inheritancepublic void setInheritance(Inheritance value)
Sets the value of the inheritance property.
value - allowed object is
Inheritancepublic String getDiscriminatorValue()
Gets the value of the discriminatorValue property.
Stringpublic void setDiscriminatorValue(String value)
Sets the value of the discriminatorValue property.
value - allowed object is
Stringpublic DiscriminatorColumn getDiscriminatorColumn()
Gets the value of the discriminatorColumn property.
DiscriminatorColumnpublic void setDiscriminatorColumn(DiscriminatorColumn value)
Sets the value of the discriminatorColumn property.
value - allowed object is
DiscriminatorColumnpublic SequenceGenerator getSequenceGenerator()
Gets the value of the sequenceGenerator property.
SequenceGeneratorpublic void setSequenceGenerator(SequenceGenerator value)
Sets the value of the sequenceGenerator property.
value - allowed object is
SequenceGeneratorpublic TableGenerator getTableGenerator()
Gets the value of the tableGenerator property.
TableGeneratorpublic void setTableGenerator(TableGenerator value)
Sets the value of the tableGenerator property.
value - allowed object is
TableGeneratorpublic 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 EmptyType getExcludeDefaultListeners()
Gets the value of the excludeDefaultListeners property.
EmptyTypepublic void setExcludeDefaultListeners(EmptyType value)
Sets the value of the excludeDefaultListeners property.
value - allowed object is
EmptyTypepublic EmptyType getExcludeSuperclassListeners()
Gets the value of the excludeSuperclassListeners property.
EmptyTypepublic void setExcludeSuperclassListeners(EmptyType value)
Sets the value of the excludeSuperclassListeners property.
value - allowed object is
EmptyTypepublic EntityListeners getEntityListeners()
Gets the value of the entityListeners property.
EntityListenerspublic void setEntityListeners(EntityListeners value)
Sets the value of the entityListeners property.
value - allowed object is
EntityListenerspublic PrePersist getPrePersist()
Gets the value of the prePersist property.
PrePersistpublic void setPrePersist(PrePersist value)
Sets the value of the prePersist property.
value - allowed object is
PrePersistpublic PostPersist getPostPersist()
Gets the value of the postPersist property.
PostPersistpublic void setPostPersist(PostPersist value)
Sets the value of the postPersist property.
value - allowed object is
PostPersistpublic PreRemove getPreRemove()
Gets the value of the preRemove property.
PreRemovepublic void setPreRemove(PreRemove value)
Sets the value of the preRemove property.
value - allowed object is
PreRemovepublic PostRemove getPostRemove()
Gets the value of the postRemove property.
PostRemovepublic void setPostRemove(PostRemove value)
Sets the value of the postRemove property.
value - allowed object is
PostRemovepublic PreUpdate getPreUpdate()
Gets the value of the preUpdate property.
PreUpdatepublic void setPreUpdate(PreUpdate value)
Sets the value of the preUpdate property.
value - allowed object is
PreUpdatepublic PostUpdate getPostUpdate()
Gets the value of the postUpdate property.
PostUpdatepublic void setPostUpdate(PostUpdate value)
Sets the value of the postUpdate property.
value - allowed object is
PostUpdatepublic PostLoad getPostLoad()
Gets the value of the postLoad property.
PostLoadpublic void setPostLoad(PostLoad value)
Sets the value of the postLoad property.
value - allowed object is
PostLoadpublic List<AttributeOverride> getAttributeOverride()
Gets the value of the attributeOverride 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 attributeOverride property.
<p> For example, to add a new item, do as follows: <pre> getAttributeOverride().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
AttributeOverride
public List<AssociationOverride> getAssociationOverride()
Gets the value of the associationOverride 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 associationOverride property.
<p> For example, to add a new item, do as follows: <pre> getAssociationOverride().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
AssociationOverride
public List<Convert> getConvert()
Gets the value of the convert 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 convert property.
<p> For example, to add a new item, do as follows: <pre> getConvert().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
Convert
public List<NamedEntityGraph> getNamedEntityGraph()
Gets the value of the namedEntityGraph 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 namedEntityGraph property.
<p> For example, to add a new item, do as follows: <pre> getNamedEntityGraph().add(newItem); </pre>
<p>
Objects of the following type(s) are allowed in the list
NamedEntityGraph
public Attributes getAttributes()
Gets the value of the attributes property.
Attributespublic void setAttributes(Attributes value)
Sets the value of the attributes property.
value - allowed object is
Attributespublic String getName()
Gets the value of the name property.
Stringpublic void setName(String value)
Sets the value of the name property.
value - allowed object is
Stringpublic String getClazz()
Gets the value of the clazz property.
Stringpublic void setClazz(String value)
Sets the value of the clazz 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 Boolean isCacheable()
Gets the value of the cacheable property.
Booleanpublic void setCacheable(Boolean value)
Sets the value of the cacheable property.
value - allowed object is
Booleanpublic Boolean isMetadataComplete()
Gets the value of the metadataComplete property.
BooleanCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.