Class Entity

  • All Implemented Interfaces:
    Mapping, Keyable<String>

    public class Entity
    extends Object
    implements Mapping, Keyable<String>
    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 ""; }

    Java class for entity complex type.

    The following schema fragment specifies the expected content contained within this class.

     <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://java.sun.com/xml/ns/persistence/orm}table" minOccurs="0"/>
             <element name="secondary-table" type="{http://java.sun.com/xml/ns/persistence/orm}secondary-table" maxOccurs="unbounded" minOccurs="0"/>
             <element name="primary-key-join-column" type="{http://java.sun.com/xml/ns/persistence/orm}primary-key-join-column" maxOccurs="unbounded" minOccurs="0"/>
             <element name="id-class" type="{http://java.sun.com/xml/ns/persistence/orm}id-class" minOccurs="0"/>
             <element name="inheritance" type="{http://java.sun.com/xml/ns/persistence/orm}inheritance" minOccurs="0"/>
             <element name="discriminator-value" type="{http://java.sun.com/xml/ns/persistence/orm}discriminator-value" minOccurs="0"/>
             <element name="discriminator-column" type="{http://java.sun.com/xml/ns/persistence/orm}discriminator-column" minOccurs="0"/>
             <element name="sequence-generator" type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator" minOccurs="0"/>
             <element name="table-generator" type="{http://java.sun.com/xml/ns/persistence/orm}table-generator" minOccurs="0"/>
             <element name="named-query" type="{http://java.sun.com/xml/ns/persistence/orm}named-query" maxOccurs="unbounded" minOccurs="0"/>
             <element name="named-native-query" type="{http://java.sun.com/xml/ns/persistence/orm}named-native-query" maxOccurs="unbounded" minOccurs="0"/>
             <element name="sql-result-set-mapping" type="{http://java.sun.com/xml/ns/persistence/orm}sql-result-set-mapping" maxOccurs="unbounded" minOccurs="0"/>
             <element name="exclude-default-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
             <element name="exclude-superclass-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}emptyType" minOccurs="0"/>
             <element name="entity-listeners" type="{http://java.sun.com/xml/ns/persistence/orm}entity-listeners" minOccurs="0"/>
             <element name="pre-persist" type="{http://java.sun.com/xml/ns/persistence/orm}pre-persist" minOccurs="0"/>
             <element name="post-persist" type="{http://java.sun.com/xml/ns/persistence/orm}post-persist" minOccurs="0"/>
             <element name="pre-remove" type="{http://java.sun.com/xml/ns/persistence/orm}pre-remove" minOccurs="0"/>
             <element name="post-remove" type="{http://java.sun.com/xml/ns/persistence/orm}post-remove" minOccurs="0"/>
             <element name="pre-update" type="{http://java.sun.com/xml/ns/persistence/orm}pre-update" minOccurs="0"/>
             <element name="post-update" type="{http://java.sun.com/xml/ns/persistence/orm}post-update" minOccurs="0"/>
             <element name="post-load" type="{http://java.sun.com/xml/ns/persistence/orm}post-load" minOccurs="0"/>
             <element name="attribute-override" type="{http://java.sun.com/xml/ns/persistence/orm}attribute-override" maxOccurs="unbounded" minOccurs="0"/>
             <element name="association-override" type="{http://java.sun.com/xml/ns/persistence/orm}association-override" maxOccurs="unbounded" minOccurs="0"/>
             <element name="attributes" type="{http://java.sun.com/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://java.sun.com/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>
     
    • Constructor Detail

      • Entity

        public Entity()
      • Entity

        public Entity​(String clazz)
    • Method Detail

      • getDescription

        public String getDescription()
        Gets the value of the description property.
        Specified by:
        getDescription in interface Mapping
        Returns:
        possible object is String
      • setDescription

        public void setDescription​(String value)
        Sets the value of the description property.
        Specified by:
        setDescription in interface Mapping
        Parameters:
        value - allowed object is String
      • getTable

        public Table getTable()
        Gets the value of the table property.
        Returns:
        possible object is Table
      • setTable

        public void setTable​(Table value)
        Sets the value of the table property.
        Parameters:
        value - allowed object is Table
      • getSecondaryTable

        public List<SecondaryTable> getSecondaryTable()
        Gets the value of the secondaryTable property. 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 set method for the secondaryTable property. For example, to add a new item, do as follows:
            getSecondaryTable().add(newItem);
         
        Objects of the following type(s) are allowed in the list SecondaryTable
      • getPrimaryKeyJoinColumn

        public List<PrimaryKeyJoinColumn> getPrimaryKeyJoinColumn()
        Gets the value of the primaryKeyJoinColumn property. 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 set method for the primaryKeyJoinColumn property. For example, to add a new item, do as follows:
            getPrimaryKeyJoinColumn().add(newItem);
         
        Objects of the following type(s) are allowed in the list PrimaryKeyJoinColumn
      • getIdClass

        public IdClass getIdClass()
        Gets the value of the idClass property.
        Specified by:
        getIdClass in interface Mapping
        Returns:
        possible object is IdClass
      • setIdClass

        public void setIdClass​(IdClass value)
        Sets the value of the idClass property.
        Specified by:
        setIdClass in interface Mapping
        Parameters:
        value - allowed object is IdClass
      • getInheritance

        public Inheritance getInheritance()
        Gets the value of the inheritance property.
        Returns:
        possible object is Inheritance
      • setInheritance

        public void setInheritance​(Inheritance value)
        Sets the value of the inheritance property.
        Parameters:
        value - allowed object is Inheritance
      • getDiscriminatorValue

        public String getDiscriminatorValue()
        Gets the value of the discriminatorValue property.
        Returns:
        possible object is String
      • setDiscriminatorValue

        public void setDiscriminatorValue​(String value)
        Sets the value of the discriminatorValue property.
        Parameters:
        value - allowed object is String
      • setDiscriminatorColumn

        public void setDiscriminatorColumn​(DiscriminatorColumn value)
        Sets the value of the discriminatorColumn property.
        Parameters:
        value - allowed object is DiscriminatorColumn
      • setSequenceGenerator

        public void setSequenceGenerator​(SequenceGenerator value)
        Sets the value of the sequenceGenerator property.
        Parameters:
        value - allowed object is SequenceGenerator
      • getTableGenerator

        public TableGenerator getTableGenerator()
        Gets the value of the tableGenerator property.
        Returns:
        possible object is TableGenerator
      • setTableGenerator

        public void setTableGenerator​(TableGenerator value)
        Sets the value of the tableGenerator property.
        Parameters:
        value - allowed object is TableGenerator
      • getNamedQuery

        public List<NamedQuery> getNamedQuery()
        Gets the value of the namedQuery property. 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 set method for the namedQuery property. For example, to add a new item, do as follows:
            getNamedQuery().add(newItem);
         
        Objects of the following type(s) are allowed in the list NamedQuery
      • getNamedNativeQuery

        public List<NamedNativeQuery> getNamedNativeQuery()
        Gets the value of the namedNativeQuery property. 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 set method for the namedNativeQuery property. For example, to add a new item, do as follows:
            getNamedNativeQuery().add(newItem);
         
        Objects of the following type(s) are allowed in the list NamedNativeQuery
      • getSqlResultSetMapping

        public List<SqlResultSetMapping> getSqlResultSetMapping()
        Gets the value of the sqlResultSetMapping property. 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 set method for the sqlResultSetMapping property. For example, to add a new item, do as follows:
            getSqlResultSetMapping().add(newItem);
         
        Objects of the following type(s) are allowed in the list SqlResultSetMapping
      • isExcludeDefaultListeners

        public boolean isExcludeDefaultListeners()
        Gets the value of the excludeDefaultListeners property.
        Specified by:
        isExcludeDefaultListeners in interface Mapping
        Returns:
        possible object is boolean
      • setExcludeDefaultListeners

        public void setExcludeDefaultListeners​(boolean value)
        Sets the value of the excludeDefaultListeners property.
        Specified by:
        setExcludeDefaultListeners in interface Mapping
        Parameters:
        value - allowed object is boolean
      • isExcludeSuperclassListeners

        public boolean isExcludeSuperclassListeners()
        Gets the value of the excludeSuperclassListeners property.
        Specified by:
        isExcludeSuperclassListeners in interface Mapping
        Returns:
        possible object is boolean
      • setExcludeSuperclassListeners

        public void setExcludeSuperclassListeners​(boolean value)
        Sets the value of the excludeSuperclassListeners property.
        Specified by:
        setExcludeSuperclassListeners in interface Mapping
        Parameters:
        value - allowed object is boolean
      • setPrePersist

        public void setPrePersist​(PrePersist value)
        Sets the value of the prePersist property.
        Specified by:
        setPrePersist in interface Mapping
        Parameters:
        value - allowed object is PrePersist
      • setPreRemove

        public void setPreRemove​(PreRemove value)
        Sets the value of the preRemove property.
        Specified by:
        setPreRemove in interface Mapping
        Parameters:
        value - allowed object is PreRemove
      • setPostRemove

        public void setPostRemove​(PostRemove value)
        Sets the value of the postRemove property.
        Specified by:
        setPostRemove in interface Mapping
        Parameters:
        value - allowed object is PostRemove
      • setPreUpdate

        public void setPreUpdate​(PreUpdate value)
        Sets the value of the preUpdate property.
        Specified by:
        setPreUpdate in interface Mapping
        Parameters:
        value - allowed object is PreUpdate
      • setPostUpdate

        public void setPostUpdate​(PostUpdate value)
        Sets the value of the postUpdate property.
        Specified by:
        setPostUpdate in interface Mapping
        Parameters:
        value - allowed object is PostUpdate
      • getPostLoad

        public PostLoad getPostLoad()
        Gets the value of the postLoad property.
        Specified by:
        getPostLoad in interface Mapping
        Returns:
        possible object is PostLoad
      • setPostLoad

        public void setPostLoad​(PostLoad value)
        Sets the value of the postLoad property.
        Specified by:
        setPostLoad in interface Mapping
        Parameters:
        value - allowed object is PostLoad
      • getAttributeOverride

        public List<AttributeOverride> getAttributeOverride()
        Gets the value of the attributeOverride property. 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 set method for the attributeOverride property. For example, to add a new item, do as follows:
            getAttributeOverride().add(newItem);
         
        Objects of the following type(s) are allowed in the list AttributeOverride
      • getAssociationOverride

        public List<AssociationOverride> getAssociationOverride()
        Gets the value of the associationOverride property. 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 set method for the associationOverride property. For example, to add a new item, do as follows:
            getAssociationOverride().add(newItem);
         
        Objects of the following type(s) are allowed in the list AssociationOverride
      • setAttributes

        public void setAttributes​(Attributes value)
        Sets the value of the attributes property.
        Specified by:
        setAttributes in interface Mapping
        Parameters:
        value - allowed object is Attributes
      • setAccess

        public void setAccess​(AccessType value)
        Sets the value of the access property.
        Specified by:
        setAccess in interface Mapping
        Parameters:
        value - allowed object is AccessType
      • getClazz

        public String getClazz()
        Gets the value of the clazz property.
        Specified by:
        getClazz in interface Mapping
        Returns:
        possible object is String
      • setClazz

        public void setClazz​(String value)
        Sets the value of the clazz property.
        Specified by:
        setClazz in interface Mapping
        Parameters:
        value - allowed object is String
      • isCacheable

        public Boolean isCacheable()
        Gets the value of the cacheable property.
        Returns:
        possible object is Boolean
      • setCacheable

        public void setCacheable​(Boolean value)
        Sets the value of the cacheable property.
        Parameters:
        value - allowed object is Boolean
      • isMetadataComplete

        public Boolean isMetadataComplete()
        Gets the value of the metadataComplete property.
        Specified by:
        isMetadataComplete in interface Mapping
        Returns:
        possible object is Boolean
      • setMetadataComplete

        public void setMetadataComplete​(Boolean value)
        Sets the value of the metadataComplete property.
        Specified by:
        setMetadataComplete in interface Mapping
        Parameters:
        value - allowed object is Boolean
      • getName

        public String getName()
        Gets the value of the name property.
        Returns:
        possible object is String
      • setName

        public void setName​(String value)
        Sets the value of the name property.
        Parameters:
        value - allowed object is String
      • getEjbName

        public String getEjbName()
      • setEjbName

        public void setEjbName​(String ejbName)
      • isXmlMetadataComplete

        public boolean isXmlMetadataComplete()
      • setXmlMetadataComplete

        public void setXmlMetadataComplete​(boolean xmlMetadataComplete)
      • getKey

        public String getKey()
        Description copied from interface: Keyable
        Gets the immutable key for this object.
        Specified by:
        getKey in interface Keyable<String>
        Returns:
        gets the immutable key for this object