org.eclipse.jpt.core.context.orm
Interface OrmEntity

All Superinterfaces:
Entity, org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model, OrmTypeMapping, TypeMapping, XmlContextNode
All Known Subinterfaces:
OrmEclipseLinkEntity

public interface OrmEntity
extends Entity, OrmTypeMapping

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.

Since:
2.0
Version:
2.3

Field Summary
static java.lang.String DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST
           
static java.lang.String VIRTUAL_SECONDARY_TABLES_LIST
           
 
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_COLUMN_IS_UNDEFINED_PROPERTY, DISCRIMINATOR_VALUE_IS_UNDEFINED_PROPERTY, SPECIFIED_DISCRIMINATOR_COLUMN_IS_ALLOWED_PROPERTY, SPECIFIED_DISCRIMINATOR_VALUE_IS_ALLOWED_PROPERTY, SPECIFIED_DISCRIMINATOR_VALUE_PROPERTY, SPECIFIED_INHERITANCE_STRATEGY_PROPERTY, SPECIFIED_NAME_PROPERTY, SPECIFIED_PRIMARY_KEY_JOIN_COLUMNS_LIST, SPECIFIED_SECONDARY_TABLES_LIST, SPECIFIED_TABLE_IS_ALLOWED_PROPERTY, TABLE_IS_UNDEFINED_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.core.context.orm.OrmTypeMapping
CLASS_PROPERTY, DEFAULT_METADATA_COMPLETE_PROPERTY, SPECIFIED_METADATA_COMPLETE_PROPERTY
 
Method Summary
 OrmPrimaryKeyJoinColumn addSpecifiedPrimaryKeyJoinColumn(int index)
           
 OrmSecondaryTable addSpecifiedSecondaryTable()
          Add a specified secondary table to the entity return the object representing it.
 OrmSecondaryTable addSpecifiedSecondaryTable(int index)
          Add a specified secondary table to the entity return the object representing it.
 boolean containsVirtualSecondaryTable(OrmSecondaryTable secondaryTable)
          Return whether the entity contains the given secondary table in its list of virtual secondary tables
 java.util.ListIterator<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns()
           
 OrmAssociationOverrideContainer getAssociationOverrideContainer()
           
 OrmAttributeOverrideContainer getAttributeOverrideContainer()
           
 OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn()
           
 OrmDiscriminatorColumn getDiscriminatorColumn()
           
 OrmGeneratorContainer getGeneratorContainer()
           
 OrmIdClassReference getIdClassReference()
          Return the (aggregate) class reference for configuring and validating id class
 JavaEntity getJavaEntity()
          Return the Java Entity this ORM Entity corresponds to.
 OrmQueryContainer getQueryContainer()
           
 OrmTable getTable()
          Return the table for this entity, either specified or default.
 java.util.ListIterator<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns()
           
 java.util.ListIterator<OrmSecondaryTable> secondaryTables()
          Return a list iterator of the secondary tables whether specified or default.
 boolean secondaryTablesDefinedInXml()
          Return true if there are no virtual secondary tables on the orm entity.
 void setSecondaryTablesDefinedInXml(boolean defineInXml)
          If true, then all virtual secondary tables are added in as specified secondary tables to the xml.
 java.util.ListIterator<OrmPrimaryKeyJoinColumn> specifiedPrimaryKeyJoinColumns()
           
 java.util.ListIterator<OrmSecondaryTable> specifiedSecondaryTables()
          Return a list iterator of the specified secondary tables.
 java.util.ListIterator<OrmSecondaryTable> virtualSecondaryTables()
          Return a list iterator of the virtual(not specified) secondary tables.
 int virtualSecondaryTablesSize()
          Return the number of virtual secondary tables.
 
