org.eclipse.jpt.core.context
Interface PersistentAttribute

All Superinterfaces:
AccessHolder, org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, Model
All Known Subinterfaces:
JavaPersistentAttribute, JavaPersistentAttribute2_0, OrmPersistentAttribute, OrmPersistentAttribute2_0, PersistentAttribute2_0

public interface PersistentAttribute
extends JpaContextNode, JpaStructureNode, AccessHolder

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:
2.0
Version:
2.3

Field Summary
static java.lang.String DEFAULT_MAPPING_PROPERTY
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String SPECIFIED_MAPPING_PROPERTY
           
 
Fields inherited from interface org.eclipse.jpt.core.context.AccessHolder
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Method Summary
 java.lang.String getDefaultMappingKey()
          Return the key for the attribute's "default" mapping.
 AttributeMapping getMapping()
          Return the attribute's "specified" mapping, or if it is null return the attribute's "default" mapping.
 java.lang.String getMappingKey()
          Return the key for the attribute's mapping.
 java.lang.String getName()
           
 PersistentType getOwningPersistentType()
          Return the persistent type that owns this attribute
 TypeMapping getOwningTypeMapping()
          Return the mapping of the owning persistent type
 java.lang.String getPrimaryKeyColumnName()
          If the attribute is mapped to a primary key column, return the column's name, otherwise return null.
 AttributeMapping getSpecifiedMapping()
          Return the attribute's "specified" mapping - could be null.
 java.lang.String getTypeName()
          Return the resolved, qualified name of the attribute's type (e.g.
 boolean isVirtual()
          Return whether this attribute actually has a textual representation in its underlying resource (false = no).
 void setSpecifiedMappingKey(java.lang.String key)
          Clients should call this method to set the attribute's mapping.
 
Methods inherited from interface org.eclipse.jpt.core.JpaStructureNode
dispose, getId, getResourceType, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.core.context.AccessHolder
getAccess, getDefaultAccess, getSpecifiedAccess, setSpecifiedAccess
 

Field Detail

NAME_PROPERTY

static final java.lang.String NAME_PROPERTY
See Also:
Constant Field Values

DEFAULT_MAPPING_PROPERTY

static final java.lang.String DEFAULT_MAPPING_PROPERTY
See Also:
Constant Field Values

SPECIFIED_MAPPING_PROPERTY

static final java.lang.String SPECIFIED_MAPPING_PROPERTY
See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()

getMappingKey

java.lang.String getMappingKey()
Return the key for the attribute's mapping. The key may be for either the "specified" mapping or, if the "specified" mapping is missing, the "default" mapping.


getDefaultMappingKey

java.lang.String getDefaultMappingKey()
Return the key for the attribute's "default" mapping.


getMapping

AttributeMapping getMapping()
Return the attribute's "specified" mapping, or if it is null return the attribute's "default" mapping. Do not return null.


getSpecifiedMapping

AttributeMapping getSpecifiedMapping()
Return the attribute's "specified" mapping - could be null.


setSpecifiedMappingKey

void setSpecifiedMappingKey(java.lang.String key)
Clients should call this method to set the attribute's mapping. Passing in a null key will cause the "specified" mapping to be cleared and the attribute's mapping to be its "default" mapping.


getOwningPersistentType

PersistentType getOwningPersistentType()
Return the persistent type that owns this attribute


getOwningTypeMapping

TypeMapping getOwningTypeMapping()
Return the mapping of the owning persistent type


getPrimaryKeyColumnName

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


getTypeName

java.lang.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").


isVirtual

boolean isVirtual()
Return whether this attribute actually has a textual representation in its underlying resource (false = no).