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

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IResourcePart, JpaContextNode, JpaNode, JpaStructureNode, MappingFileRoot, Model, OrmPersistentTypeContext, PersistentTypeContext, QueryHolder, XmlContextNode

public interface EntityMappings
extends MappingFileRoot, OrmPersistentTypeContext, QueryHolder

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 DEFAULT_ACCESS_PROPERTY
           
static java.lang.String DEFAULT_CATALOG_PROPERTY
           
static java.lang.String DEFAULT_SCHEMA_PROPERTY
           
static java.lang.String DESCRIPTION_PROPERTY
           
static java.lang.String PACKAGE_PROPERTY
           
static java.lang.String PERSISTENT_TYPES_LIST
           
static java.lang.String SEQUENCE_GENERATORS_LIST
           
static java.lang.String SPECIFIED_ACCESS_PROPERTY
           
static java.lang.String SPECIFIED_CATALOG_PROPERTY
           
static java.lang.String SPECIFIED_SCHEMA_PROPERTY
           
static java.lang.String TABLE_GENERATORS_LIST
           
 
Fields inherited from interface org.eclipse.jpt.core.context.QueryHolder
NAMED_NATIVE_QUERIES_LIST, NAMED_QUERIES_LIST
 
Method Summary
 OrmNamedNativeQuery addNamedNativeQuery(int index)
          Add a named native query to the entity return the object representing it.
 OrmNamedQuery addNamedQuery(int index)
          Add a named query to the entity return the object representing it.
 OrmPersistentType addOrmPersistentType(java.lang.String mappingKey, java.lang.String className)
           
 OrmSequenceGenerator addSequenceGenerator(int index)
           
 OrmTableGenerator addTableGenerator(int index)
           
 void changeMapping(OrmPersistentType ormPersistentType, OrmTypeMapping oldMapping, OrmTypeMapping newMapping)
          Change the type mapping for the persistent type in this context
 boolean containsOffset(int textOffset)
           
 boolean containsPersistentType(java.lang.String className)
           
 AccessType getAccess()
          Return the specified access if present, otherwise return the default access.
 java.lang.String getCatalog()
          Return the specified catalog if present, otherwise return the default catalog.
 Catalog getDbCatalog()
           
 Schema getDbSchema()
           
 SchemaContainer getDbSchemaContainer()
           
 AccessType getDefaultAccess()
           
 java.lang.String getDefaultCatalog()
           
 java.lang.String getDefaultSchema()
           
 java.lang.String getDescription()
           
 java.lang.String getPackage()
           
 OrmPersistenceUnitDefaults getPersistenceUnitDefaults()
          Return the defaults defined within this mapping file *for the persistence unit*.
 PersistenceUnitMetadata getPersistenceUnitMetadata()
           
 OrmPersistentType getPersistentType(java.lang.String fullyQualifiedTypeName)
          Return the {@link OrmPersistentType) listed in this mapping file with the given fullyQualifiedTypeName.
 java.lang.String getSchema()
          Return the specified schema if present, otherwise return the default schema.
 AccessType getSpecifiedAccess()
           
 java.lang.String getSpecifiedCatalog()
           
 java.lang.String getSpecifiedSchema()
           
 java.lang.String getVersion()
           
 XmlEntityMappings getXmlEntityMappings()
           
 void moveNamedNativeQuery(int targetIndex, int sourceIndex)
          Move the named native query from the source index to the target index.
 void moveNamedQuery(int targetIndex, int sourceIndex)
          Move the named query from the source index to the target index.
 void moveSequenceGenerator(int targetIndex, int sourceIndex)
           
 void moveTableGenerator(int targetIndex, int sourceIndex)
           
 java.util.ListIterator<OrmNamedNativeQuery> namedNativeQueries()
          Return a list iterator of the specified named native queries.
 int namedNativeQueriesSize()
          Return the number of named native queries.
 java.util.ListIterator<OrmNamedQuery> namedQueries()
          Return a list iterator of the named queries.
 int namedQueriesSize()
          Return the number of named queries.
 java.util.ListIterator<OrmPersistentType> ormPersistentTypes()
           
 int ormPersistentTypesSize()
           
 void removeNamedNativeQuery(int index)
          Remove the named native query at the index from the entity.
 void removeNamedQuery(int index)
          Remove the named query at the index from the entity.
 void removeOrmPersistentType(int index)
           
 void removeOrmPersistentType(OrmPersistentType ormPersistentType)
           
 void removeSequenceGenerator(int index)
           
 void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator)
           
 void removeTableGenerator(int index)
           
 void removeTableGenerator(OrmTableGenerator tableGenerator)
           
 java.util.ListIterator<OrmSequenceGenerator> sequenceGenerators()
           
 int sequenceGeneratorsSize()
           
 void setDescription(java.lang.String newDescription)
           
 void setPackage(java.lang.String newPackage)
           
 void setSpecifiedAccess(AccessType access)
           
 void setSpecifiedCatalog(java.lang.String catalog)
           
 void setSpecifiedSchema(java.lang.String schema)
           
 java.util.ListIterator<OrmTableGenerator> tableGenerators()
           
 int tableGeneratorsSize()
           
 void update()
          Update the EntityMappings context model object to match the XmlEntityMappings resource model object.
 
