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

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, JpaContextNode, JpaNode, JpaStructureNode, Model, OrmJpaContextNode, QueryHolder

public interface EntityMappings
extends OrmJpaContextNode, JpaStructureNode, 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 NAMED_NATIVE_QUERIES_LIST
           
static java.lang.String NAMED_QUERIES_LIST
           
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
           
 
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)
           
 boolean containsOffset(int textOffset)
           
 boolean containsPersistentType(java.lang.String className)
           
 AccessType getAccess()
          Return the specifiedAccess if not null, otherwise return the defaultAccess.
 java.lang.String getCatalog()
          Return the specifiedCatalog if not null, otherwise return the defaultCatalog.
 AccessType getDefaultAccess()
           
 java.lang.String getDefaultCatalog()
           
 java.lang.String getDefaultSchema()
           
 java.lang.String getDescription()
           
 java.lang.String getPackage()
           
 PersistenceUnitDefaults getPersistenceUnitDefaults()
           
 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 specifiedSchema if not null, otherwise return the defaultSchema.
 AccessType getSpecifiedAccess()
           
 java.lang.String getSpecifiedCatalog()
           
 java.lang.String getSpecifiedSchema()
           
 java.lang.String getVersion()
           
 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 newSpecifiedAccess)
           
 void setSpecifiedCatalog(java.lang.String newSpecifiedCatalog)
           
 void setSpecifiedSchema(java.lang.String newSpecifiedSchema)
           
 java.util.ListIterator<OrmTableGenerator> tableGenerators()
           
 int tableGeneratorsSize()
           
 void update(XmlEntityMappings entityMappings)
           
 
Methods inherited from interface org.eclipse.jpt.core.context.orm.OrmJpaContextNode
addToMessages, getValidationTextRange
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 
Methods inherited from interface org.eclipse.jpt.core.JpaStructureNode
dispose, getId, getSelectionTextRange, getStructureNode
 
Methods inherited from interface org.eclipse.jpt.core.context.QueryHolder
removeNamedNativeQuery, removeNamedQuery
 
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode
getEntityMappings, getOrmPersistentType, getPersistenceUnit
 

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

DEFAULT_SCHEMA_PROPERTY

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

SPECIFIED_SCHEMA_PROPERTY

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

DEFAULT_CATALOG_PROPERTY

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

SPECIFIED_CATALOG_PROPERTY

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

DEFAULT_ACCESS_PROPERTY

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

SPECIFIED_ACCESS_PROPERTY

static final java.lang.String SPECIFIED_ACCESS_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

NAMED_QUERIES_LIST

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

NAMED_NATIVE_QUERIES_LIST

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

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)

getSchema

java.lang.String getSchema()
Return the specifiedSchema if not null, otherwise return the defaultSchema.


getDefaultSchema

java.lang.String getDefaultSchema()

getSpecifiedSchema

java.lang.String getSpecifiedSchema()

setSpecifiedSchema

void setSpecifiedSchema(java.lang.String newSpecifiedSchema)

getCatalog

java.lang.String getCatalog()
Return the specifiedCatalog if not null, otherwise return the defaultCatalog.


getDefaultCatalog

java.lang.String getDefaultCatalog()

getSpecifiedCatalog

java.lang.String getSpecifiedCatalog()

setSpecifiedCatalog

void setSpecifiedCatalog(java.lang.String newSpecifiedCatalog)

getAccess

AccessType getAccess()
Return the specifiedAccess if not null, otherwise return the defaultAccess.


getDefaultAccess

AccessType getDefaultAccess()

getSpecifiedAccess

AccessType getSpecifiedAccess()

setSpecifiedAccess

void setSpecifiedAccess(AccessType newSpecifiedAccess)

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

PersistenceUnitDefaults getPersistenceUnitDefaults()

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)

update

void update(XmlEntityMappings entityMappings)

containsOffset

boolean containsOffset(int textOffset)