Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.jpa.map
Class JpaEntity

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

All Implemented Interfaces:
  XMLSerializable

    public class JpaEntity

extends JpaAbstractEntity
implements XMLSerializable

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 Collection<JpaSqlResultSetMapping>` | `sqlResultSetMappings`
`protected JpaEntity` | `superEntity`
`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
`void` | `encodeAsXML(XMLEncoder encoder)` Prints itself as XML to the provided XMLEncoder.
`Collection<JpaAssociationOverride>` | `getAssociationOverrides()`
`Collection<JpaAttributeOverride>` | `getAttributeOverrides()` Returns a collection of attribute overrides.
`JpaDiscriminatorColumn` | `getDiscriminatorColumn()`
`String` | `getDiscriminatorValue()` Returns discriminatorValue property.
`JpaInheritance` | `getInheritance()` Returns a child JpaInheritance object that is only set on a root of inheritance hierarchy.
`String` | `getName()`
`Collection<JpaNamedNativeQuery>` | `getNamedNativeQueries()`
`Collection<JpaNamedQuery>` | `getNamedQueries()`
`Collection<JpaPrimaryKeyJoinColumn>` | `getPrimaryKeyJoinColumns()` Returns a collection of `JpaPrimaryKeyJoinColumn` objects that reference keys of a primary table.
`JpaSecondaryTable` | `getSecondaryTable(String name)`
`Collection<JpaSecondaryTable>` | `getSecondaryTables()`
`JpaSequenceGenerator` | `getSequenceGenerator()`
`Collection<JpaSqlResultSetMapping>` | `getSqlResultSetMappings()`
`JpaEntity` | `getSuperEntity()`
`JpaTable` | `getTable()`
`JpaTableGenerator` | `getTableGenerator()`
`JpaDiscriminatorColumn` | `lookupDiscriminatorColumn()` Returns a discriminator column for this entity hierarchy.
`javax.persistence.InheritanceType` | `lookupInheritanceStrategy()` Returns inheritance type for this entity hierarchy.
`JpaTable` | `lookupTable()` Returns a table for this entity hierarchy.
`void` | `setDiscriminatorColumn(JpaDiscriminatorColumn discriminatorColumn)`
`void` | `setDiscriminatorValue(String discriminatorValue)`
`void` | `setInheritance(JpaInheritance inheritance)`
`void` | `setName(String name)`
`void` | `setSequenceGenerator(JpaSequenceGenerator sequenceGenerator)`
`void` | `setSuperEntity(JpaEntity superEntity)`
`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

### sqlResultSetMappings

    protected Collection<JpaSqlResultSetMapping> sqlResultSetMappings

### attributeOverrides

    protected Collection<JpaAttributeOverride> attributeOverrides

### associationOverrides

    protected Collection<JpaAssociationOverride> associationOverrides

### superEntity

    protected JpaEntity superEntity

### 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

### encodeAsXML

    public void encodeAsXML(XMLEncoder encoder)

  Description copied from interface: `XMLSerializable`
  Prints itself as XML to the provided XMLEncoder.

  Specified by:
    `encodeAsXML` in interface `XMLSerializable`

### 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()

  Returns a child JpaInheritance object that is only set on a root of inheritance hierarchy.

### lookupInheritanceStrategy

    public javax.persistence.InheritanceType lookupInheritanceStrategy()

  Returns inheritance type for this entity hierarchy. If the entity has no inheritance settings, returns null.

### lookupTable

    public JpaTable lookupTable()

  Returns a table for this entity hierarchy.

### lookupDiscriminatorColumn

    public JpaDiscriminatorColumn lookupDiscriminatorColumn()

  Returns a discriminator column for this entity hierarchy.

### setInheritance

    public void setInheritance(JpaInheritance inheritance)

### getSequenceGenerator

    public JpaSequenceGenerator getSequenceGenerator()

### setSequenceGenerator

    public void setSequenceGenerator(JpaSequenceGenerator sequenceGenerator)

### getSqlResultSetMappings

    public Collection<JpaSqlResultSetMapping> getSqlResultSetMappings()

### 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 `InheritanceType.JOINED` mapping scenario.

### getSecondaryTables

    public Collection<JpaSecondaryTable> getSecondaryTables()

### getSecondaryTable

    public JpaSecondaryTable getSecondaryTable(String name)

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getSuperEntity

    public JpaEntity getSuperEntity()

### setSuperEntity

    public void setSuperEntity(JpaEntity superEntity)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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