Methods inherited from interface org.eclipse.jpt.core.context.XmlContextNode
getEResource, getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit
 
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.JpaStructureNode
dispose, getId, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.core.context.orm.OrmPersistentTypeContext
getDefaultPersistentTypePackage, isDefaultPersistentTypeMetadataComplete
 
Methods inherited from interface org.eclipse.jpt.core.context.PersistentTypeContext
getDefaultPersistentTypeAccess, getOverridePersistentTypeAccess
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit
 
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
getEResource, getValidationTextRange, validate
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getContextDefaultDbCatalog, getContextDefaultDbSchema, getContextDefaultDbSchemaContainer, getMappingFileRoot, getPersistenceUnit
 
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.QueryHolder
removeNamedNativeQuery, removeNamedQuery
 

Field Detail

DESCRIPTION_PROPERTY

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

PACKAGE_PROPERTY

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

SPECIFIED_ACCESS_PROPERTY

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

DEFAULT_ACCESS_PROPERTY

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

SPECIFIED_CATALOG_PROPERTY

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

DEFAULT_CATALOG_PROPERTY

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

SPECIFIED_SCHEMA_PROPERTY

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

DEFAULT_SCHEMA_PROPERTY

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

PERSISTENT_TYPES_LIST

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

SEQUENCE_GENERATORS_LIST

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

TABLE_GENERATORS_LIST

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

getXmlEntityMappings

XmlEntityMappings getXmlEntityMappings()

getVersion

java.lang.String getVersion()

getDescription

java.lang.String getDescription()

setDescription

void setDescription(java.lang.String newDescription)

getPackage

java.lang.String getPackage()

setPackage

void setPackage(java.lang.String newPackage)

getAccess

AccessType getAccess()
Return the specified access if present, otherwise return the default access.

Specified by:
getAccess in interface MappingFileRoot

getSpecifiedAccess

AccessType getSpecifiedAccess()

setSpecifiedAccess

void setSpecifiedAccess(AccessType access)

getDefaultAccess

AccessType getDefaultAccess()

getDbSchemaContainer

SchemaContainer getDbSchemaContainer()

getCatalog

java.lang.String getCatalog()
Return the specified catalog if present, otherwise return the default catalog.

Specified by:
getCatalog in interface MappingFileRoot

getSpecifiedCatalog

java.lang.String getSpecifiedCatalog()

setSpecifiedCatalog

void setSpecifiedCatalog(java.lang.String catalog)

getDefaultCatalog

java.lang.String getDefaultCatalog()

getDbCatalog

Catalog getDbCatalog()

getSchema

java.lang.String getSchema()
Return the specified schema if present, otherwise return the default schema.

Specified by:
getSchema in interface MappingFileRoot

getSpecifiedSchema

java.lang.String getSpecifiedSchema()

setSpecifiedSchema

void setSpecifiedSchema(java.lang.String schema)

getDefaultSchema

java.lang.String getDefaultSchema()

getDbSchema

Schema getDbSchema()

getPersistenceUnitMetadata

PersistenceUnitMetadata getPersistenceUnitMetadata()

ormPersistentTypes

java.util.ListIterator<OrmPersistentType> ormPersistentTypes()

ormPersistentTypesSize

int ormPersistentTypesSize()

addOrmPersistentType

OrmPersistentType addOrmPersistentType(java.lang.String mappingKey,
                                       java.lang.String className)

removeOrmPersistentType

void removeOrmPersistentType(int index)

removeOrmPersistentType

