org.eclipse.jpt.core.context.java
Interface JavaEntity

All Superinterfaces:
Entity, GeneratorHolder, org.eclipse.core.runtime.IAdaptable, IdClass, JavaGeneratorHolder, JavaJpaContextNode, JavaTypeMapping, JpaContextNode, JpaNode, Model, QueryHolder, TypeMapping

public interface JavaEntity
extends JavaTypeMapping, Entity, JavaGeneratorHolder

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Field Summary
 
Fields inherited from interface org.eclipse.jpt.core.context.Entity
DEFAULT_DISCRIMINATOR_VALUE_PROPERTY, DEFAULT_INHERITANCE_STRATEGY_PROPERTY, DEFAULT_NAME_PROPERTY, DEFAULT_PRIMARY_KEY_JOIN_COLUMN, DISCRIMINATOR_VALUE_ALLOWED_PROPERTY, SPECIFIED_ASSOCIATION_OVERRIDES_LIST, SPECIFIED_ATTRIBUTE_OVERRIDES_LIST, SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, SPECIFIED_NAME_PROPERTY, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, SPECIFIED_SECONDARY_TABLES_LIST, VIRTUAL_ASSOCIATION_OVERRIDES_LIST, VIRTUAL_ATTRIBUTE_OVERRIDES_LIST
 
Fields inherited from interface org.eclipse.jpt.core.context.GeneratorHolder
SEQUENCE_GENERATOR_PROPERTY, TABLE_GENERATOR_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.core.context.QueryHolder
NAMED_NATIVE_QUERIES_LIST, NAMED_QUERIES_LIST
 
Fields inherited from interface org.eclipse.jpt.core.context.IdClass
ID_CLASS_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.core.context.GeneratorHolder
SEQUENCE_GENERATOR_PROPERTY, TABLE_GENERATOR_PROPERTY
 
Method Summary
 JavaNamedNativeQuery addNamedNativeQuery(int index)
          Add a named native query to the entity return the object representing it.
 JavaNamedQuery addNamedQuery(int index)
          Add a named query to the entity return the object representing it.
 JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index)
           
 JavaSecondaryTable addSpecifiedSecondaryTable(int index)
          Add a specified secondary table to the entity return the object representing it.
 java.util.ListIterator<JavaAssociationOverride> associationOverrides()
          Return a list iterator of the association overrides whether specified or default.
 java.util.ListIterator<JavaAttributeOverride> attributeOverrides()
          Return a list iterator of the attribute overrides whether specified or default.
 JavaAttributeOverride getAttributeOverrideNamed(java.lang.String name)
          Return the attribute overrides, whether specified or default, with the given name.
 JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn()
           
 JavaDiscriminatorColumn getDiscriminatorColumn()
           
 JavaTable getTable()
          Return the table for this entity, either specified or default.
 java.util.ListIterator<JavaNamedNativeQuery> namedNativeQueries()
          Return a list iterator of the specified named native queries.
 java.util.ListIterator<JavaNamedQuery> namedQueries()
          Return a list iterator of the named queries.
 java.util.Iterator<JavaPersistentAttribute> overridableAssociations()
          Return an Iterator of associations that can be overriden.
 java.util.Iterator<JavaPersistentAttribute> overridableAttributes()
          Return an Iterator of attributes.
 java.util.ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns()
           
 java.util.ListIterator<JavaSecondaryTable> secondaryTables()
          Return a list iterator of the secondary tables whether specified or default.
 java.util.ListIterator<JavaAssociationOverride> specifiedAssociationOverrides()
          Return a list iterator of the specified association overrides.
 java.util.ListIterator<JavaAttributeOverride> specifiedAttributeOverrides()
          Return a list iterator of the specified attribute overrides.
 java.util.ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns()
           
 java.util.ListIterator<JavaSecondaryTable> specifiedSecondaryTables()
          Return a list iterator of the specified secondary tables.
 java.util.ListIterator<JavaAssociationOverride> virtualAssociationOverrides()
          Return the number of default association overrides.
 java.util.ListIterator<JavaAttributeOverride> virtualAttributeOverrides()
          Return a list iterator of the virtual attribute overrides, those not specified.
 
