Dali Provisional API
Release 3.2

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

All Superinterfaces:
AccessHolder, IAdaptable, JpaContextNode, JpaNode, JpaStructureNode, JptResourceTypeReference, ManagedType, Model, ReadOnlyAccessHolder
All Known Subinterfaces:
EclipseLinkOrmPersistentType, JavaPersistentType, OrmPersistentType, PersistentType2_0

public interface PersistentType
extends ManagedType, JpaStructureNode, AccessHolder

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 class PersistentType.MappingTransformer
           
static class PersistentType.OverriddenPersistentTypeTransformer
           
static interface PersistentType.Owner
           
static class PersistentType.SuperPersistentTypeTransformer
           
 
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.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeTransformer
 
Field Summary
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,org.eclipse.jpt.common.utility.iterable.ListIterable<? extends ReadOnlyPersistentAttribute>> ATTRIBUTES_TRANSFORMER
           
static String 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
           
static String SUPER_PERSISTENT_TYPE_PROPERTY
           
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentType,PersistentType> SUPER_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
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.AccessHolder
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
RESOURCE_TYPE_TRANSFORMER
 
Method Summary
 Iterable<String> getAllAttributeNames()
          Return the names of all the persistent attributes in the persistent type's hierarchy.
 Iterable<ReadOnlyPersistentAttribute> 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.
 ReadOnlyPersistentAttribute 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 ReadOnlyPersistentAttribute> getAttributes()
          Return the persistent type's persistent attributes.
 int getAttributesSize()
          Return the number of the persistent type's persistent attributes.
 TypeBinding getAttributeTypeBinding(ReadOnlyPersistentAttribute 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.
 TypeMapping getMapping()
          Return the persistent type's mapping.
 String getMappingKey()
           
 PersistentType getOverriddenPersistentType()
          Return the persistent type the persistent type overrides.
 AccessType getOwnerDefaultAccess()
          Return the client persistent type's default access type; null if there is no such access default.
 AccessType getOwnerOverrideAccess()
          Return the access type that overrides the client persistent type's access type; null if there is no such access override.
 PersistentType getSuperPersistentType()
          Return the "super" PersistentType from the "persistence" inheritance hierarchy.
 Class<? extends PersistentType> getType()
          Return the managed type's type.
 boolean isMapped()
           
 ReadOnlyPersistentAttribute 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
containsOffset, gatherRootStructureNodes, getChildren, getChildrenSize, getContextType, getFullTextRange, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.AccessHolder
getDefaultAccess, getSpecifiedAccess, setSpecifiedAccess
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ReadOnlyAccessHolder
getAccess
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getParent, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
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
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 ReadOnlyPersistentAttribute>> ATTRIBUTES_TRANSFORMER

SUPER_PERSISTENT_TYPE_PROPERTY

static final String SUPER_PERSISTENT_TYPE_PROPERTY
See Also:
Constant Field Values

SUPER_PERSISTENT_TYPE_TRANSFORMER

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

OVERRIDDEN_PERSISTENT_TYPE_TRANSFORMER

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

getType

Class<? extends PersistentType> getType()
Description copied from interface: ManagedType
Return the managed type's type.

Specified by:
getType in interface JpaStructureNode
Specified by:
getType in interface ManagedType
See Also:
OrmManagedTypeDefinition.getContextType(), JavaManagedTypeDefinition.getType()

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 ReadOnlyPersistentAttribute> 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<ReadOnlyPersistentAttribute> 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

ReadOnlyPersistentAttribute 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

ReadOnlyPersistentAttribute 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(ReadOnlyPersistentAttribute attribute)
Return qualified type name of given attribute within the context of this type.


getSuperPersistentType

PersistentType getSuperPersistentType()
Return the "super" PersistentType from the "persistence" inheritance hierarchy. If the Java inheritance parent is not a PersistentType, then continue up the hierarchy (the JPA spec allows non-persistent types to be part of the hierarchy.) Return null if the persistent type is the root persistent type.

Example:

 @Entity
 public abstract class Model {}
 
 public abstract class Animal extends Model {}
 
 @Entity
 public class Cat extends Animal {}
 
The "super" persistent type of the Cat persistent type is the Model persistent type. The "super" persistent type can be either a Java annotated class or declared in the XML files.


getInheritanceHierarchy

Iterable<PersistentType> getInheritanceHierarchy()
Return the persistent type's "persistence" inheritance hierarchy, including the persistent type itself. The returned iterator will return elements infinitely if the hierarchy has a loop.


getAncestors

Iterable<PersistentType> getAncestors()
Return the persistent type's "persistence" inheritance hierarchy, excluding the persistent type itself. The returned iterator will return elements infinitely if the hierarchy has a loop.


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.


getOwnerOverrideAccess

AccessType getOwnerOverrideAccess()
Return the access type that overrides the client persistent type's access type; null if there is no such access override.


getOwnerDefaultAccess

AccessType getOwnerDefaultAccess()
Return the client persistent type's default access type; null if there is no such access default.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.