|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface TypeMapping
type mapping:
| Nested Class Summary | |
|---|---|
static class |
TypeMapping.GeneratorsTransformer
|
static class |
TypeMapping.MappingIsIdMapping
|
static class |
TypeMapping.PersistentTypeTransformer
|
static class |
TypeMapping.QueriesTransformer
|
| Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel |
|---|
JpaModel.JpaVersionIsCompatibleWith |
| Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference |
|---|
JptResourceTypeReference.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer |
| Field Summary | |
|---|---|
static org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<Generator>> |
GENERATORS_TRANSFORMER
|
static String[] |
ID_ATTRIBUTE_MAPPING_KEYS
|
static org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,PersistentType> |
PERSISTENT_TYPE_TRANSFORMER
|
static org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<Query>> |
QUERIES_TRANSFORMER
|
static String |
SUPER_TYPE_MAPPING_PROPERTY
String associated with changes to the super type mapping property |
| Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference |
|---|
TRANSFORMER |
| Method Summary | ||
|---|---|---|
boolean |
attributeIsDerivedId(String attributeName)
Return whether the attribute with the specified name is a derived ID. |
|
boolean |
attributeMappingKeyAllowed(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) |
|
Iterable<String> |
getAllAssociatedTableNames()
Return the names 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. |
|
Iterable<Table> |
getAllAssociatedTables()
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. |
|
Iterable<AttributeMapping> |
getAllAttributeMappings()
Return all the attribute mappings in the type mapping's inheritance hierarchy. |
|
|
getAllAttributeMappings(String mappingKey)
Return attribute mappings of a particular mapping type that are declared anywhere on this type mapping's hierarchy |
|
Iterable<String> |
getAllOverridableAssociationNames()
Return an Iterator of all associations names that can be overridden in this type mapping. |
|
Iterable<String> |
getAllOverridableAttributeNames()
Return an Iterator of all attribute names that can be overridden in this type mapping. |
|
Iterable<IdTypeMapping> |
getAncestors()
Return the type mapping's "persistence" inheritance hierarchy, excluding the type mapping itself. |
|
Iterable<Table> |
getAssociatedTables()
Return the type mapping's "associated" tables, which includes the primary table and the collection of secondary tables. |
|
|
getAttributeMappings()
A convenience method for getting the attribute mappings from PersistentType.attributes() |
|
|
getAttributeMappings(String mappingKey)
Return attribute mappings of a particular mapping type that are declared on this type mapping |
|
Schema |
getDbSchema()
|
|
Iterable<Generator> |
getGenerators()
|
|
AttributeMapping |
getIdAttributeMapping()
Return the (single) mapping used as the id mapping for this type mapping. |
|
Iterable<AttributeMapping> |
getIdAttributeMappings()
Return all mappings that are mapped as id mappings |
|
Iterable<? extends TypeMapping> |
getInheritanceHierarchy()
Return the type mapping's "persistence" inheritance hierarchy, including the type mapping itself. |
|
JavaResourceType |
getJavaResourceType()
Return the corresponding java resource type, this can be null |
|
String |
getKey()
Return a unique key for the type mapping. |
|
String |
getName()
Return the name, specified or default if not specified. |
|
Iterable<AttributeMapping> |
getNonTransientAttributeMappings()
Return all the non-transient attribute mappings in the type mapping's inheritance hierarchy |
|
Iterable<String> |
getOverridableAssociationNames()
Return an Iterator of associations names that can be overridden in this type mapping. |
|
Iterable<String> |
getOverridableAttributeNames()
Return an Iterator of attribute names that can be overridden by a sub type mapping. |
|
PersistentType |
getPersistentType()
|
|
Table |
getPrimaryDbTable()
Return the type mapping's primary database table. |
|
String |
getPrimaryTableName()
Return the type mapping's primary table name. |
|
Iterable<Query> |
getQueries()
|
|
IdTypeMapping |
getSuperTypeMapping()
Return the "super" TypeMapping from the "persistence"
inheritance hierarchy. |
|
boolean |
isMapped()
|
|
Table |
resolveDbTable(String tableName)
Return the resolved associated db table with the specified name; i.e. the specified table must be among those associated with the type mapping otherwise return null. |
|
SpecifiedColumn |
resolveOverriddenColumn(String attributeName)
Return the column of the overridable attribute mapping (or attribute override) with the specified attribute name. |
|
SpecifiedRelationship |
resolveOverriddenRelationship(String attributeName)
|
|
boolean |
tableNameIsInvalid(String tableName)
Return whether the specified table is invalid for any annotations associated with the type mapping. |
|
boolean |
validatesAgainstDatabase()
Return whether any database metadata specific validation should occur. |
|
| Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel |
|---|
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate |
| Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel |
|---|
getJpaPlatform, getJpaProject, getJpaProjectManager, getResource, stateChanged |
| Methods inherited from interface org.eclipse.jpt.common.utility.model.Model |
|---|
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Methods inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference |
|---|
getResourceType |
| Field Detail |
|---|
static final org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,PersistentType> PERSISTENT_TYPE_TRANSFORMER
static final org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<Query>> QUERIES_TRANSFORMER
static final org.eclipse.jpt.common.utility.transformer.Transformer<TypeMapping,Iterable<Generator>> GENERATORS_TRANSFORMER
static final String SUPER_TYPE_MAPPING_PROPERTY
static final String[] ID_ATTRIBUTE_MAPPING_KEYS
| Method Detail |
|---|
PersistentType getPersistentType()
JavaResourceType getJavaResourceType()
String getKey()
String getName()
boolean isMapped()
Iterable<Query> getQueries()
Iterable<Generator> getGenerators()
IdTypeMapping getSuperTypeMapping()
TypeMapping from the "persistence"
inheritance hierarchy.
If the Java inheritance parent is not persistent, then continue
up the hierarchy (the JPA spec allows non-persistent types to be
part of the hierarchy.)
Return null if the type mapping is the root.
Example:
@Entity
public abstract class Model {}
public abstract class Animal extends Model {}
@Entity
public class Cat extends Animal {}
The "super" type mapping of the Cat type mapping is
the Model type mapping. The "super" type mapping can
either come from a Java annotated class from an XML mapping file.
Iterable<IdTypeMapping> getAncestors()
Iterable<? extends TypeMapping> getInheritanceHierarchy()
String getPrimaryTableName()
Table getPrimaryDbTable()
Schema getDbSchema()
Iterable<Table> getAssociatedTables()
Iterable<Table> getAllAssociatedTables()
Iterable<String> getAllAssociatedTableNames()
Table resolveDbTable(String tableName)
null.
NB: The spec does allow for columns or join columns to specify a schema and/or catalog; so the results can be unpredictable....
boolean tableNameIsInvalid(String tableName)
<T extends AttributeMapping> Iterable<T> getAttributeMappings()
<T extends AttributeMapping> Iterable<T> getAttributeMappings(String mappingKey)
Iterable<AttributeMapping> getAllAttributeMappings()
Iterable<AttributeMapping> getNonTransientAttributeMappings()
<T extends AttributeMapping> Iterable<T> getAllAttributeMappings(String mappingKey)
boolean attributeMappingKeyAllowed(String attributeMappingKey)
Iterable<AttributeMapping> getIdAttributeMappings()
TypeMapping.MappingIsIdMappingAttributeMapping getIdAttributeMapping()
TypeMapping.MappingIsIdMappingboolean attributeIsDerivedId(String attributeName)
Iterable<String> getOverridableAttributeNames()
Iterable<String> getAllOverridableAttributeNames()
SpecifiedColumn resolveOverriddenColumn(String attributeName)
In JPA 2.0 this name can use dot-notation to designate nested attributes in embedded attribute mapping's embeddable type mapping.
Iterable<String> getOverridableAssociationNames()
Iterable<String> getAllOverridableAssociationNames()
SpecifiedRelationship resolveOverriddenRelationship(String attributeName)
boolean validatesAgainstDatabase()
|
Dali Provisional API Release 3.2 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||