org.eclipse.jpt.core.context.orm
Interface OrmPersistentAttribute

All Superinterfaces:
AccessHolder, org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, Model, PersistentAttribute, XmlContextNode
All Known Subinterfaces:
OrmPersistentAttribute2_0

public interface OrmPersistentAttribute
extends PersistentAttribute, XmlContextNode

ORM persistent attribute 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

Nested Class Summary
static interface OrmPersistentAttribute.Owner
          interface allowing persistent attributes to be used in multiple places (e.g.
 
Field Summary
static java.lang.String JAVA_PERSISTENT_ATTRIBUTE_PROPERTY
           
 
Fields inherited from interface org.eclipse.jpt.core.context.PersistentAttribute
DEFAULT_MAPPING_PROPERTY, NAME_PROPERTY, SPECIFIED_MAPPING_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.core.context.AccessHolder
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Method Summary
 boolean contains(int textOffset)
           
 JavaPersistentAttribute getJavaPersistentAttribute()
           
 OrmAttributeMapping getMapping()
          Return the attribute's "specified" mapping, or if it is null return the attribute's "default" mapping.
 OrmPersistentType getOwningPersistentType()
          Return the persistent type that owns this attribute
 OrmTypeMapping getOwningTypeMapping()
          Return the mapping of the owning persistent type
 OrmAttributeMapping getSpecifiedMapping()
          Return the attribute's "specified" mapping - could be null.
 void makeSpecified()
          Take a virtual persistent attribute and specify it.
 void makeSpecified(java.lang.String mappingKey)
          Take a virtual persistent attribute and specify it.
 void makeVirtual()
          Make the persistent attribute virtual.
 void nameChanged(java.lang.String oldName, java.lang.String newName)
           
 void update()
          Update the OrmPersistentAttribute context model object to match the resource model object.
 
Methods inherited from interface org.eclipse.jpt.core.context.PersistentAttribute
getDefaultMappingKey, getMappingKey, getName, getPrimaryKeyColumnName, getTypeName, isVirtual, setSpecifiedMappingKey
 
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
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getValidationTextRange, validate
 

Field Detail

JAVA_PERSISTENT_ATTRIBUTE_PROPERTY

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

getMapping

OrmAttributeMapping getMapping()
Description copied from interface: PersistentAttribute
Return the attribute's "specified" mapping, or if it is null return the attribute's "default" mapping. Do not return null.

Specified by:
getMapping in interface PersistentAttribute

getSpecifiedMapping

OrmAttributeMapping getSpecifiedMapping()
Description copied from interface: PersistentAttribute
Return the attribute's "specified" mapping - could be null.

Specified by:
getSpecifiedMapping in interface PersistentAttribute

getOwningTypeMapping

OrmTypeMapping getOwningTypeMapping()
Description copied from interface: PersistentAttribute
Return the mapping of the owning persistent type

Specified by:
getOwningTypeMapping in interface PersistentAttribute

getOwningPersistentType

OrmPersistentType getOwningPersistentType()
Description copied from interface: PersistentAttribute
Return the persistent type that owns this attribute

Specified by:
getOwningPersistentType in interface PersistentAttribute

getJavaPersistentAttribute

JavaPersistentAttribute getJavaPersistentAttribute()

makeVirtual

void makeVirtual()
Make the persistent attribute virtual. The attribute will be removed from the list of specified persistent attributes on the OrmPersistentType and removed from the orm.xml file. If the persistent attribute is already virtual, an IllegalStateException is thrown

See Also:
PersistentAttribute.isVirtual()

makeSpecified

void makeSpecified()
Take a virtual persistent attribute and specify it. The attribute will be added to the list of specified persistent attributes and added to the orm.xml file. The mappingKey will remain the same. If the persistent attribute is already specified, an IllegalStateException is thrown

See Also:
PersistentAttribute.isVirtual()

makeSpecified

void makeSpecified(java.lang.String mappingKey)
Take a virtual persistent attribute and specify it. The attribute will be added to the list of specified persistent attributes and added to the orm.xml file. The mappingKey will determine the type of mapping added instead of the mappingKey already on the persistent attribute If the persistent attribute is already specified, an IllegalStateException is thrown

See Also:
PersistentAttribute.isVirtual()

contains

boolean contains(int textOffset)

nameChanged

void nameChanged(java.lang.String oldName,
                 java.lang.String newName)

update

void update()
Update the OrmPersistentAttribute context model object to match the resource model object. see JpaProject.update()