Dali Provisional API
Release 3.2

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

All Superinterfaces:
AccessReference, IAdaptable, JpaContextModel, JpaModel, JpaStructureNode, JptResourceTypeReference, Model
All Known Subinterfaces:
JavaSpecifiedPersistentAttribute, OrmPersistentAttribute, OrmSpecifiedPersistentAttribute, PersistentAttribute2_0, SpecifiedPersistentAttribute, SpecifiedPersistentAttribute2_0

public interface PersistentAttribute
extends JpaStructureNode, AccessReference

Context persistent attribute (field or property).

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:
... a while?

Nested Class Summary
static class PersistentAttribute.MappingTransformer
           
static class PersistentAttribute.NameEquals
           
static class PersistentAttribute.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 String DEFAULT_MAPPING_KEY_PROPERTY
           
static String MAPPING_PROPERTY
           
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentAttribute,AttributeMapping> MAPPING_TRANSFORMER
           
static String NAME_PROPERTY
           
static org.eclipse.jpt.common.utility.transformer.Transformer<PersistentAttribute,String> NAME_TRANSFORMER
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Method Summary
 PersistentType getDeclaringPersistentType()
          Return the persistent type that declares the attribute.
 TypeMapping getDeclaringTypeMapping()
          Return the attribute's declaring persistent type's mapping (as opposed to the attribute's target type's mapping).
 String getDefaultMappingKey()
          Return the key for the attribute's default mapping.
 JavaSpecifiedPersistentAttribute getJavaPersistentAttribute()
           
 AttributeMapping getMapping()
          Return the attribute's mapping.
 String getMappingKey()
          Return the attribute's mapping key.
 String getName()
           
 String getPrimaryKeyColumnName()
          If the attribute is mapped to a primary key column, return the column's name, otherwise return null.
 String getTypeName()
          Return the resolved, qualified name of the attribute's type (e.g.
 String getTypeName(PersistentType contextType)
          Return the resolved, qualified name of the attribute's type (see getTypeName()) in the context of the given PersistentType.
 boolean isVirtual()
          Return whether the attribute has a textual representation in its underlying resource.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
addRootStructureNodesTo, containsOffset, getChildren, getChildrenSize, getContextType, getFullTextRange, getSelectionTextRange, getStructureNode, getType
 
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

NAME_PROPERTY

static final String NAME_PROPERTY
See Also:
Constant Field Values

NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<PersistentAttribute,String> NAME_TRANSFORMER

MAPPING_PROPERTY

static final String MAPPING_PROPERTY
See Also:
Constant Field Values

MAPPING_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<PersistentAttribute,AttributeMapping> MAPPING_TRANSFORMER

DEFAULT_MAPPING_KEY_PROPERTY

static final String DEFAULT_MAPPING_KEY_PROPERTY
See Also:
Constant Field Values
Method Detail

getName

String getName()

getMapping

AttributeMapping getMapping()
Return the attribute's mapping. This is never null (although, it may be a null mapping). Set the mapping via SpecifiedPersistentAttribute.setMappingKey(String).


getMappingKey

String getMappingKey()
Return the attribute's mapping key.


getDefaultMappingKey

String getDefaultMappingKey()
Return the key for the attribute's default mapping. This can be null (e.g. for specified orm.xml attributes).

See Also:
AttributeMapping.isDefault()

getDeclaringPersistentType

PersistentType getDeclaringPersistentType()
Return the persistent type that declares the attribute.


getDeclaringTypeMapping

TypeMapping getDeclaringTypeMapping()
Return the attribute's declaring persistent type's mapping (as opposed to the attribute's target type's mapping).

See Also:
getDeclaringPersistentType()

getTypeName

String getTypeName()
Return the resolved, qualified name of the attribute's type (e.g. "java.util.Collection" or "byte[]"). Return null if the attribute's type can not be resolved. If the type is an array, this name will include the appropriate number of bracket pairs. This name will not include the type's generic type arguments (e.g. "java.util.Collection" will only return "java.util.Collection").


getTypeName

String getTypeName(PersistentType contextType)
Return the resolved, qualified name of the attribute's type (see getTypeName()) in the context of the given PersistentType. (In some cases, the attribute's type may be further constrained by a subclass of the persistent type that actually contains the attribute.) Return null if a type cannot be determined for this attribute in the given context.


getPrimaryKeyColumnName

String getPrimaryKeyColumnName()
If the attribute is mapped to a primary key column, return the column's name, otherwise return null.


isVirtual

boolean isVirtual()
Return whether the attribute has a textual representation in its underlying resource.


getJavaPersistentAttribute

JavaSpecifiedPersistentAttribute getJavaPersistentAttribute()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.