|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PersistenceUnit
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_CASCADE_PERSIST_PROPERTY
|
static java.lang.String |
DEFAULT_CATALOG_PROPERTY
|
static java.lang.String |
DEFAULT_EXCLUDE_UNLISTED_CLASSED_PROPERTY
String constant associated with changes to the persistence unit's default "exclude unlisted classes" setting (not typically changed) |
static java.lang.String |
DEFAULT_SCHEMA_PROPERTY
|
static java.lang.String |
DEFAULT_TRANSACTION_TYPE_PROPERTY
String constant associated with changes to the persistence unit's default transaction type (not typically changed) |
static java.lang.String |
DESCRIPTION_PROPERTY
String constant associated with changes to the persistence unit's description |
static java.lang.String |
GENERATORS_LIST
Identifier for changes to the list of global generators. |
static java.lang.String |
IMPLIED_CLASS_REF_LIST
String constant associated with changes to the implied class refs list |
static java.lang.String |
IMPLIED_MAPPING_FILE_REF_PROPERTY
String constant associated with changes to the implied mapping file ref |
static java.lang.String |
JTA_DATA_SOURCE_PROPERTY
String constant associated with changes to the persistence unit's JTA data source |
static java.lang.String |
NAME_PROPERTY
String constant associated with changes to the persistence unit's name |
static java.lang.String |
NON_JTA_DATA_SOURCE_PROPERTY
String constant associated with changes to the persistence unit's non-JTA data source |
static java.lang.String |
PROPERTIES_LIST
String constant associated with changes to the properties list |
static java.lang.String |
PROVIDER_PROPERTY
String constant associated with changes to the persistence unit's provider |
static java.lang.String |
QUERIES_LIST
Identifier for changes to the list of global queries. |
static java.lang.String |
SPECIFIED_CLASS_REF_LIST
String constant associated with changes to the specified class refs list |
static java.lang.String |
SPECIFIED_EXCLUDE_UNLISTED_CLASSED_PROPERTY
String constant associated with changes to the persistence unit's "exclude unlisted classes" setting |
static java.lang.String |
SPECIFIED_MAPPING_FILE_REF_LIST
String constant associated with changes to the specified mapping file refs list |
static java.lang.String |
SPECIFIED_TRANSACTION_TYPE_PROPERTY
String constant associated with changes to the persistence unit's specified transaction type |
Method Summary | |
---|---|
void |
addGenerator(Generator generator)
Add the generator (defined elsewhere) to the list of generators defined within this persistence unit. |
Property |
addProperty()
Add a property to the persistence unit and return the object representing it. |
Property |
addProperty(int index)
|
void |
addQuery(Query query)
Add the query (defined elsewhere) to the list of queries defined within this persistence unit. |
ClassRef |
addSpecifiedClassRef()
Add a specified class ref to the persistence unit and return the object representing it. |
ClassRef |
addSpecifiedClassRef(int index)
Add a specified class ref to the persistence unit at the specified index and return the object representing it. |
MappingFileRef |
addSpecifiedMappingFileRef()
Add a specified mapping file ref to the persistence unit and return the object representing it. |
MappingFileRef |
addSpecifiedMappingFileRef(int index)
Add a specified mapping file ref to the persistence unit at the specified index and return the object representing it. |
java.util.ListIterator<Generator> |
allGenerators()
Return an iterator on all generators defined within this persistence unit, included duplicately named generators. |
java.util.ListIterator<Query> |
allQueries()
Return an iterator on all queries defined within this persistence unit, included duplicately named queries. |
java.util.ListIterator<ClassRef> |
classRefs()
Return an iterator on the list of class refs, whether specified or implied. |
int |
classRefsSize()
Return the number of specified and implied class refs. |
boolean |
containsOffset(int textOffset)
Return whether the text representation of this persistence unit contains the given text offset |
boolean |
containsProperty(java.lang.String key)
|
AccessType |
getDefaultAccess()
|
boolean |
getDefaultCascadePersist()
|
java.lang.String |
getDefaultCatalog()
|
boolean |
getDefaultExcludeUnlistedClasses()
Return the default "exclude unlisted classes" setting |
java.lang.String |
getDefaultSchema()
|
PersistenceUnitTransactionType |
getDefaultTransactionType()
Return the default transaction type |
java.lang.String |
getDescription()
Return the description of the persistence unit. |
MappingFileRef |
getImpliedMappingFileRef()
Return the current implied mapping file ref. |
java.lang.String |
getJtaDataSource()
Return the JTA data source of the persistence unit. |
java.lang.String |
getName()
Return the name of the persistence unit. |
java.lang.String |
getNonJtaDataSource()
Return the non-JTA data source of the persistence unit. |
Persistence |
getParent()
Return the JPA node's parent. |
PersistentType |
getPersistentType(java.lang.String fullyQualifiedTypeName)
Return the PersistentType specified in this PersistenceUnit with the given fully qualified type name |
Property |
getProperty(java.lang.String key)
|
Property |
getProperty(java.lang.String key,
java.lang.String value)
|
java.lang.String |
getProvider()
Return the provider of the persistence unit. |
java.lang.Boolean |
getSpecifiedExcludeUnlistedClasses()
Return the "exclude unlisted classes" setting of the persistence unit. |
PersistenceUnitTransactionType |
getSpecifiedTransactionType()
Return the transaction type of the persistence unit, one of the values of PersistenceUnitTransactionType |
PersistenceUnitTransactionType |
getTransactionType()
|
java.util.ListIterator<ClassRef> |
impliedClassRefs()
Return an iterator on the list of implied class refs. |
int |
impliedClassRefsSize()
Return the number of implied class refs. |
boolean |
isExcludeUnlistedClasses()
Return the "exclude unlisted classes" setting of the persistence unit. |
java.util.ListIterator<MappingFileRef> |
mappingFileRefs()
Return an iterator on the list of mapping file refs, whether specified or implied. |
int |
mappingFileRefsSize()
Return of mapping file refs, specified and implied. |
java.util.ListIterator<Property> |
properties()
Return an iterator on the list of properties. |
int |
propertiesSize()
|
java.util.ListIterator<Property> |
propertiesWithPrefix(java.lang.String keyPrefix)
|
void |
putProperty(java.lang.String key,
java.lang.String value,
boolean allowDuplicates)
|
void |
removeProperty(Property property)
Remove the property from the persistence unit. |
void |
removeProperty(java.lang.String key)
Remove the property with the given key from the persistence unit. |
void |
removeProperty(java.lang.String key,
java.lang.String value)
Remove the property with the given key and valuefrom the persistence unit. |
void |
removeSpecifiedClassRef(ClassRef classRef)
Remove the specified class ref from the persistence unit. |
void |
removeSpecifiedClassRef(int index)
Remove the specified class ref at the specified index from the persistence unit. |
void |
removeSpecifiedMappingFileRef(int index)
Remove the specified mapping file ref at the specified index from the persistence unit. |
void |
removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef)
Remove the specified mapping file ref from the persistence unit. |
void |
replacePropertyValue(java.lang.String key,
java.lang.String oldValue,
java.lang.String newValue)
|
void |
setDescription(java.lang.String description)
Set the description of the persistence unit. |
void |
setJtaDataSource(java.lang.String jtaDataSource)
Set the JTA data source of the persistence unit. |
void |
setName(java.lang.String name)
Set the name of the persistence unit. |
void |
setNonJtaDataSource(java.lang.String nonJtaDataSource)
Set the non-JTA data source of the persistence unit. |
void |
setProvider(java.lang.String provider)
Set the provider of the persistence unit. |
void |
setSpecifiedExcludeUnlistedClasses(java.lang.Boolean excludeUnlistedClasses)
Set the "exclude unlisted classes" setting of the persistence unit. |
void |
setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType)
Set the transaction type of the persistence unit, one of the values of PersistenceUnitTransactionType |
java.util.ListIterator<ClassRef> |
specifiedClassRefs()
Return an iterator on the list of specified class refs. |
int |
specifiedClassRefsSize()
Return the number of specified class refs. |
java.util.ListIterator<MappingFileRef> |
specifiedMappingFileRefs()
Return an iterator on the list of specified mapping file refs. |
int |
specifiedMappingFileRefsSize()
Return of specified mapping file refs. |
void |
update(XmlPersistenceUnit persistenceUnit)
|
Methods inherited from interface org.eclipse.jpt.core.context.persistence.PersistenceJpaContextNode |
---|
addToMessages, getValidationTextRange |
Methods inherited from interface org.eclipse.jpt.core.context.JpaContextNode |
---|
getEntityMappings, getOrmPersistentType, getPersistenceUnit |
Methods inherited from interface org.eclipse.jpt.core.JpaNode |
---|
getJpaProject, getResource |
Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
---|
getAdapter |
Methods inherited from interface org.eclipse.jpt.core.JpaStructureNode |
---|
dispose, getId, getSelectionTextRange, getStructureNode |
Field Detail |
---|
static final java.lang.String NAME_PROPERTY
static final java.lang.String SPECIFIED_TRANSACTION_TYPE_PROPERTY
static final java.lang.String DEFAULT_TRANSACTION_TYPE_PROPERTY
static final java.lang.String DESCRIPTION_PROPERTY
static final java.lang.String PROVIDER_PROPERTY
static final java.lang.String JTA_DATA_SOURCE_PROPERTY
static final java.lang.String NON_JTA_DATA_SOURCE_PROPERTY
static final java.lang.String SPECIFIED_MAPPING_FILE_REF_LIST
static final java.lang.String IMPLIED_MAPPING_FILE_REF_PROPERTY
static final java.lang.String SPECIFIED_CLASS_REF_LIST
static final java.lang.String IMPLIED_CLASS_REF_LIST
static final java.lang.String SPECIFIED_EXCLUDE_UNLISTED_CLASSED_PROPERTY
static final java.lang.String DEFAULT_EXCLUDE_UNLISTED_CLASSED_PROPERTY
static final java.lang.String PROPERTIES_LIST
static final java.lang.String DEFAULT_SCHEMA_PROPERTY
static final java.lang.String DEFAULT_CATALOG_PROPERTY
static final java.lang.String DEFAULT_ACCESS_PROPERTY
static final java.lang.String DEFAULT_CASCADE_PERSIST_PROPERTY
static final java.lang.String GENERATORS_LIST
static final java.lang.String QUERIES_LIST
Method Detail |
---|
Persistence getParent()
JpaNode
getParent
in interface JpaNode
java.lang.String getName()
void setName(java.lang.String name)
PersistenceUnitTransactionType getTransactionType()
PersistenceUnitTransactionType getSpecifiedTransactionType()
PersistenceUnitTransactionType
void setSpecifiedTransactionType(PersistenceUnitTransactionType transactionType)
PersistenceUnitTransactionType
PersistenceUnitTransactionType getDefaultTransactionType()
java.lang.String getDescription()
void setDescription(java.lang.String description)
java.lang.String getProvider()
void setProvider(java.lang.String provider)
java.lang.String getJtaDataSource()
void setJtaDataSource(java.lang.String jtaDataSource)
java.lang.String getNonJtaDataSource()
void setNonJtaDataSource(java.lang.String nonJtaDataSource)
java.util.ListIterator<MappingFileRef> mappingFileRefs()
int mappingFileRefsSize()
java.util.ListIterator<MappingFileRef> specifiedMappingFileRefs()
int specifiedMappingFileRefsSize()
MappingFileRef addSpecifiedMappingFileRef()
MappingFileRef addSpecifiedMappingFileRef(int index)
void removeSpecifiedMappingFileRef(MappingFileRef mappingFileRef)
void removeSpecifiedMappingFileRef(int index)
MappingFileRef getImpliedMappingFileRef()
java.util.ListIterator<ClassRef> classRefs()
int classRefsSize()
java.util.ListIterator<ClassRef> specifiedClassRefs()
int specifiedClassRefsSize()
ClassRef addSpecifiedClassRef()
ClassRef addSpecifiedClassRef(int index)
void removeSpecifiedClassRef(ClassRef classRef)
void removeSpecifiedClassRef(int index)
java.util.ListIterator<ClassRef> impliedClassRefs()
int impliedClassRefsSize()
boolean isExcludeUnlistedClasses()
java.lang.Boolean getSpecifiedExcludeUnlistedClasses()
void setSpecifiedExcludeUnlistedClasses(java.lang.Boolean excludeUnlistedClasses)
boolean getDefaultExcludeUnlistedClasses()
java.util.ListIterator<Property> properties()
int propertiesSize()
Property addProperty()
Property addProperty(int index)
Property getProperty(java.lang.String key)
Property getProperty(java.lang.String key, java.lang.String value)
java.util.ListIterator<Property> propertiesWithPrefix(java.lang.String keyPrefix)
void putProperty(java.lang.String key, java.lang.String value, boolean allowDuplicates)
void replacePropertyValue(java.lang.String key, java.lang.String oldValue, java.lang.String newValue)
boolean containsProperty(java.lang.String key)
void removeProperty(Property property)
void removeProperty(java.lang.String key)
void removeProperty(java.lang.String key, java.lang.String value)
java.lang.String getDefaultSchema()
java.lang.String getDefaultCatalog()
AccessType getDefaultAccess()
boolean getDefaultCascadePersist()
void addGenerator(Generator generator)
java.util.ListIterator<Generator> allGenerators()
void addQuery(Query query)
java.util.ListIterator<Query> allQueries()
void update(XmlPersistenceUnit persistenceUnit)
PersistentType getPersistentType(java.lang.String fullyQualifiedTypeName)
boolean containsOffset(int textOffset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |