Dali Provisional API
Release 3.2

org.eclipse.jpt.jpa.core.context.persistence
Interface MappingFileRef

All Superinterfaces:
DeleteTypeRefactoringParticipant, IAdaptable, JpaContextModel, JpaModel, JpaStructureNode, JptResourceTypeReference, ManagedTypeContainer, MappingFileRefactoringParticipant, Model, PersistentTypeContainer, TypeRefactoringParticipant

public interface MappingFileRef
extends JpaStructureNode, PersistentTypeContainer, MappingFileRefactoringParticipant, DeleteTypeRefactoringParticipant, TypeRefactoringParticipant

Context model corresponding to the mapping-file element in the persistence.xml file.

NB: While this context model corresponds to an XML resource model, the mapping file it references does not necessarily correspond to an XML resource model.

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

Nested Class Summary
static class MappingFileRef.MappingFileGeneratorsTransformer
           
static class MappingFileRef.MappingFileQueriesTransformer
           
static class MappingFileRef.MappingFileTransformer
           
static class MappingFileRef.PersistenceUnitMetadataExists
           
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
JpaStructureNode.ContextType
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.JpaModel
JpaModel.JpaVersionIsCompatibleWith
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
JptResourceTypeReference.ResourceTypeIsKindOf, JptResourceTypeReference.ResourceTypeTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.PersistentTypeContainer
PersistentTypeContainer.PersistentTypesTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.ManagedTypeContainer
ManagedTypeContainer.ContainsType, ManagedTypeContainer.ManagedTypesTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.persistence.MappingFileRefactoringParticipant
MappingFileRefactoringParticipant.DeleteMappingFileEditsTransformer, MappingFileRefactoringParticipant.MoveFolderEditsTransformer, MappingFileRefactoringParticipant.MoveMappingFileEditsTransformer, MappingFileRefactoringParticipant.RenameFolderEditsTransformer, MappingFileRefactoringParticipant.RenameMappingFileEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.DeleteTypeRefactoringParticipant
DeleteTypeRefactoringParticipant.DeleteTypeEditsTransformer
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.jpa.core.context.TypeRefactoringParticipant
TypeRefactoringParticipant.MoveTypeEditsTransformer, TypeRefactoringParticipant.RenamePackageEditsTransformer, TypeRefactoringParticipant.RenameTypeEditsTransformer
 
Field Summary
static String FILE_NAME_PROPERTY
          String constant associated with changes to the file name.
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,Iterable<Generator>> MAPPING_FILE_GENERATORS_TRANSFORMER
           
static String MAPPING_FILE_PROPERTY
          String constant associated with changes to the mapping file.
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,Iterable<Query>> MAPPING_FILE_QUERIES_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,MappingFile> MAPPING_FILE_TRANSFORMER
           
static org.eclipse.jpt.common.utility.predicate.Predicate<MappingFileRef> PERSISTENCE_UNIT_METADATA_EXISTS
           
 
Fields inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
STRUCTURE_CHILDREN_COLLECTION
 
Fields inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
TRANSFORMER
 
Fields inherited from interface org.eclipse.jpt.jpa.core.context.PersistentTypeContainer
TRANSFORMER
 
Method Summary
 void dispose()
           
 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.
 Iterable<Generator> getMappingFileGenerators()
           
 Iterable<Query> getMappingFileQueries()
           
 PersistenceUnit getParent()
          Covariant override.
 MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata()
          Return the mapping file's persistence unit metadata.
 Class<MappingFileRef> getStructureType()
          Return the structure node's type.
 org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef getXmlMappingFileRef()
          Return the mapping file ref's corresponding XML mapping file ref.
 boolean isDefault()
          Return whether the mapping file ref is a persistence.xml default (as opposed to explicitly specified).
 boolean persistenceUnitMetadataExists()
          Return whether the mapping file's persistence unit metadata exist.
 void setFileName(String fileName)
          Set the file name of the mapping file ref.
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaStructureNode
addRootStructureNodesTo, containsOffset, getContextType, getFullTextRange, getSelectionTextRange, getStructureChildren, getStructureChildrenSize, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.JpaContextModel
getCompletionProposals, getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit, getValidationTextRange, synchronizeWithResourceModel, update, validate
 
