org.eclipse.jpt.jpa.core.context.orm
Interface OrmAttributeMapping

All Superinterfaces:
AttributeMapping, org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model, XmlContextNode
All Known Subinterfaces:
OrmBaseEmbeddedMapping, OrmBasicMapping, OrmCollectionMapping, OrmCollectionMapping2_0, OrmColumnMapping, OrmConvertibleMapping, OrmElementCollectionMapping2_0, OrmEmbeddedIdMapping, OrmEmbeddedMapping, OrmEmbeddedMapping2_0, OrmIdMapping, OrmManyToManyMapping, OrmManyToManyMapping2_0, OrmManyToOneMapping, OrmManyToOneMapping2_0, OrmMultiRelationshipMapping, OrmOneToManyMapping, OrmOneToManyMapping2_0, OrmOneToOneMapping, OrmOneToOneMapping2_0, OrmRelationshipMapping, OrmSingleRelationshipMapping, OrmSingleRelationshipMapping2_0, OrmTransientMapping, OrmVersionMapping

public interface OrmAttributeMapping
extends AttributeMapping, XmlContextNode

orm.xml attribute mapping

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.3
Version:
3.0

Field Summary
static java.lang.String NAME_PROPERTY
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.AttributeMapping
DEFAULT_PROPERTY
 
Method Summary
 void addXmlAttributeMappingTo(Attributes resourceAttributes)
           
 boolean contains(int textOffset)
           
 java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveTypeEdits(org.eclipse.jdt.core.IType originalType, org.eclipse.jdt.core.IPackageFragment newPackage)
          Create ReplaceEdits for moving any references to the originalType to the newPackage.
 java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenamePackageEdits(org.eclipse.jdt.core.IPackageFragment originalPackage, java.lang.String newName)
          Create ReplaceEdits for renaming any references to the originalPackage to the newName.
 java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameTypeEdits(org.eclipse.jdt.core.IType originalType, java.lang.String newName)
          Create ReplaceEdits for renaming any references to the originalType to the newName.
 TextRange getNameTextRange()
           
 OrmPersistentAttribute getParent()
          Return the JPA node's parent.
 OrmPersistentAttribute getPersistentAttribute()
          Return the mapping's attribute (typically its parent node in the containment hierarchy).
 TextRange getSelectionTextRange()
           
 OrmTypeMapping getTypeMapping()
          Return the mapping for the type that contains the mapping's attribute.
 XmlAttributeMapping getXmlAttributeMapping()
           
 int getXmlSequence()
          Attributes are a sequence in the orm.xml schema.
 void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping)
           
 void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping)
           
 void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping)
           
 void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping)
           
 void initializeFromOrmIdMapping(OrmIdMapping oldMapping)
           
 void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping)
           
 void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping)
           
 void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping)
           
 void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping)
           
 void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping)
           
 void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping)
           
 void initializeOn(OrmAttributeMapping newMapping)
           
 void removeXmlAttributeMappingFrom(Attributes resourceAttributes)
           
 void setName(java.lang.String name)
           
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.AttributeMapping
allMappingNames, allOverridableAssociationMappingNames, allOverridableAttributeMappingNames, getKey, getName, getPrimaryKeyColumnName, isDefault, isOverridableAssociationMapping, isOverridableAttributeMapping, isOwnedBy, isRelationshipOwner, resolveAttributeMapping, resolveOverriddenColumn, resolveOverriddenRelationship, validatesAgainstDatabase
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.XmlContextNode
getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getResourceType, synchronizeWithResourceModel, update
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaNode
getJpaProject, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, addTreeChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener, removeTreeChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.IResourcePart
getResource
 

Field Detail

NAME_PROPERTY

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

getParent

OrmPersistentAttribute 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

getPersistentAttribute

OrmPersistentAttribute getPersistentAttribute()
Description copied from interface: AttributeMapping
Return the mapping's attribute (typically its parent node in the containment hierarchy).

Specified by:
getPersistentAttribute in interface AttributeMapping

getXmlAttributeMapping

XmlAttributeMapping getXmlAttributeMapping()

getTypeMapping

OrmTypeMapping getTypeMapping()
Description copied from interface: AttributeMapping
Return the mapping for the type that contains the mapping's attribute.

Specified by:
getTypeMapping in interface AttributeMapping

setName

void setName(java.lang.String name)

getXmlSequence

int getXmlSequence()
Attributes are a sequence in the orm.xml schema. We must keep the list of attributes in the appropriate order so the WTP XML translators will write them to the XML document in that order and they will adhere to the schema.

Each implementation must implement this method and return a number that matches its order in the schema.


addXmlAttributeMappingTo

void addXmlAttributeMappingTo(Attributes resourceAttributes)

removeXmlAttributeMappingFrom

void removeXmlAttributeMappingFrom(Attributes resourceAttributes)

contains

boolean contains(int textOffset)

getSelectionTextRange

TextRange getSelectionTextRange()

getNameTextRange

TextRange getNameTextRange()

initializeOn

void initializeOn(OrmAttributeMapping newMapping)

initializeFromOrmAttributeMapping

void initializeFromOrmAttributeMapping(OrmAttributeMapping oldMapping)

initializeFromOrmBasicMapping

void initializeFromOrmBasicMapping(OrmBasicMapping oldMapping)

initializeFromOrmIdMapping

void initializeFromOrmIdMapping(OrmIdMapping oldMapping)

initializeFromOrmTransientMapping

void initializeFromOrmTransientMapping(OrmTransientMapping oldMapping)

initializeFromOrmEmbeddedMapping

void initializeFromOrmEmbeddedMapping(OrmEmbeddedMapping oldMapping)

initializeFromOrmEmbeddedIdMapping

void initializeFromOrmEmbeddedIdMapping(OrmEmbeddedIdMapping oldMapping)

initializeFromOrmVersionMapping

void initializeFromOrmVersionMapping(OrmVersionMapping oldMapping)

initializeFromOrmOneToManyMapping

void initializeFromOrmOneToManyMapping(OrmOneToManyMapping oldMapping)

initializeFromOrmManyToOneMapping

void initializeFromOrmManyToOneMapping(OrmManyToOneMapping oldMapping)

initializeFromOrmOneToOneMapping

void initializeFromOrmOneToOneMapping(OrmOneToOneMapping oldMapping)

initializeFromOrmManyToManyMapping

void initializeFromOrmManyToManyMapping(OrmManyToManyMapping oldMapping)

createRenameTypeEdits

java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameTypeEdits(org.eclipse.jdt.core.IType originalType,
                                                                             java.lang.String newName)
Create ReplaceEdits for renaming any references to the originalType to the newName. The originalType has not yet been renamed, the newName is the new short name.


createMoveTypeEdits

java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveTypeEdits(org.eclipse.jdt.core.IType originalType,
                                                                           org.eclipse.jdt.core.IPackageFragment newPackage)
Create ReplaceEdits for moving any references to the originalType to the newPackage. The originalType has not yet been moved.


createRenamePackageEdits

java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenamePackageEdits(org.eclipse.jdt.core.IPackageFragment originalPackage,
                                                                                java.lang.String newName)
Create ReplaceEdits for renaming any references to the originalPackage to the newName. The originalPackage has not yet been renamed.