org.apache.cayenne.jpa.map
Class JpaEntity

java.lang.Object
  extended by org.apache.cayenne.jpa.map.JpaManagedClass
      extended by org.apache.cayenne.jpa.map.JpaAbstractEntity
          extended by org.apache.cayenne.jpa.map.JpaEntity

public class JpaEntity
extends JpaAbstractEntity

A JPA-compliant entity.

Author:
Andrus Adamchik

Field Summary
protected  Collection<JpaAssociationOverride> associationOverrides
           
protected  Collection<JpaAttributeOverride> attributeOverrides
           
protected  JpaDiscriminatorColumn discriminatorColumn
           
protected  String discriminatorValue
           
protected  JpaInheritance inheritance
           
protected  String name
           
protected  Collection<JpaNamedNativeQuery> namedNativeQueries
           
protected  Collection<JpaNamedQuery> namedQueries
           
protected  Collection<JpaPrimaryKeyJoinColumn> primaryKeyJoinColumns
           
protected  Collection<JpaSecondaryTable> secondaryTables
           
protected  JpaSequenceGenerator sequenceGenerator
           
protected  JpaSqlResultSetMapping sqlResultSetMapping
           
protected  JpaTable table
           
protected  JpaTableGenerator tableGenerator
           
 
Fields inherited from class org.apache.cayenne.jpa.map.JpaAbstractEntity
entityListeners, excludeDefaultListeners, excludeSuperclassListeners, idClass, postLoad, postPersist, postRemove, postUpdate, prePersist, preRemove, preUpdate
 
Fields inherited from class org.apache.cayenne.jpa.map.JpaManagedClass
access, attributes, classDescriptor, className, description, metadataComplete
 
Constructor Summary
JpaEntity()
           
 
Method Summary
 Collection<JpaAssociationOverride> getAssociationOverrides()
           
 Collection<JpaAttributeOverride> getAttributeOverrides()
          Returns a collection of attribute overrides.
 JpaDiscriminatorColumn getDiscriminatorColumn()
           
 String getDiscriminatorValue()
          Returns discriminatorValue property.
 JpaInheritance getInheritance()
           
 String getName()
           
 Collection<JpaNamedNativeQuery> getNamedNativeQueries()
           
 Collection<JpaNamedQuery> getNamedQueries()
           
 Collection<JpaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
          Returns a collection of JpaPrimaryKeyJoinColumn objects that reference keys of a primary table.
 Collection<JpaSecondaryTable> getSecondaryTables()
           
 JpaSequenceGenerator getSequenceGenerator()
           
 JpaSqlResultSetMapping getSqlResultSetMapping()
           
 JpaTable getTable()
           
 JpaTableGenerator getTableGenerator()
           
 void setDiscriminatorColumn(JpaDiscriminatorColumn discriminatorColumn)
           
 void setDiscriminatorValue(String discriminatorValue)
           
 void setInheritance(JpaInheritance inheritance)
           
 void setName(String name)
           
 void setSequenceGenerator(JpaSequenceGenerator sequenceGenerator)
           
 void setSqlResultSetMapping(JpaSqlResultSetMapping sqlResultSetMapping)
           
 void setTable(JpaTable table)
           
 void setTableGenerator(JpaTableGenerator tableGenerator)
           
 String toString()
           
 
Methods inherited from class org.apache.cayenne.jpa.map.JpaAbstractEntity
getEntityListeners, getIdClass, getPostLoad, getPostPersist, getPostRemove, getPostUpdate, getPrePersist, getPreRemove, getPreUpdate, isExcludeDefaultListeners, isExcludeSuperclassListeners, setEntityListeners, setExcludeDefaultListeners, setExcludeDefaultListenersTrue, setExcludeSuperclassListeners, setExcludeSuperclassListenersTrue, setIdClass, setPostLoad, setPostPersist, setPostRemove, setPostUpdate, setPrePersist, setPreRemove, setPreUpdate
 
Methods inherited from class org.apache.cayenne.jpa.map.JpaManagedClass
getAccess, getAttributes, getClassDescriptor, getClassName, getDescription, isMetadataComplete, setAccess, setAttributes, setClassDescriptor, setClassName, setDescription, setMetadataComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name

table

protected JpaTable table

inheritance

protected JpaInheritance inheritance

discriminatorValue

protected String discriminatorValue

discriminatorColumn

protected JpaDiscriminatorColumn discriminatorColumn

sequenceGenerator

protected JpaSequenceGenerator sequenceGenerator

tableGenerator

protected JpaTableGenerator tableGenerator

sqlResultSetMapping

protected JpaSqlResultSetMapping sqlResultSetMapping

attributeOverrides

protected Collection<JpaAttributeOverride> attributeOverrides

associationOverrides

protected Collection<JpaAssociationOverride> associationOverrides

namedQueries

protected Collection<JpaNamedQuery> namedQueries

namedNativeQueries

protected Collection<JpaNamedNativeQuery> namedNativeQueries

secondaryTables

protected Collection<JpaSecondaryTable> secondaryTables

primaryKeyJoinColumns

protected Collection<JpaPrimaryKeyJoinColumn> primaryKeyJoinColumns
Constructor Detail

JpaEntity

public JpaEntity()
Method Detail

getName

public String getName()

setName

public void setName(String name)

getDiscriminatorColumn

public JpaDiscriminatorColumn getDiscriminatorColumn()

setDiscriminatorColumn

public void setDiscriminatorColumn(JpaDiscriminatorColumn discriminatorColumn)

getDiscriminatorValue

public String getDiscriminatorValue()
Returns discriminatorValue property.

Specification Documentation

Description: An optional value that indicates that the row is an entity of this entity type.

Default: If the DiscriminatorValue annotation is not specified, a provider-specific function to generate a value representing the entity type is used for the value of the discriminator column. If the DiscriminatorType is STRING, the discriminator value default is the entity name.


setDiscriminatorValue

public void setDiscriminatorValue(String discriminatorValue)

getInheritance

public JpaInheritance getInheritance()

setInheritance

public void setInheritance(JpaInheritance inheritance)

getSequenceGenerator

public JpaSequenceGenerator getSequenceGenerator()

setSequenceGenerator

public void setSequenceGenerator(JpaSequenceGenerator sequenceGenerator)

getSqlResultSetMapping

public JpaSqlResultSetMapping getSqlResultSetMapping()

setSqlResultSetMapping

public void setSqlResultSetMapping(JpaSqlResultSetMapping sqlResultSetMapping)

getTable

public JpaTable getTable()

setTable

public void setTable(JpaTable table)

getTableGenerator

public JpaTableGenerator getTableGenerator()

setTableGenerator

public void setTableGenerator(JpaTableGenerator tableGenerator)

getAttributeOverrides

public Collection<JpaAttributeOverride> getAttributeOverrides()
Returns a collection of attribute overrides. Attribute overrides allows to change the definition of attributes from a mapped superclass.


getAssociationOverrides

public Collection<JpaAssociationOverride> getAssociationOverrides()

getNamedNativeQueries

public Collection<JpaNamedNativeQuery> getNamedNativeQueries()

getNamedQueries

public Collection<JpaNamedQuery> getNamedQueries()

getPrimaryKeyJoinColumns

public Collection<JpaPrimaryKeyJoinColumn> getPrimaryKeyJoinColumns()
Returns a collection of JpaPrimaryKeyJoinColumn objects that reference keys of a primary table. PK join columns used by subclasses in a javax.persistence.InheritanceType#JOINED mapping scenario.


getSecondaryTables

public Collection<JpaSecondaryTable> getSecondaryTables()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2007 Apache Cayenne. All Rights Reserved.