Methods inherited from interface org.eclipse.jpt.jpa.core.JpaModel
getJpaPlatform, getJpaProject, getJpaProjectManager, getResource, stateChanged
 
Methods inherited from interface org.eclipse.jpt.common.utility.model.Model
addChangeListener, addCollectionChangeListener, addListChangeListener, addPropertyChangeListener, addStateChangeListener, removeChangeListener, removeCollectionChangeListener, removeListChangeListener, removePropertyChangeListener, removeStateChangeListener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jpt.common.core.JptResourceTypeReference
getResourceType
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.PersistentTypeContainer
getPersistentType, getPersistentTypes
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.ManagedTypeContainer
getManagedType, getManagedTypes
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.persistence.MappingFileRefactoringParticipant
createDeleteMappingFileEdits, createMoveFolderEdits, createMoveMappingFileEdits, createRenameFolderEdits, createRenameMappingFileEdits
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.DeleteTypeRefactoringParticipant
createDeleteTypeEdits
 
Methods inherited from interface org.eclipse.jpt.jpa.core.context.TypeRefactoringParticipant
createMoveTypeEdits, createRenamePackageEdits, createRenameTypeEdits
 

Field Detail

FILE_NAME_PROPERTY

static final String FILE_NAME_PROPERTY
String constant associated with changes to the file name.

See Also:
Constant Field Values

MAPPING_FILE_PROPERTY

static final String MAPPING_FILE_PROPERTY
String constant associated with changes to the mapping file.

See Also:
Constant Field Values

MAPPING_FILE_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,MappingFile> MAPPING_FILE_TRANSFORMER

PERSISTENCE_UNIT_METADATA_EXISTS

static final org.eclipse.jpt.common.utility.predicate.Predicate<MappingFileRef> PERSISTENCE_UNIT_METADATA_EXISTS

MAPPING_FILE_QUERIES_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,Iterable<Query>> MAPPING_FILE_QUERIES_TRANSFORMER

MAPPING_FILE_GENERATORS_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<MappingFileRef,Iterable<Generator>> MAPPING_FILE_GENERATORS_TRANSFORMER
Method Detail

getParent

PersistenceUnit getParent()
Covariant override.

Specified by:
getParent in interface JpaContextModel
Specified by:
getParent in interface JpaModel

getStructureType

Class<MappingFileRef> getStructureType()
Description copied from interface: JpaStructureNode
Return the structure node's type. This is used to find the appropriate UI provider for building the structure node's JPA Details page.

Specified by:
getStructureType in interface JpaStructureNode

getFileName

String getFileName()
Return the file name of the mapping file ref.


setFileName

void setFileName(String fileName)
Set the file name of the mapping file ref.


getMappingFile

MappingFile getMappingFile()
Return mapping file corresponding to the mapping file ref's file name. This can be null if the file name is invalid or if the file's content is unsupported.


getPersistenceUnitMetadata

MappingFilePersistenceUnitMetadata getPersistenceUnitMetadata()
Return the mapping file's persistence unit metadata.


persistenceUnitMetadataExists

boolean persistenceUnitMetadataExists()
Return whether the mapping file's persistence unit metadata exist.


getXmlMappingFileRef

org.eclipse.jpt.jpa.core.resource.persistence.XmlMappingFileRef getXmlMappingFileRef()
Return the mapping file ref's corresponding XML mapping file ref.


isDefault

boolean isDefault()
Return whether the mapping file ref is a persistence.xml default (as opposed to explicitly specified).


getMappingFileQueries

Iterable<Query> getMappingFileQueries()
See Also:
MappingFile.getMappingFileQueries()

getMappingFileGenerators

Iterable<Generator> getMappingFileGenerators()
See Also:
MappingFile.getMappingFileGenerators()

dispose

void dispose()

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.