org.eclipse.jpt.core.context
Interface TypeMapping

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model
All Known Subinterfaces:
Embeddable, Entity, JavaEmbeddable, JavaEntity, JavaMappedSuperclass, JavaTypeMapping, MappedSuperclass, OrmEmbeddable, OrmEntity, OrmMappedSuperclass, OrmTypeMapping

public interface TypeMapping
extends JpaContextNode

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.


Method Summary
 java.util.Iterator<java.lang.String> allOverridableAssociationNames()
          Return an Iterator of association names.
 java.util.Iterator<PersistentAttribute> allOverridableAssociations()
          Return an Iterator of associations.
 java.util.Iterator<java.lang.String> allOverridableAttributeNames()
          Return an Iterator of attributes names.
 java.util.Iterator<PersistentAttribute> allOverridableAttributes()
          Return an Iterator of attributes.
 java.util.Iterator<java.lang.String> associatedTableNamesIncludingInherited()
          Return the identifiers of the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables, as well as all the inherited "associated" tables.
 java.util.Iterator<Table> associatedTables()
          Return the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables.
 java.util.Iterator<Table> associatedTablesIncludingInherited()
          Return the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables, as well as all inherited "associated" tables.
 boolean attributeMappingKeyAllowed(java.lang.String attributeMappingKey)
          Return whether the given attribute mapping key is valid for this particular type mapping (for example, id's are not valid for an embeddable type mapping)
 Schema getDbSchema()
           
 Table getDbTable(java.lang.String tableName)
          return the resolved associated db table with the passed in name
 java.lang.String getKey()
          Return a unique key for the ITypeMapping.
 PersistentType getPersistentType()
           
 Table getPrimaryDbTable()
          Return the type mapping's primary database table.
 java.lang.String getPrimaryTableName()
          Return the type mapping's primary table name, null if a primary table does not apply.
 boolean isMapped()
           
 java.util.Iterator<java.lang.String> overridableAssociationNames()
          Return an Iterator of association names.
<T extends PersistentAttribute>
java.util.Iterator<T>
overridableAssociations()
          Return an Iterator of associations that can be overriden.
 java.util.Iterator<java.lang.String> overridableAttributeNames()
          Return an Iterator of attributes names.
<T extends PersistentAttribute>
java.util.Iterator<T>
overridableAttributes()
          Return an Iterator of attributes.
 boolean tableNameIsInvalid(java.lang.String tableName)
          Return whether the specified table is invalid for any annotations associated with the type mapping.
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
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.IResourcePart
getResource
 

Method Detail

getKey

java.lang.String getKey()
Return a unique key for the ITypeMapping. If this is defined in an extension they should be equal.


getPersistentType

PersistentType getPersistentType()

isMapped

boolean isMapped()

getPrimaryTableName

java.lang.String getPrimaryTableName()
Return the type mapping's primary table name, null if a primary table does not apply.


getPrimaryDbTable

Table getPrimaryDbTable()
Return the type mapping's primary database table.


getDbSchema

Schema getDbSchema()

associatedTables

java.util.Iterator<Table> associatedTables()
Return the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables.


associatedTablesIncludingInherited

java.util.Iterator<Table> associatedTablesIncludingInherited()
Return the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables, as well as all inherited "associated" tables.


associatedTableNamesIncludingInherited

java.util.Iterator<java.lang.String> associatedTableNamesIncludingInherited()
Return the identifiers of the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables, as well as all the inherited "associated" tables.


getDbTable

Table getDbTable(java.lang.String tableName)
return the resolved associated db table with the passed in name


tableNameIsInvalid

boolean tableNameIsInvalid(java.lang.String tableName)
Return whether the specified table is invalid for any annotations associated with the type mapping.


overridableAttributes

<T extends PersistentAttribute> java.util.Iterator<T> overridableAttributes()
Return an Iterator of attributes. The attributes must be BasicMappings or IdMappings found in this type mapping


overridableAttributeNames

java.util.Iterator<java.lang.String> overridableAttributeNames()
Return an Iterator of attributes names. The attributes must be BasicMappings or IdMappings found in this type mapping


allOverridableAttributes

java.util.Iterator<PersistentAttribute> allOverridableAttributes()
Return an Iterator of attributes. The attributes must be BasicMappings or IdMappings found in any MappedSuperclass in the inheritance hierarchy. See overridableAttributes() and PersistentType.inheritanceHierarchy()


allOverridableAttributeNames

java.util.Iterator<java.lang.String> allOverridableAttributeNames()
Return an Iterator of attributes names. The attributes must be BasicMappings or IdMappings found in any MappedSuperclass in the inheritance hierarchy. See overridableAttributeNames() and PersistentType.inheritanceHierarchy()


overridableAssociations

<T extends PersistentAttribute> java.util.Iterator<T> overridableAssociations()
Return an Iterator of associations that can be overriden. The associations must be OneToOneMappings or ManyToOneMappings found in this type mapping


overridableAssociationNames

java.util.Iterator<java.lang.String> overridableAssociationNames()
Return an Iterator of association names. The associations must be OneToOneMappings or ManyToOneMappings found in any MappedSuperclass in the inheritance hierarchy


allOverridableAssociations

java.util.Iterator<PersistentAttribute> allOverridableAssociations()
Return an Iterator of associations. The associations must be OneToOneMappings or ManyToOneMappings found in any MappedSuperclass in the inheritance hierarchy See overridableAssociations() and PersistentType.inheritanceHierarchy()


allOverridableAssociationNames

java.util.Iterator<java.lang.String> allOverridableAssociationNames()
Return an Iterator of association names. The associations must be OneToOneMappings or ManyToOneMappings found in any MappedSuperclass in the inheritance hierarchy See overridableAssociationNames() and PersistentType.inheritanceHierarchy()


attributeMappingKeyAllowed

boolean attributeMappingKeyAllowed(java.lang.String attributeMappingKey)
Return whether the given attribute mapping key is valid for this particular type mapping (for example, id's are not valid for an embeddable type mapping)