Methods inherited from interface org.eclipse.jpt.core.context.java.JavaTypeMapping
correspondingAnnotationNames, getAnnotationName, getPersistentType, initializeFromResource, update
 
Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping
allOverridableAssociationNames, allOverridableAssociations, allOverridableAttributeNames, allOverridableAttributes, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getDbSchema, getDbTable, getKey, getPrimaryDbTable, getTableName, isMapped, overridableAssociationNames, overridableAttributeNames, tableNameIsInvalid
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.java.JavaJpaContextNode
addToMessages, getValidationTextRange, javaCompletionProposals
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.Entity
associationOverridesSize, attributeOverridesSize, getDefaultDiscriminatorValue, getDefaultInheritanceStrategy, getDefaultName, getDiscriminatorValue, getInheritanceStrategy, getName, getParentEntity, getPrimaryKeyColumnName, getRootEntity, getSpecifiedDiscriminatorValue, getSpecifiedInheritanceStrategy, getSpecifiedName, isDiscriminatorValueAllowed, moveSpecifiedAssociationOverride, moveSpecifiedAttributeOverride, moveSpecifiedPrimaryKeyJoinColumn, moveSpecifiedSecondaryTable, primaryKeyJoinColumnsSize, removeSpecifiedPrimaryKeyJoinColumn, removeSpecifiedPrimaryKeyJoinColumn, removeSpecifiedSecondaryTable, removeSpecifiedSecondaryTable, secondaryTablesSize, setSpecifiedDiscriminatorValue, setSpecifiedInheritanceStrategy, setSpecifiedName, specifiedAssociationOverridesSize, specifiedAttributeOverridesSize, specifiedPrimaryKeyJoinColumnsSize, specifiedSecondaryTablesSize, virtualAssociationOverridesSize, virtualAttributeOverridesSize
 
Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping
allOverridableAssociationNames, allOverridableAssociations, allOverridableAttributeNames, allOverridableAttributes, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getDbSchema, getDbTable, getKey, getPrimaryDbTable, getTableName, isMapped, overridableAssociationNames, overridableAttributeNames, tableNameIsInvalid
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.GeneratorHolder
removeSequenceGenerator, removeTableGenerator
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.QueryHolder
moveNamedNativeQuery, moveNamedQuery, namedNativeQueriesSize, namedQueriesSize, removeNamedNativeQuery, removeNamedNativeQuery, removeNamedQuery, removeNamedQuery
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.IdClass
getIdClass, setIdClass
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.context.java.JavaGeneratorHolder
addSequenceGenerator, addTableGenerator, getSequenceGenerator, getTableGenerator
 
Methods inherited from interface org.eclipse.jpt.core.context.GeneratorHolder
removeSequenceGenerator, removeTableGenerator
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

getTable

JavaTable getTable()
Description copied from interface: Entity
Return the table for this entity, either specified or default. This will not be null.

Specified by:
getTable in interface Entity

getDiscriminatorColumn

JavaDiscriminatorColumn getDiscriminatorColumn()
Specified by:
getDiscriminatorColumn in interface Entity

secondaryTables

java.util.ListIterator<JavaSecondaryTable> secondaryTables()
Description copied from interface: Entity
Return a list iterator of the secondary tables whether specified or default. This will not be null.

Specified by:
secondaryTables in interface Entity

specifiedSecondaryTables

java.util.ListIterator<JavaSecondaryTable> specifiedSecondaryTables()
Description copied from interface: Entity
Return a list iterator of the specified secondary tables. This will not be null.

Specified by:
specifiedSecondaryTables in interface Entity

addSpecifiedSecondaryTable

JavaSecondaryTable addSpecifiedSecondaryTable(int index)
Description copied from interface: Entity
Add a specified secondary table to the entity return the object representing it.

Specified by:
addSpecifiedSecondaryTable in interface Entity

primaryKeyJoinColumns

java.util.ListIterator<JavaPrimaryKeyJoinColumn> primaryKeyJoinColumns()
Specified by:
primaryKeyJoinColumns in interface Entity

getDefaultPrimaryKeyJoinColumn

JavaPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn()
Specified by:
getDefaultPrimaryKeyJoinColumn in interface Entity

