org.eclipse.jpt.core.context.orm
Interface OrmEntity
- All Superinterfaces:
- Entity, GeneratorHolder, org.eclipse.core.runtime.IAdaptable, IdClass, IResourcePart, JpaContextNode, JpaNode, Model, OrmGeneratorHolder, OrmTypeMapping, PersistentTypeContext, QueryHolder, TypeMapping, XmlContextNode
public interface OrmEntity
- extends Entity, OrmTypeMapping, OrmGeneratorHolder
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.
| 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 |
| Methods inherited from interface org.eclipse.jpt.core.context.Entity |
associationOverridesSize, attributeOverridesSize, getDefaultCatalog, getDefaultDiscriminatorValue, getDefaultInheritanceStrategy, getDefaultName, getDefaultSchema, getDefaultTableName, 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, getPrimaryTableName, isMapped, overridableAssociationNames, overridableAttributeNames, tableNameIsInvalid |
| 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.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.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.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.orm.OrmTypeMapping |
addToResourceModel, containsOffset, getAccess, getAttributesTextRange, getClass_, getDefaultAccess, getJavaPersistentType, getPersistentType, getResourceTypeMapping, getSelectionTextRange, getSpecifiedAccess, getSpecifiedMetadataComplete, getXmlSequence, initializeFrom, isDefaultMetadataComplete, isMetadataComplete, removeFromResourceModel, setClass, setSpecifiedAccess, setSpecifiedMetadataComplete |
| Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping |
allOverridableAssociationNames, allOverridableAssociations, allOverridableAttributeNames, allOverridableAttributes, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getDbSchema, getDbTable, getKey, getPrimaryDbTable, getPrimaryTableName, isMapped, overridableAssociationNames, overridableAttributeNames, tableNameIsInvalid |
| 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.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.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.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 |
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
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.
initialize
void initialize(XmlEntity entity)
update
void update(XmlEntity entity)
- Update the OrmEntity context model object to match the XmlEntity
resource model object. see
JpaProject.update()
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
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
attributeOverrides
java.util.ListIterator<OrmAttributeOverride> 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<OrmAttributeOverride> 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<OrmAttributeOverride> 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
OrmAttributeOverride 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<OrmAssociationOverride> 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<OrmAssociationOverride> 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<OrmAssociationOverride> virtualAssociationOverrides()
- Description copied from interface:
Entity
- Return the number of default association overrides.
- Specified by:
virtualAssociationOverrides in interface Entity
namedQueries
java.util.ListIterator<OrmNamedQuery> 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
OrmNamedQuery 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<OrmNamedNativeQuery> 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
OrmNamedNativeQuery 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<OrmPersistentAttribute> 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 OrmTypeMapping- Specified by:
overridableAttributes in interface TypeMapping
overridableAssociations
java.util.Iterator<OrmPersistentAttribute> 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 OrmTypeMapping- Specified by:
overridableAssociations in interface TypeMapping