org.eclipse.jpt.jpa.core.context
Interface MappingFile

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, Model, PersistentTypeContainer, XmlContextNode, XmlFile
All Known Subinterfaces:
OrmXml

public interface MappingFile
extends XmlFile, PersistentTypeContainer

JPA mapping file (typically orm.xml).

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.1
Version:
2.3

Field Summary
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer
TRANSFORMER
 
Method Summary
 java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
          Create DeleteEdits for deleting references (if any) to the type about to be deleted.
 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.
 MappingFileRef getParent()
          Covariant override.
 MappingFileRoot getRoot()
          Return the mapping file's root.
 boolean isIn(org.eclipse.core.resources.IFolder folder)
          Return true if this mapping file exists in the given folder
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.XmlFile
getXmlResource
 
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
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
dispose, getId, getResourceType, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer
getPersistentType, getPersistentTypes
 

Method Detail

getParent

MappingFileRef getParent()
Covariant override.

Specified by:
getParent in interface JpaNode

getRoot

MappingFileRoot getRoot()
Return the mapping file's root. This can be null.


isIn

boolean isIn(org.eclipse.core.resources.IFolder folder)
Return true if this mapping file exists in the given folder


createDeleteTypeEdits

java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
Create DeleteEdits for deleting references (if any) to the type about to be deleted. Return an EmptyIterable if there are not any references to the given type.


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.