specifiedPrimaryKeyJoinColumns

java.util.ListIterator<JavaPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns()
Specified by:
specifiedPrimaryKeyJoinColumns in interface Entity

addSpecifiedPrimaryKeyJoinColumn

JavaPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index)
Specified by:
addSpecifiedPrimaryKeyJoinColumn in interface Entity

attributeOverrides

java.util.ListIterator<JavaAttributeOverride> attributeOverrides()
Description copied from interface: Entity
Return a list iterator of the attribute overrides whether specified or default. This will not be null.

Specified by:
attributeOverrides in interface Entity

specifiedAttributeOverrides

java.util.ListIterator<JavaAttributeOverride> specifiedAttributeOverrides()
Description copied from interface: Entity
Return a list iterator of the specified attribute overrides. This will not be null. No add/remove for specified attribute overrides, the virtual attribute overrides will be populated from superclasses, then use AttributeOverride.setVirtual(boolean) to add/remove the attribute override from the source

Specified by:
specifiedAttributeOverrides in interface Entity

virtualAttributeOverrides

java.util.ListIterator<JavaAttributeOverride> virtualAttributeOverrides()
Description copied from interface: Entity
Return a list iterator of the virtual attribute overrides, those not specified. This will not be null.

Specified by:
virtualAttributeOverrides in interface Entity

getAttributeOverrideNamed

JavaAttributeOverride getAttributeOverrideNamed(java.lang.String name)
Description copied from interface: Entity
Return the attribute overrides, whether specified or default, with the given name.

Specified by:
getAttributeOverrideNamed in interface Entity

associationOverrides

java.util.ListIterator<JavaAssociationOverride> associationOverrides()
Description copied from interface: Entity
Return a list iterator of the association overrides whether specified or default. This will not be null.

Specified by:
associationOverrides in interface Entity

specifiedAssociationOverrides

java.util.ListIterator<JavaAssociationOverride> specifiedAssociationOverrides()
Description copied from interface: Entity
Return a list iterator of the specified association overrides. This will not be null. No add/remove for specified association overrides, the virtual association overrides will be populated from superclasses, then use AssociationOverride.setVirtual(boolean) to add/remove the association override from the source

Specified by:
specifiedAssociationOverrides in interface Entity

virtualAssociationOverrides

java.util.ListIterator<JavaAssociationOverride> virtualAssociationOverrides()
Description copied from interface: Entity
Return the number of default association overrides.

Specified by:
virtualAssociationOverrides in interface Entity

namedQueries

java.util.ListIterator<JavaNamedQuery> namedQueries()
Description copied from interface: QueryHolder
Return a list iterator of the named queries. This will not be null.

Specified by:
namedQueries in interface QueryHolder

addNamedQuery

JavaNamedQuery addNamedQuery(int index)
Description copied from interface: QueryHolder
Add a named query to the entity return the object representing it.

Specified by:
addNamedQuery in interface QueryHolder

namedNativeQueries

java.util.ListIterator<JavaNamedNativeQuery> namedNativeQueries()
Description copied from interface: QueryHolder
Return a list iterator of the specified named native queries. This will not be null.

Specified by:
namedNativeQueries in interface QueryHolder

addNamedNativeQuery

JavaNamedNativeQuery addNamedNativeQuery(int index)
Description copied from interface: QueryHolder
Add a named native query to the entity return the object representing it.

Specified by:
addNamedNativeQuery in interface QueryHolder

overridableAttributes

java.util.Iterator<JavaPersistentAttribute> overridableAttributes()
Description copied from interface: TypeMapping
Return an Iterator of attributes. The attributes must be BasicMappings or IdMappings found in this type mapping

Specified by:
overridableAttributes in interface JavaTypeMapping
Specified by:
overridableAttributes in interface TypeMapping

overridableAssociations

java.util.Iterator<JavaPersistentAttribute> overridableAssociations()
Description copied from interface: TypeMapping
Return an Iterator of associations that can be overriden. The associations must be OneToOneMappings or ManyToOneMappings found in this type mapping

Specified by:
overridableAssociations in interface JavaTypeMapping
Specified by:
overridableAssociations in interface TypeMapping