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

All Superinterfaces:
AccessHolder, org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, Model, PersistentType, PersistentType.Owner, XmlContextNode
All Known Subinterfaces:
OrmPersistentType2_0

public interface OrmPersistentType
extends PersistentType, PersistentType.Owner, XmlContextNode

Context orm.xml 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
Version:
2.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.core.context.PersistentType
PersistentType.Owner
 
Field Summary
static java.lang.String JAVA_PERSISTENT_TYPE_PROPERTY
           
static java.lang.String VIRTUAL_ATTRIBUTES_LIST
           
 
Fields inherited from interface org.eclipse.jpt.core.context.PersistentType
ATTRIBUTES_LIST, MAPPING_PROPERTY, NAME_PROPERTY, SUPER_PERSISTENT_TYPE_PROPERTY
 
Fields inherited from interface org.eclipse.jpt.core.context.AccessHolder
DEFAULT_ACCESS_PROPERTY, SPECIFIED_ACCESS_PROPERTY
 
Method Summary
 OrmPersistentAttribute addSpecifiedAttribute(java.lang.String mappingKey, java.lang.String attributeName)
           
 java.util.ListIterator<OrmPersistentAttribute> attributes()
          Return the persistent type's persistent attributes.
 void changeMapping(OrmPersistentAttribute ormPersistentAttribute, OrmAttributeMapping oldMapping, OrmAttributeMapping newMapping)
           
 void classChanged(java.lang.String oldClass, java.lang.String newClass)
           
 boolean contains(int textOffset)
           
 boolean containsVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute)
          Return whether this persistent type contains the given virtual persistent attribute.
 OrmPersistentAttribute getAttributeNamed(java.lang.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).
 java.lang.String getDefaultPackage()
          Return the persistent type's default package.
 JavaPersistentType getJavaPersistentType()
          Return the Java persistent type that is referred to by this orm.xml persistent type.
 OrmTypeMapping getMapping()
          Return the persistent type's mapping.
 EntityMappings getParent()
          Return the JPA node's parent.
 boolean isDefaultMetadataComplete()
          Return whether the persistent type is default metadata complete.
 boolean isFor(java.lang.String typeName)
          Return whether the persistent type applies to the specified type.
 void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute)
          Add the given virtual orm persistent attribute to the orm.xml.
 void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute, java.lang.String mappingKey)
          Add the given virtual orm persistent attribute to the orm.xml with a mapping of type mappingKey.
 void makeAttributeVirtual(OrmPersistentAttribute ormPersistentAttribute)
          Remove the given specified orm persistent attribute from the orm.xml.
 void removeSpecifiedAttribute(OrmPersistentAttribute specifiedAttribute)
           
 java.util.ListIterator<OrmPersistentAttribute> specifiedAttributes()
          Return a read only iterator of the specified OrmPersistentAttributes.
 int specifiedAttributesSize()
          Return the number of specified OrmPersistentAttributes.
 void update()
          Update the OrmPersistentType context model object to match the resource model object.
 java.util.ListIterator<OrmPersistentAttribute> virtualAttributes()
          Return a read only iterator of the virtual orm persistent attributes.
 int virtualAttributesSize()
          Return the number of virtual orm persistent attributes.
 
Methods inherited from interface org.eclipse.jpt.core.context.PersistentType
allAttributeNames, allAttributes, ancestors, attributeNames, attributesSize, getMappingKey, getName, getOwnerDefaultAccess, getOwnerOverrideAccess, getShortName, getSuperPersistentType, inheritanceHierarchy, isMapped, resolveAttribute, setMappingKey, validate
 
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.PersistentType.Owner
getDefaultPersistentTypeAccess, getOverridePersistentTypeAccess
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getValidationTextRange, validate
 

Field Detail

VIRTUAL_ATTRIBUTES_LIST

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

JAVA_PERSISTENT_TYPE_PROPERTY

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

getParent

EntityMappings getParent()
Description copied from interface: JpaNode
Return the JPA node's parent. The JPA project will not have a parent.

Specified by:
getParent in interface JpaNode

attributes

java.util.ListIterator<OrmPersistentAttribute> attributes()
Description copied from interface: PersistentType
Return the persistent type's persistent attributes.

Specified by:
attributes in interface PersistentType

getAttributeNamed

OrmPersistentAttribute getAttributeNamed(java.lang.String attributeName)
Description copied from interface: PersistentType
Return the persistent attribute with the specified name, if it exists locally on the persistent type (as opposed to in its inheritance hierarchy).

Specified by:
getAttributeNamed in interface PersistentType

getMapping

OrmTypeMapping getMapping()
Description copied from interface: PersistentType
Return the persistent type's mapping. Set the mapping via PersistentType.setMappingKey(String).

Specified by:
getMapping in interface PersistentType

specifiedAttributes

java.util.ListIterator<OrmPersistentAttribute> specifiedAttributes()
Return a read only iterator of the specified OrmPersistentAttributes.


specifiedAttributesSize

int specifiedAttributesSize()
Return the number of specified OrmPersistentAttributes.


addSpecifiedAttribute

OrmPersistentAttribute addSpecifiedAttribute(java.lang.String mappingKey,
                                             java.lang.String attributeName)

removeSpecifiedAttribute

void removeSpecifiedAttribute(OrmPersistentAttribute specifiedAttribute)

virtualAttributes

java.util.ListIterator<OrmPersistentAttribute> virtualAttributes()
Return a read only iterator of the virtual orm persistent attributes. These are attributes that exist in the underyling java class, but are not specified in the orm.xml


virtualAttributesSize

int virtualAttributesSize()
Return the number of virtual orm persistent attributes. These are attributes that exist in the underyling java class, but are not specified in the orm.xml


containsVirtualAttribute

boolean containsVirtualAttribute(OrmPersistentAttribute ormPersistentAttribute)
Return whether this persistent type contains the given virtual persistent attribute.


makeAttributeVirtual

void makeAttributeVirtual(OrmPersistentAttribute ormPersistentAttribute)
Remove the given specified orm persistent attribute from the orm.xml. The attribute will be removed from the orm.xml and moved from the list of specified attributes to the list of virtual attributes.


makeAttributeSpecified

void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute)
Add the given virtual orm persistent attribute to the orm.xml. The attribute will be added to the orm.xml and moved from the list of virtual attributes to the list of specified attributes


makeAttributeSpecified

void makeAttributeSpecified(OrmPersistentAttribute ormPersistentAttribute,
                            java.lang.String mappingKey)
Add the given virtual orm persistent attribute to the orm.xml with a mapping of type mappingKey. The attribute will be added to the orm.xml and moved from the list of virtual attributes to the list of specified attributes


changeMapping

void changeMapping(OrmPersistentAttribute ormPersistentAttribute,
                   OrmAttributeMapping oldMapping,
                   OrmAttributeMapping newMapping)

update

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


contains

boolean contains(int textOffset)

isFor

boolean isFor(java.lang.String typeName)
Return whether the persistent type applies to the specified type.


classChanged

void classChanged(java.lang.String oldClass,
                  java.lang.String newClass)

getJavaPersistentType

JavaPersistentType getJavaPersistentType()
Return the Java persistent type that is referred to by this orm.xml persistent type. If there is no underlying java persistent type, then null is returned.


getDefaultPackage

java.lang.String getDefaultPackage()
Return the persistent type's default package.


isDefaultMetadataComplete

boolean isDefaultMetadataComplete()
Return whether the persistent type is default metadata complete.