org.eclipse.jpt.core.context
Interface PersistentAttribute

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, JpaContextNode, JpaNode, JpaStructureNode, Model
All Known Subinterfaces:
JavaPersistentAttribute, OrmPersistentAttribute

public interface PersistentAttribute
extends JpaContextNode, JpaStructureNode

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.


Field Summary
static java.lang.String DEFAULT_MAPPING_PROPERTY
           
static java.lang.String NAME_PROPERTY
           
static java.lang.String SPECIFIED_MAPPING_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 "default" mapping.
 java.lang.String getMappingKey()
          Return the key for the attribute's mapping.
 java.lang.String getName()
           
 PersistentType getPersistentType()
           
 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
 TypeMapping getTypeMapping()
           
 boolean isIdAttribute()
          Return whether the attribute's "attribute" mapping is for an ID.
 boolean isOverridableAssociation()
          Return whether the attribute's "association" mapping can be overridden.
 boolean isOverridableAttribute()
          Return whether the attribute's "attribute" mapping can be overridden.
 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.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.core.JpaStructureNode
dispose, getId, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent, getResource
 
Methods inherited from interface org.eclipse.jpt.utility.model.Model
addCollectionChangeListener, addCollectionChangeListener, addListChangeListener, addListChangeListener, addPropertyChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, addTreeChangeListener, removeCollectionChangeListener, removeCollectionChangeListener, removeListChangeListener, removeListChangeListener, removePropertyChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

NAME_PROPERTY

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

SPECIFIED_MAPPING_PROPERTY

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

DEFAULT_MAPPING_PROPERTY

static final java.lang.String DEFAULT_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 "default" mapping. WIll 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.


getTypeMapping

TypeMapping getTypeMapping()

getPersistentType

PersistentType getPersistentType()

getPrimaryKeyColumnName

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


isOverridableAttribute

boolean isOverridableAttribute()
Return whether the attribute's "attribute" mapping can be overridden.


isOverridableAssociation

boolean isOverridableAssociation()
Return whether the attribute's "association" mapping can be overridden.


isIdAttribute

boolean isIdAttribute()
Return whether the attribute's "attribute" mapping is for an ID.


isVirtual

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