|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MappingFileRef
Context model corresponding to the
XML resource model XmlMappingFileRef,
which corresponds to the mapping-file element
in the persistence.xml file.
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 |
FILE_NAME_PROPERTY
String constant associated with changes to the file name. |
static java.lang.String |
MAPPING_FILE_PROPERTY
String constant associated with changes to the mapping file. |
| Fields inherited from interface org.eclipse.jpt.jpa.core.context.persistence.PersistentTypeContainer |
|---|
TRANSFORMER |
| Method Summary | |
|---|---|
boolean |
containsOffset(int textOffset)
Return whether the specified text offset is within the text representation of the mapping file. |
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> |
createDeleteMappingFileEdits(org.eclipse.core.resources.IFile file)
If this isFor(IFile) the given IFile, create a text
DeleteEdit for deleting the mapping file element and any text that precedes it
from the persistence.xml. |
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> |
createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
Create DeleteEdits for deleting any references to the given type that is about to be deleted. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createMoveFolderEdits(org.eclipse.core.resources.IFolder originalFolder,
org.eclipse.core.runtime.IPath runtimeDestination)
Create ReplaceEdits for moving any references to the originalFolder to the runtimeDestination. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createMoveMappingFileEdits(org.eclipse.core.resources.IFile originalFile,
org.eclipse.core.runtime.IPath runtineDestination)
If this isFor(IFile) the given IFile create a text
ReplaceEdit for moving the originalFile to the destination. |
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> |
createRenameFolderEdits(org.eclipse.core.resources.IFolder originalFolder,
java.lang.String newName)
Create ReplaceEdits for renaming any references to the originalFolder to the newName. |
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> |
createRenameMappingFileEdits(org.eclipse.core.resources.IFile originalFile,
java.lang.String newName)
If this isFor(IFile) the given IFile, create a text
ReplaceEdit for renaming the mapping file element to the new name. |
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. |
java.lang.String |
getFileName()
Return the file name of the mapping file ref. |
MappingFile |
getMappingFile()
Return mapping file corresponding to the mapping file ref's file name. |
PersistenceUnit |
getParent()
Covariant override. |
MappingFilePersistenceUnitMetadata |
getPersistenceUnitMetadata()
Return the mapping file's persistence unit metadata. |
XmlMappingFileRef |
getXmlMappingFileRef()
Return the mapping file ref's corresponding resource mapping file ref. |
boolean |
isFor(org.eclipse.core.resources.IFile file)
Return whether the mapping file ref is a reference to the specified file. |
boolean |
isImplied()
Return whether the mapping file ref is "implied" by, or explicitly specified in, the persistence.xml. |
boolean |
persistenceUnitMetadataExists()
Return whether the mapping file's persistence unit metadata exist. |
void |
setFileName(java.lang.String fileName)
Set the file name of the mapping file ref. |
| 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 |
| Field Detail |
|---|
static final java.lang.String FILE_NAME_PROPERTY
static final java.lang.String MAPPING_FILE_PROPERTY
| Method Detail |
|---|
PersistenceUnit getParent()
getParent in interface JpaNodejava.lang.String getFileName()
void setFileName(java.lang.String fileName)
boolean isFor(org.eclipse.core.resources.IFile file)
MappingFile getMappingFile()
null if the file name is invalid.
MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata()
boolean persistenceUnitMetadataExists()
XmlMappingFileRef getXmlMappingFileRef()
boolean isImplied()
persistence.xml.
boolean containsOffset(int textOffset)
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> createDeleteTypeEdits(org.eclipse.jdt.core.IType type)
java.lang.Iterable<org.eclipse.text.edits.DeleteEdit> createDeleteMappingFileEdits(org.eclipse.core.resources.IFile file)
isFor(IFile) the given IFile, create a text
DeleteEdit for deleting the mapping file element and any text that precedes it
from the persistence.xml.
Otherwise return an EmptyIterable.
Though this will contain 1 or 0 DeleteEdits, using an Iterable
for ease of use with other createDeleteEdit API.
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameTypeEdits(org.eclipse.jdt.core.IType originalType,
java.lang.String newName)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveTypeEdits(org.eclipse.jdt.core.IType originalType,
org.eclipse.jdt.core.IPackageFragment newPackage)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenamePackageEdits(org.eclipse.jdt.core.IPackageFragment originalPackage,
java.lang.String newName)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameFolderEdits(org.eclipse.core.resources.IFolder originalFolder,
java.lang.String newName)
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createRenameMappingFileEdits(org.eclipse.core.resources.IFile originalFile,
java.lang.String newName)
isFor(IFile) the given IFile, create a text
ReplaceEdit for renaming the mapping file element to the new name.
Otherwise return an EmptyIterable.
Though this will contain 1 or 0 ReplaceEdits, using an Iterable
for ease of use with other createReplaceMappingFileEdits API.
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveMappingFileEdits(org.eclipse.core.resources.IFile originalFile,
org.eclipse.core.runtime.IPath runtineDestination)
isFor(IFile) the given IFile create a text
ReplaceEdit for moving the originalFile to the destination.
Otherwise return an EmptyIterable.
The originalFile has not been moved yet.
java.lang.Iterable<org.eclipse.text.edits.ReplaceEdit> createMoveFolderEdits(org.eclipse.core.resources.IFolder originalFolder,
org.eclipse.core.runtime.IPath runtimeDestination)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||