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

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, Model, TypeMapping, XmlContextNode
All Known Subinterfaces:
OrmEmbeddable, OrmEntity, OrmMappedSuperclass

public interface OrmTypeMapping
extends TypeMapping, XmlContextNode

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 CLASS_PROPERTY
           
static java.lang.String DEFAULT_METADATA_COMPLETE_PROPERTY
           
static java.lang.String SPECIFIED_METADATA_COMPLETE_PROPERTY
           
 
Method Summary
 void addToResourceModel(XmlEntityMappings entityMappings)
           
 boolean containsOffset(int textOffset)
           
 TextRange getAttributesTextRange()
           
 java.lang.String getClass_()
           
 TextRange getClassTextRange()
           
 org.eclipse.core.runtime.content.IContentType getContentType()
           
 OrmPersistentType getPersistentType()
           
 XmlTypeMapping getResourceTypeMapping()
           
 TextRange getSelectionTextRange()
           
 java.lang.Boolean getSpecifiedMetadataComplete()
           
 int getXmlSequence()
          type mappings are a sequence in the orm schema.
 void initializeFrom(OrmTypeMapping oldMapping)
           
 boolean isDefaultMetadataComplete()
           
 boolean isMetadataComplete()
           
 java.util.Iterator<OrmPersistentAttribute> overridableAssociations()
          Return an Iterator of associations that can be overriden.
 java.util.Iterator<OrmPersistentAttribute> overridableAttributes()
          Return an Iterator of attributes.
 void removeFromResourceModel(XmlEntityMappings entityMappings)
           
 void setClass(java.lang.String newClass)
           
 void setSpecifiedMetadataComplete(java.lang.Boolean newSpecifiedMetadataComplete)
           
 void update()
          Update the OrmTypeMapping context model object to match the resource model object.
 
Methods inherited from interface org.eclipse.jpt.core.context.TypeMapping
allOverridableAssociationNames, allOverridableAssociations, allOverridableAttributeNames, allOverridableAttributes, associatedTableNamesIncludingInherited, associatedTables, associatedTablesIncludingInherited, attributeMappingKeyAllowed, getDbSchema, getDbTable, getKey, getPrimaryDbTable, getPrimaryTableName, isMapped, overridableAssociationNames, overridableAttributeNames, shouldValidateAgainstDatabase, tableNameIsInvalid
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
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.IResourcePart
getResource
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, postUpdate
 
Methods inherited from interface org.eclipse.jpt.core.JpaNode
getJpaProject, getParent
 
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.IResourcePart
getResource
 

Field Detail

CLASS_PROPERTY

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

SPECIFIED_METADATA_COMPLETE_PROPERTY

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

DEFAULT_METADATA_COMPLETE_PROPERTY

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

getClass_

java.lang.String getClass_()

setClass

void setClass(java.lang.String newClass)

isMetadataComplete

boolean isMetadataComplete()

getSpecifiedMetadataComplete

java.lang.Boolean getSpecifiedMetadataComplete()

setSpecifiedMetadataComplete

void setSpecifiedMetadataComplete(java.lang.Boolean newSpecifiedMetadataComplete)

isDefaultMetadataComplete

boolean isDefaultMetadataComplete()

getXmlSequence

int getXmlSequence()
type mappings are a sequence in the orm schema. We must keep the list of type mappings in the appropriate order so the wtp xml translators will write them to the xml in that order and they will adhere to the schema. Each concrete subclass of XmlTypeMapping must implement this method and return an int that matches it's order in the schema

Returns:

addToResourceModel

void addToResourceModel(XmlEntityMappings entityMappings)

removeFromResourceModel

void removeFromResourceModel(XmlEntityMappings entityMappings)

initializeFrom

void initializeFrom(OrmTypeMapping oldMapping)

getResourceTypeMapping

XmlTypeMapping getResourceTypeMapping()

getContentType

org.eclipse.core.runtime.content.IContentType getContentType()

getSelectionTextRange

TextRange getSelectionTextRange()

getClassTextRange

TextRange getClassTextRange()

getAttributesTextRange

TextRange getAttributesTextRange()

containsOffset

boolean containsOffset(int textOffset)

update

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


getPersistentType

OrmPersistentType getPersistentType()
Specified by:
getPersistentType in interface TypeMapping

overridableAttributes

java.util.Iterator<OrmPersistentAttribute> overridableAttributes()
Description copied from interface: TypeMapping
Return an Iterator of attributes. The attributes must be BasicMappings or IdMappings found in this type mapping

Specified by:
overridableAttributes in interface TypeMapping

overridableAssociations

java.util.Iterator<OrmPersistentAttribute> overridableAssociations()
Description copied from interface: TypeMapping
Return an Iterator of associations that can be overriden. The associations must be OneToOneMappings or ManyToOneMappings found in this type mapping

Specified by:
overridableAssociations in interface TypeMapping