Methods inherited from interface org.eclipse.jpt.core.context.Entity
addSubEntity, discriminatorColumnIsUndefined, discriminatorValueIsUndefined, getDefaultCatalog, getDefaultDiscriminatorValue, getDefaultInheritanceStrategy, getDefaultName, getDefaultSchema, getDefaultTableName, getDiscriminatorValue, getIdAttribute, getInheritanceStrategy, getName, getParentEntity, getPrimaryKeyColumnName, getRootEntity, getSpecifiedDiscriminatorValue, getSpecifiedInheritanceStrategy, getSpecifiedName, isRoot, moveSpecifiedPrimaryKeyJoinColumn, moveSpecifiedSecondaryTable, primaryKeyJoinColumnsSize, removeSpecifiedPrimaryKeyJoinColumn, removeSpecifiedPrimaryKeyJoinColumn, removeSpecifiedSecondaryTable, removeSpecifiedSecondaryTable, resolveAttributeMapping, secondaryTablesSize, setSpecifiedDiscriminatorValue, setSpecifiedInheritanceStrategy, setSpecifiedName, specifiedDiscriminatorColumnIsAllowed, specifiedDiscriminatorValueIsAllowed, specifiedPrimaryKeyJoinColumnsSize, specifiedSecondaryTablesSize, specifiedTableIsAllowed, tableIsUndefined
 
Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping
allAttributeMappings, allOverridableAssociationNames, allOverridableAttributeNames, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getAllAttributeMappings, getAttributeMappings, getDbSchema, getDbTable, getIdClass, getKey, getPrimaryDbTable, getPrimaryTableName, getSuperTypeMapping, inheritanceHierarchy, isMapped, overridableAssociationNames, overridableAttributeNames, resolveOverriddenColumn, resolveRelationshipReference, shouldValidateAgainstDatabase, tableNameIsInvalid
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 
Methods inherited from interface org.eclipse.jpt.core.context.orm.OrmTypeMapping
addToResourceModel, attributeMappings, containsOffset, getAttributesTextRange, getClass_, getClassTextRange, getPersistentType, getResourceTypeMapping, getSelectionTextRange, getSpecifiedMetadataComplete, getXmlSequence, initializeFrom, isDefaultMetadataComplete, isMetadataComplete, removeFromResourceModel, setClass, setSpecifiedMetadataComplete, update
 
Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping
allAttributeMappings, allOverridableAssociationNames, allOverridableAttributeNames, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getAllAttributeMappings, getAttributeMappings, getDbSchema, getDbTable, getIdClass, getKey, getPrimaryDbTable, getPrimaryTableName, getSuperTypeMapping, inheritanceHierarchy, isMapped, overridableAssociationNames, overridableAttributeNames, resolveOverriddenColumn, resolveRelationshipReference, shouldValidateAgainstDatabase, tableNameIsInvalid
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.IResourcePart
getResource
 

Field Detail

VIRTUAL_SECONDARY_TABLES_LIST

static final java.lang.String VIRTUAL_SECONDARY_TABLES_LIST
See Also:
Constant Field Values

DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST

static final java.lang.String DEFAULT_PRIMARY_KEY_JOIN_COLUMNS_LIST
See Also:
Constant Field Values
Method Detail

virtualSecondaryTables

java.util.ListIterator<OrmSecondaryTable> virtualSecondaryTables()
Return a list iterator of the virtual(not specified) secondary tables. This will not be null.


virtualSecondaryTablesSize

int virtualSecondaryTablesSize()
Return the number of virtual secondary tables.


containsVirtualSecondaryTable

boolean containsVirtualSecondaryTable(OrmSecondaryTable secondaryTable)
Return whether the entity contains the given secondary table in its list of virtual secondary tables


secondaryTablesDefinedInXml

boolean secondaryTablesDefinedInXml()
Return true if there are no virtual secondary tables on the orm entity. This is used to determine whether you can add specified secondary tables. You must first make sure all virtual secondary tables have been specified in xml before adding more. This is because adding one secondary table to xml will override all the secondary tables specified in the java entity


setSecondaryTablesDefinedInXml

void setSecondaryTablesDefinedInXml(boolean defineInXml)
If true, then all virtual secondary tables are added in as specified secondary tables to the xml. If false, then all the specified secondary tables are remvoed from the xml.


getJavaEntity

JavaEntity getJavaEntity()
Return the Java Entity this ORM Entity corresponds to. Return null if there is no java entity.


getTable

OrmTable 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

getIdClassReference

OrmIdClassReference getIdClassReference()
Description copied from interface: Entity
Return the (aggregate) class reference for configuring and validating id class

Specified by:
getIdClassReference in interface Entity

getDiscriminatorColumn

OrmDiscriminatorColumn getDiscriminatorColumn()
Specified by:
getDiscriminatorColumn in interface Entity

secondaryTables

java.util.ListIterator<OrmSecondaryTable> 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<OrmSecondaryTable> 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

OrmSecondaryTable 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

addSpecifiedSecondaryTable

OrmSecondaryTable addSpecifiedSecondaryTable()
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<OrmPrimaryKeyJoinColumn> primaryKeyJoinColumns()
Specified by:
primaryKeyJoinColumns in interface Entity

getDefaultPrimaryKeyJoinColumn

OrmPrimaryKeyJoinColumn getDefaultPrimaryKeyJoinColumn()
Specified by:
getDefaultPrimaryKeyJoinColumn in interface Entity

defaultPrimaryKeyJoinColumns

java.util.ListIterator<OrmPrimaryKeyJoinColumn> defaultPrimaryKeyJoinColumns()

specifiedPrimaryKeyJoinColumns

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

addSpecifiedPrimaryKeyJoinColumn

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

getAttributeOverrideContainer

OrmAttributeOverrideContainer getAttributeOverrideContainer()
Specified by:
getAttributeOverrideContainer in interface Entity

getAssociationOverrideContainer

OrmAssociationOverrideContainer getAssociationOverrideContainer()
Specified by:
getAssociationOverrideContainer in interface Entity

getQueryContainer

OrmQueryContainer getQueryContainer()
Specified by:
getQueryContainer in interface Entity

getGeneratorContainer

OrmGeneratorContainer getGeneratorContainer()
Specified by:
getGeneratorContainer in interface Entity