void removeOrmPersistentType(OrmPersistentType ormPersistentType)

containsPersistentType

boolean containsPersistentType(java.lang.String className)

sequenceGenerators

java.util.ListIterator<OrmSequenceGenerator> sequenceGenerators()

sequenceGeneratorsSize

int sequenceGeneratorsSize()

addSequenceGenerator

OrmSequenceGenerator addSequenceGenerator(int index)

removeSequenceGenerator

void removeSequenceGenerator(int index)

removeSequenceGenerator

void removeSequenceGenerator(OrmSequenceGenerator sequenceGenerator)

moveSequenceGenerator

void moveSequenceGenerator(int targetIndex,
                           int sourceIndex)

tableGenerators

java.util.ListIterator<OrmTableGenerator> tableGenerators()

tableGeneratorsSize

int tableGeneratorsSize()

addTableGenerator

OrmTableGenerator addTableGenerator(int index)

removeTableGenerator

void removeTableGenerator(int index)

removeTableGenerator

void removeTableGenerator(OrmTableGenerator tableGenerator)

moveTableGenerator

void moveTableGenerator(int targetIndex,
                        int sourceIndex)

namedQueries

java.util.ListIterator<OrmNamedQuery> namedQueries()
Description copied from interface: QueryHolder
Return a list iterator of the named queries. This will not be null.

Specified by:
namedQueries in interface QueryHolder

namedQueriesSize

int namedQueriesSize()
Description copied from interface: QueryHolder
Return the number of named queries.

Specified by:
namedQueriesSize in interface QueryHolder

addNamedQuery

OrmNamedQuery addNamedQuery(int index)
Description copied from interface: QueryHolder
Add a named query to the entity return the object representing it.

Specified by:
addNamedQuery in interface QueryHolder

removeNamedQuery

void removeNamedQuery(int index)
Description copied from interface: QueryHolder
Remove the named query at the index from the entity.

Specified by:
removeNamedQuery in interface QueryHolder

moveNamedQuery

void moveNamedQuery(int targetIndex,
                    int sourceIndex)
Description copied from interface: QueryHolder
Move the named query from the source index to the target index.

Specified by:
moveNamedQuery in interface QueryHolder

namedNativeQueries

java.util.ListIterator<OrmNamedNativeQuery> namedNativeQueries()
Description copied from interface: QueryHolder
Return a list iterator of the specified named native queries. This will not be null.

Specified by:
namedNativeQueries in interface QueryHolder

namedNativeQueriesSize

int namedNativeQueriesSize()
Description copied from interface: QueryHolder
Return the number of named native queries.

Specified by:
namedNativeQueriesSize in interface QueryHolder

addNamedNativeQuery

OrmNamedNativeQuery addNamedNativeQuery(int index)
Description copied from interface: QueryHolder
Add a named native query to the entity return the object representing it.

Specified by:
addNamedNativeQuery in interface QueryHolder

removeNamedNativeQuery

void removeNamedNativeQuery(int index)
Description copied from interface: QueryHolder
Remove the named native query at the index from the entity.

Specified by:
removeNamedNativeQuery in interface QueryHolder

moveNamedNativeQuery

void moveNamedNativeQuery(int targetIndex,
                          int sourceIndex)
Description copied from interface: QueryHolder
Move the named native query from the source index to the target index.

Specified by:
moveNamedNativeQuery in interface QueryHolder

getPersistenceUnitDefaults

OrmPersistenceUnitDefaults getPersistenceUnitDefaults()
Description copied from interface: MappingFileRoot
Return the defaults defined within this mapping file *for the persistence unit*. Return null if none exists.

Specified by:
getPersistenceUnitDefaults in interface MappingFileRoot
See Also:
MappingFilePersistenceUnitDefaults.resourceExists()

getPersistentType

OrmPersistentType getPersistentType(java.lang.String fullyQualifiedTypeName)
Return the {@link OrmPersistentType) listed in this mapping file with the given fullyQualifiedTypeName. Return null if none exists.


changeMapping

void changeMapping(OrmPersistentType ormPersistentType,
                   OrmTypeMapping oldMapping,
                   OrmTypeMapping newMapping)
Description copied from interface: OrmPersistentTypeContext
Change the type mapping for the persistent type in this context

Specified by:
changeMapping in interface OrmPersistentTypeContext

update

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


containsOffset

boolean containsOffset(int textOffset)