Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context
Interface PersistentType

All Superinterfaces:
AccessReference, IAdaptable, JpaContextModel, JpaModel, JpaStructureNode, JptResourceTypeReference, ManagedType, Model, SpecifiedAccessReference
All Known Subinterfaces:
EclipseLinkOrmPersistentType, JavaPersistentType, OrmPersistentType, PersistentType2_0

public interface PersistentType
extends ManagedType, JpaStructureNode, SpecifiedAccessReference

Context persistent type.

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

Nested Class Summary
static class PersistentType.AttributesTransformer
           
static interface PersistentType.Config
          Config that can be used to add persistent types to a persistence unit.
static class PersistentType.MappingTransformer
           
static class PersistentType.OverriddenPersistentTypeTransformer
           
static interface PersistentType.Parent
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.ManagedType
ManagedType.NameTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
JpaStructureNode.ContextType
 
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<PersistentType,org.eclipse.jpt.common.utility.iterable.ListIterable<? extends PersistentAttribute>> ATTRIBUTES_TRANSFORMER
           
static String MAPPING_PROPERTY
          String associated with changes to the "mapping" property
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,TypeMapping> MAPPING_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,PersistentType> OVERRIDDEN_PERSISTENT_TYPE_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.ManagedType
NAME_PROPERTY, NAME_TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
STRUCTURE_CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.SpecifiedAccessReference
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Method Summary
 Iterable<String> getAllAttributeNames()
          Return the names of all the persistent attributes in the persistent type's hierarchy.
 Iterable<PersistentAttribute> getAllAttributes()
          Return all the persistent attributes in the persistent type's inheritance hierarchy.
 Iterable<PersistentType> getAncestors()
          Return the persistent type's "persistence" inheritance hierarchy, excluding the persistent type itself.
 PersistentAttribute getAttributeNamed(String attributeName)
          Return the persistent attribute with the specified name, if it exists locally on the persistent type (as opposed to in its inheritance hierarchy).
 Iterable<String> getAttributeNames()
          Return the names of the persistent type's persistent attributes.
 org.eclipse.jpt.common.utility.iterable.ListIterable<? extends PersistentAttribute> getAttributes()
          Return the persistent type's persistent attributes.
 int getAttributesSize()
          Return the number of the persistent type's persistent attributes.
 TypeBinding getAttributeTypeBinding(PersistentAttribute attribute)
          Return qualified type name of given attribute within the context of this type.
 Iterable<PersistentType> getInheritanceHierarchy()
          Return the persistent type's "persistence" inheritance hierarchy, including the persistent type itself.
 Class<PersistentType> getManagedTypeType()
          Return the managed type's type.
 TypeMapping getMapping()
          Return the persistent type's mapping.
 String getMappingKey()
           
 PersistentType getOverriddenPersistentType()
          Return the persistent type the persistent type overrides.
 PersistentType getSuperPersistentType()
          Return the persistent type of the super type mapping
 boolean isMapped()
           
 PersistentAttribute resolveAttribute(String attributeName)
          Resolve and return the persistent attribute with the specified name, if it is distinct and exists within the context of the persistent type.
 void setMappingKey(String key)
           
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ManagedType
getJavaResourceType, getName, getSimpleName, getTypeQualifiedName, isFor, isIn
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
addRootStructureNodesTo, containsOffset, getContextType, getFullTextRange, getSelectionTextRange, getStructureChildren, getStructureChildrenSize, getStructureNode, getStructureType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.SpecifiedAccessReference
getDefaultAccess, getSpecifiedAccess, setSpecifiedAccess
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.AccessReference
getAccess
 
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

MAPPING_PROPERTY

static final String MAPPING_PROPERTY
String associated with changes to the "mapping" property

See Also:
Constant Field Values

MAPPING_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,TypeMapping> MAPPING_TRANSFORMER

ATTRIBUTES_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,org.eclipse.jpt.common.utility.iterable.ListIterable<? extends PersistentAttribute>> ATTRIBUTES_TRANSFORMER

OVERRIDDEN_PERSISTENT_TYPE_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,PersistentType> OVERRIDDEN_PERSISTENT_TYPE_TRANSFORMER
Method Detail

getManagedTypeType

Class<PersistentType> getManagedTypeType()
Description copied from interface: ManagedType
Return the managed type's type. This is used to:

Specified by:
getManagedTypeType in interface ManagedType
See Also:
OrmManagedTypeDefinition.getContextManagedTypeType(), JavaManagedTypeDefinition.getManagedTypeType()

getMapping

TypeMapping getMapping()
Return the persistent type's mapping. Set the mapping via setMappingKey(String).


getMappingKey

String getMappingKey()

setMappingKey

void setMappingKey(String key)

isMapped

boolean isMapped()

getAttributes

org.eclipse.jpt.common.utility.iterable.ListIterable<? extends PersistentAttribute> getAttributes()
Return the persistent type's persistent attributes.


getAttributesSize

int getAttributesSize()
Return the number of the persistent type's persistent attributes.


getAttributeNames

Iterable<String> getAttributeNames()
Return the names of the persistent type's persistent attributes.


getAllAttributes

Iterable<PersistentAttribute> getAllAttributes()
Return all the persistent attributes in the persistent type's inheritance hierarchy.


getAllAttributeNames

Iterable<String> getAllAttributeNames()
Return the names of all the persistent attributes in the persistent type's hierarchy.


getAttributeNamed

PersistentAttribute getAttributeNamed(String attributeName)
Return the persistent attribute with the specified name, if it exists locally on the persistent type (as opposed to in its inheritance hierarchy).


resolveAttribute

PersistentAttribute resolveAttribute(String attributeName)
Resolve and return the persistent attribute with the specified name, if it is distinct and exists within the context of the persistent type.


getAttributeTypeBinding

TypeBinding getAttributeTypeBinding(PersistentAttribute attribute)
Return qualified type name of given attribute within the context of this type.


getSuperPersistentType

PersistentType getSuperPersistentType()
Return the persistent type of the super type mapping

See Also:
TypeMapping.getSuperTypeMapping()

getInheritanceHierarchy

Iterable<PersistentType> getInheritanceHierarchy()
Return the persistent type's "persistence" inheritance hierarchy, including the persistent type itself.

See Also:
TypeMapping#getTypeMappingInheritanceHierarchy()

getAncestors

Iterable<PersistentType> getAncestors()
Return the persistent type's "persistence" inheritance hierarchy, excluding the persistent type itself.

See Also:
TypeMapping#getAncesors()

getOverriddenPersistentType

PersistentType getOverriddenPersistentType()
Return the persistent type the persistent type overrides. Typically this is the Java persistent type overridden by a non-metadata-complete orm.xml persistent type.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.