|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jdo.impl.pm.PersistenceManagerImpl
public abstract class PersistenceManagerImpl
This is the StoreManager independent implemetation of the org.apache.jdo.pm.PersistenceManagerInternal interface. Delegates most of the method execution to the corresponding instance of the CacheManagerImpl.
Field Summary | |
---|---|
protected static I18NHelper |
msg
I18N message handler |
Constructor Summary | |
---|---|
PersistenceManagerImpl(PersistenceManagerFactoryInternal pmf,
java.lang.String username,
java.lang.String password)
Constructs new instance of PersistenceManagerImpl for this PersistenceManagerFactoryInternal and particular combination of username and password. |
Method Summary | |
---|---|
protected void |
afterCompletion(int status)
Called by Transaction commit() or rollback() cleans up transactional cache |
void |
assertIsOpen()
assert this PM instance is open |
void |
assertReadAllowed()
Assert the NontransactionalRead flag is true or a transaction is active. |
void |
close()
Close this persistence manager |
javax.jdo.Transaction |
currentTransaction()
Returns transaction associated with this persistence manager |
void |
deletePersistent(java.lang.Object pc)
Delete the persistent instance from the data store. |
void |
deletePersistentAll(java.util.Collection pcs)
Delete a Collection of instances from the data store. |
void |
deletePersistentAll(java.lang.Object[] pcs)
Delete an array of instances from the data store. |
void |
deregister(java.lang.Object oid)
Removes the object from the cache. |
protected void |
deregisterJTA()
Disassociate this PersistenceManager with the current JTA transaction. |
void |
deregisterTransient(StateManagerInternal sm)
Removes transient object from the transient cache. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
void |
evict(java.lang.Object pc)
Mark an instance as no longer needed in the cache. |
void |
evictAll()
Mark all persistent-nontransactional instances as no longer needed in the cache. |
void |
evictAll(java.util.Collection pcs)
Mark a Collection of instances as no longer needed in the cache. |
void |
evictAll(java.lang.Object[] pcs)
Mark an array of instances as no longer needed in the cache. |
StateManagerInternal |
findStateManager(javax.jdo.spi.PersistenceCapable pc)
A helper method to find the StateManager associated with this PC instance |
void |
flush()
Called by Query or Extent to flush updates to the database in a datastore transaction. |
protected void |
flushInstances()
Called by Transaction commit() Loops through transactional cache and calls PersistentStore.updatePersistent() on each instance |
protected void |
forceClose()
Close this persistence manager even if there are open wrappers or an uncomplete transaction. |
java.lang.ClassLoader |
getContextClassLoaderPrivileged()
Calls getContextClassLoader for the current Thread in a doPrivileged block. |
javax.jdo.PersistenceManager |
getCurrentWrapper()
Returns current wrapper |
javax.jdo.Extent |
getExtent(java.lang.Class persistenceCapableClass,
boolean subclasses)
The PersistenceManager may manage a collection of instances in the data store based on the class of the instances. |
boolean |
getIgnoreCache()
Get the value of the ignoreCache flag. |
java.util.Collection |
getInsertedInstances()
Returns a Collection of instances that has been made persistent or become persistent through persistence-by-reachability algorithm in this transaction. |
java.lang.Object |
getInternalObjectId(java.lang.Object pc)
Gets the internal object id for this instance. |
boolean |
getMultithreaded()
Get the current Multithreaded flag for this PersistenceManager. |
java.lang.Object |
getObjectById(java.lang.Object oid,
boolean validate)
This method locates a persistent instance in the cache of instances managed by this PersistenceManager. |
java.lang.Object |
getObjectId(java.lang.Object pc)
The ObjectId returned by this method represents the JDO identity of the instance. |
java.lang.Class |
getObjectIdClass(java.lang.Class cls)
Return the Class that implements the JDO Identity for the specified PersistenceCapable Class. |
javax.jdo.PersistenceManagerFactory |
getPersistenceManagerFactory()
This method returns the PersistenceManagerFactory used to create this PersistenceManager. |
java.util.Properties |
getProperties()
The JDO vendor might store certain non-operational properties and make those properties available to applications (for troubleshooting). |
StateManagerInternal |
getStateManager(java.lang.Object oid,
java.lang.Class pcClass)
Provides a StateManagerInternal for the given Object Id. |
StoreManager |
getStoreManager()
Provides a StoreManager that is ready to accept operations on it. |
java.lang.Object |
getTransactionalObjectId(java.lang.Object pc)
|
java.lang.Object |
getUserObject()
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance. |
int |
hashCode()
Returns a hash code value for this PersistenceManager. |
void |
hereIsStateManager(StateManagerInternal sm,
javax.jdo.spi.PersistenceCapable pc)
A helper method called from the StateManager inside getPersistenceManager() to identify StateManager associated with this PC instance |
boolean |
insideCommit()
Returns true if the call initiated as a result of the commit process, versus flush for query in a datastore transaction. |
boolean |
isClosed()
Return whether this PersistenceManager is closed. |
boolean |
isSupportedSCOType(java.lang.Class type)
Called by StateManager to verify field type. |
java.lang.Class |
loadClass(java.lang.String name,
java.lang.ClassLoader given)
Provides a Class of the given name. |
java.lang.Class |
loadPCClassForObjectIdClass(java.lang.Class objectIdClass)
Provides the Class object of the persistence-capable class that defines the specified class as its ObjectId class. |
void |
makeNontransactional(java.lang.Object pc)
Make an instance non-transactional after commit. |
void |
makeNontransactionalAll(java.util.Collection pcs)
Make a Collection of instances non-transactional after commit. |
void |
makeNontransactionalAll(java.lang.Object[] pcs)
Make an array of instances non-transactional after commit. |
void |
makePersistent(java.lang.Object pc)
Make the transient instance persistent in this PersistenceManager. |
void |
makePersistentAll(java.util.Collection pcs)
Make an collection of instances persistent. |
void |
makePersistentAll(java.lang.Object[] pcs)
Make an array of instances persistent. |
void |
makeTransactional(java.lang.Object pc)
Make an instance subject to transactional boundaries. |
void |
makeTransactionalAll(java.util.Collection pcs)
Make a Collection of instances subject to transactional boundaries. |
void |
makeTransactionalAll(java.lang.Object[] pcs)
Make an array of instances subject to transactional boundaries. |
void |
makeTransient(java.lang.Object pc)
Make an instance transient, removing it from management by this PersistenceManager. |
void |
makeTransientAll(java.util.Collection pcs)
Make a Collection of instances transient, removing them from management by this PersistenceManager. |
void |
makeTransientAll(java.lang.Object[] pcs)
Make an array of instances transient, removing them from management by this PersistenceManager. |
void |
markAsFlushed(StateManagerInternal sm)
Called by StateManagerInternal#markAsFlushed() to adjust transactional cache(s) if necessary after successful flush to the data store. |
java.util.Collection |
newCollectionInstanceInternal(java.lang.Class type,
java.lang.Class elementType,
boolean allowNulls,
java.lang.Integer initialSize,
java.lang.Float loadFactor,
java.util.Collection initialContents,
java.util.Comparator comparator)
Called by internally by the runtime to create a new tracked instance. |
java.util.Map |
newMapInstanceInternal(java.lang.Class type,
java.lang.Class keyType,
java.lang.Class valueType,
boolean allowNulls,
java.lang.Integer initialSize,
java.lang.Float loadFactor,
java.util.Map initialContents,
java.util.Comparator comparator)
Called by internally by the runtime to create a new tracked instance. |
java.lang.Object |
newObjectIdInstance(java.lang.Class pcClass,
java.lang.String str)
This method returns an object id instance corresponding to the Class and String arguments. |
abstract javax.jdo.Query |
newQuery()
Create a new Query with no elements. |
abstract javax.jdo.Query |
newQuery(java.lang.Class cls)
Create a new Query specifying the Class of the results. |
abstract javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln)
Create a new Query with the Class of the results and candidate Collection. |
abstract javax.jdo.Query |
newQuery(java.lang.Class cls,
java.util.Collection cln,
java.lang.String filter)
Create a new Query with the Class of the results, candidate Collection, and Filter. |
abstract javax.jdo.Query |
newQuery(java.lang.Class cls,
java.lang.String filter)
Create a new Query with the Class of the results and Filter. |
abstract javax.jdo.Query |
newQuery(javax.jdo.Extent cln)
Create a new Query with the candidate Extent; the class is taken from the Extent. |
abstract javax.jdo.Query |
newQuery(javax.jdo.Extent cln,
java.lang.String filter)
Create a new Query with the candidate Extent and Filter. |
abstract javax.jdo.Query |
newQuery(java.lang.Object compiled)
Create a new Query using elements from another Query. |
abstract javax.jdo.Query |
newQuery(java.lang.String language,
java.lang.Object query)
Create a new Query using the specified language. |
java.lang.Object |
newSCOInstanceInternal(java.lang.Class type)
Called by internally by the runtime to create a new tracked instance. |
protected void |
notifyOptimistic(boolean optimistic)
For Transaction to notify PersistenceManager that optimistic flag is changed |
protected void |
notifyStatusChange(boolean isActive)
For Transaction to notify PersistenceManager that status is changed |
protected void |
popCurrentWrapper(PersistenceManagerWrapper prev)
Replace current wrapper with the previous |
protected void |
pushCurrentWrapper(PersistenceManagerWrapper pmw)
Remember the current wrapper |
void |
refresh(java.lang.Object pc)
Refresh the state of the instance from the data store. |
void |
refreshAll()
Refresh the state of all applicable instances from the data store. |
void |
refreshAll(java.util.Collection pcs)
Refresh the state of a Collection of instances from the data store. |
void |
refreshAll(java.lang.Object[] pcs)
Refresh the state of an array of instances from the data store. |
void |
register(StateManagerInternal sm,
java.lang.Object oid,
boolean transactional,
boolean throwDuplicateException)
Adds persistent object to the cache. |
void |
registerTransient(StateManagerInternal sm)
Adds transient object to the transient cache. |
void |
replaceObjectId(java.lang.Object oldId,
java.lang.Object newId)
Replaces the objectId key value in the cache. |
void |
retrieve(java.lang.Object pc)
Retrieve field values of an instance from the store. |
void |
retrieveAll(java.util.Collection pcs)
Retrieve field values of instances from the store. |
void |
retrieveAll(java.util.Collection pcs,
boolean DFGOnly)
Retrieve field values of instances from the store. |
void |
retrieveAll(java.lang.Object[] pcs)
Retrieve field values of instances from the store. |
void |
retrieveAll(java.lang.Object[] pcs,
boolean DFGOnly)
Retrieve field values of instances from the store. |
void |
setIgnoreCache(boolean flag)
|
protected void |
setJTATransaction(java.lang.Object t)
with the current thread in the managed environment |
void |
setMultithreaded(boolean flag)
Set the Multithreaded flag for this PersistenceManager. |
void |
setUserObject(java.lang.Object o)
The application can manage the PersistenceManager instances more easily by having an application object associated with each PersistenceManager instance. |
protected boolean |
verify(java.lang.String username,
java.lang.String password)
Verify that cached instance of a PersistenceManager was initialy requested with the same values for username and password |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final I18NHelper msg
Constructor Detail |
---|
public PersistenceManagerImpl(PersistenceManagerFactoryInternal pmf, java.lang.String username, java.lang.String password)
pmf
- calling PersistenceManagerFactory as PersistenceManagerFactoryInternalusername
- user name used for accessing Connector or null if none
is provided.password
- user password used for accessing Connector or null if
none is provided.Method Detail |
---|
public void setIgnoreCache(boolean flag)
setIgnoreCache
in interface javax.jdo.PersistenceManager
flag
- the ignoreCache valuePersistenceManager.setIgnoreCache(boolean flag)
public boolean getIgnoreCache()
getIgnoreCache
in interface javax.jdo.PersistenceManager
PersistenceManager.getIgnoreCache()
public void setMultithreaded(boolean flag)
setMultithreaded
in interface javax.jdo.PersistenceManager
flag
- the Multithreaded setting.public boolean getMultithreaded()
getMultithreaded
in interface javax.jdo.PersistenceManager
setMultithreaded(boolean)
public boolean isClosed()
isClosed
in interface javax.jdo.PersistenceManager
PersistenceManager.isClosed()
public void close()
close
in interface javax.jdo.PersistenceManager
PersistenceManager.close()
public javax.jdo.Transaction currentTransaction()
currentTransaction
in interface javax.jdo.PersistenceManager
public java.lang.Object getObjectById(java.lang.Object oid, boolean validate)
If the validate flag is true: This method verifies that there is an instance in the data store with the same oid, constructs an instance, and returns it. If there is no transaction active, then a hollow instance or persistent non-transactional instance is returned. If there is a transaction active, then a persistent clean instance is returned.
If the validate flag is false: If there is not already an instance in the cache with the same oid, then an instance is constructed and returned. If the instance does not exist in the data store, then this method will not fail. However, a request to access fields of the instance will throw an exception.
getObjectById
in interface javax.jdo.PersistenceManager
oid
- an ObjectIdvalidate
- if the existence of the instance is to be validated
public java.lang.Object getObjectId(java.lang.Object pc)
getObjectId
in interface javax.jdo.PersistenceManager
pc
- the PersistenceCapable instance
public java.lang.Class loadClass(java.lang.String name, java.lang.ClassLoader given) throws java.lang.ClassNotFoundException
PersistenceManagerInternal
If after the above has been tried on all the ClassLoaders, an appropriate Class has not been found, throws JDOUserException.
loadClass
in interface PersistenceManagerInternal
name
- Fully qualified name of the Class to load.given
- ClassLoader which is the first to be tried
in loading the named Class.
java.lang.ClassNotFoundException
- - if an appropriate Class can not
be loaded.PersistenceManagerInternal.loadClass(java.lang.String, java.lang.ClassLoader)
public java.lang.Class loadPCClassForObjectIdClass(java.lang.Class objectIdClass) throws java.lang.ClassNotFoundException
PersistenceManagerInternal
PersistenceManagerInternal.loadClass(java.lang.String, java.lang.ClassLoader)
:
loadPCClassForObjectIdClass
in interface PersistenceManagerInternal
java.lang.ClassNotFoundException
PersistenceManagerInternal.loadPCClassForObjectIdClass(java.lang.Class)
public java.lang.Object getInternalObjectId(java.lang.Object pc)
getInternalObjectId
in interface PersistenceManagerInternal
pc
-
public java.lang.Object getTransactionalObjectId(java.lang.Object pc)
getTransactionalObjectId
in interface javax.jdo.PersistenceManager
PersistenceManager.getTransactionalObjectId(java.lang.Object)
public java.lang.Object newObjectIdInstance(java.lang.Class pcClass, java.lang.String str)
newObjectIdInstance
in interface javax.jdo.PersistenceManager
pcClass
- the Class of the persistence-capable instancestr
- the String form of the object id
public java.lang.Class getObjectIdClass(java.lang.Class cls)
In order for the application to construct an instance of the ObjectId class it needs to know the class being used by the JDO implementation.
getObjectIdClass
in interface javax.jdo.PersistenceManager
cls
- the PersistenceCapable Class
getObjectById(java.lang.Object, boolean)
public abstract javax.jdo.Query newQuery()
newQuery
in interface javax.jdo.PersistenceManager
public abstract javax.jdo.Query newQuery(java.lang.Object compiled)
newQuery
in interface javax.jdo.PersistenceManager
compiled
- another Query from the same JDO implementation
public abstract javax.jdo.Query newQuery(java.lang.String language, java.lang.Object query)
newQuery
in interface javax.jdo.PersistenceManager
language
- the language of the query parameterquery
- the query, which is of a form determined by the language
public abstract javax.jdo.Query newQuery(java.lang.Class cls)
newQuery
in interface javax.jdo.PersistenceManager
cls
- the Class of the results
public abstract javax.jdo.Query newQuery(javax.jdo.Extent cln)
newQuery
in interface javax.jdo.PersistenceManager
cln
- the Extent of candidate instances
public abstract javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln)
newQuery
in interface javax.jdo.PersistenceManager
cls
- the Class of resultscln
- the Collection of candidate instances
public abstract javax.jdo.Query newQuery(java.lang.Class cls, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cls
- the Class of resultsfilter
- the Filter for candidate instances
public abstract javax.jdo.Query newQuery(java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cls
- the Class of resultscln
- the Collection of candidate instancesfilter
- the Filter for candidate instances
public abstract javax.jdo.Query newQuery(javax.jdo.Extent cln, java.lang.String filter)
newQuery
in interface javax.jdo.PersistenceManager
cln
- the Extent of candidate instancesfilter
- the Filter for candidate instances
public javax.jdo.Extent getExtent(java.lang.Class persistenceCapableClass, boolean subclasses)
getExtent
in interface javax.jdo.PersistenceManager
persistenceCapableClass
- Class of instancessubclasses
- whether to include instances of subclasses
StoreManager.getExtent(java.lang.Class, boolean, org.apache.jdo.pm.PersistenceManagerInternal)
,
Query
public void makePersistent(java.lang.Object pc)
makePersistent
in interface javax.jdo.PersistenceManager
pc
- a transient instance of a Class that implements
PersistenceCapablepublic void makePersistentAll(java.lang.Object[] pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- an array of transient instancesmakePersistent(Object pc)
public void makePersistentAll(java.util.Collection pcs)
makePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- an collection of transient instancesmakePersistent(Object pc)
public void deletePersistent(java.lang.Object pc)
deletePersistent
in interface javax.jdo.PersistenceManager
pc
- a persistent instancepublic void deletePersistentAll(java.lang.Object[] pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- a Collection of persistent instancesdeletePersistent(Object pc)
public void deletePersistentAll(java.util.Collection pcs)
deletePersistentAll
in interface javax.jdo.PersistenceManager
pcs
- a Collection of persistent instancesdeletePersistent(Object pc)
public void makeTransient(java.lang.Object pc)
The instance loses its JDO identity and it is no longer associated with any PersistenceManager. The state of fields is preserved unchanged.
makeTransient
in interface javax.jdo.PersistenceManager
pc
- the instance to make transient.public void makeTransientAll(java.lang.Object[] pcs)
The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- the instances to make transient.public void makeTransientAll(java.util.Collection pcs)
The instances lose their JDO identity and they are no longer associated with any PersistenceManager. The state of fields is preserved unchanged.
makeTransientAll
in interface javax.jdo.PersistenceManager
pcs
- the instances to make transient.public void makeTransactional(java.lang.Object pc)
Transient instances normally do not observe transaction boundaries. This method makes transient instances sensitive to transaction completion. If an instance is modified in a transaction, and the transaction rolls back, the state of the instance is restored to the state before the first change in the transaction.
For persistent instances read in optimistic transactions, this method allows the application to make the state of the instance part of the transactional state. At transaction commit, the state of the instance in cache is compared to the state of the instance in the data store. If they are not the same, then an exception is thrown.
makeTransactional
in interface javax.jdo.PersistenceManager
pc
- the instance to make transactional.public void makeTransactionalAll(java.lang.Object[] pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- the array of instances to make transactional.makeTransactional(Object pc)
public void makeTransactionalAll(java.util.Collection pcs)
makeTransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- the Collection of instances to make transactional.makeTransactional(Object pc)
public void makeNontransactional(java.lang.Object pc)
Normally, at transaction completion, instances are evicted from the cache. This method allows an application to identify an instance as not being evicted from the cache at transaction completion. Instead, the instance remains in the cache with nontransactional state.
makeNontransactional
in interface javax.jdo.PersistenceManager
pc
- the instance to make nontransactional.public void makeNontransactionalAll(java.lang.Object[] pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- the array of instances to make nontransactional.makeNontransactional(Object pc)
public void makeNontransactionalAll(java.util.Collection pcs)
makeNontransactionalAll
in interface javax.jdo.PersistenceManager
pcs
- the Collection of instances to make nontransactional.makeNontransactional(Object pc)
public void evict(java.lang.Object pc)
evict
in interface javax.jdo.PersistenceManager
pc
- the instance to evict from the cache.public void evictAll(java.lang.Object[] pcs)
evictAll
in interface javax.jdo.PersistenceManager
pcs
- the array of instances to evict from the cache.evict(Object pc)
public void evictAll(java.util.Collection pcs)
evictAll
in interface javax.jdo.PersistenceManager
pcs
- the Collection of instance to evict from the cache.public void evictAll()
evictAll
in interface javax.jdo.PersistenceManager
evict(Object pc)
public void refresh(java.lang.Object pc)
In an optimistic transaction, the state of instances in the cache might not match the state in the data store. This method is used to reload the state of the instance from the data store so that a subsequent commit is more likely to succeed.
Outside a transaction, this method will refresh nontransactional state.
refresh
in interface javax.jdo.PersistenceManager
pc
- the instance to refresh.public void refreshAll(java.lang.Object[] pcs)
refreshAll
in interface javax.jdo.PersistenceManager
pcs
- the array of instances to refresh.refresh(Object pc)
public void refreshAll(java.util.Collection pcs)
refreshAll
in interface javax.jdo.PersistenceManager
pcs
- the Collection of instances to refresh.refresh(Object pc)
public void refreshAll()
If called with an active transaction, all transactional instances will be refreshed. If called outside an active transaction, all nontransactional instances will be refreshed.
refreshAll
in interface javax.jdo.PersistenceManager
refresh(Object pc)
public void retrieve(java.lang.Object pc)
PersistenceManager
that the application intends to use the
instance, and its field values must be retrieved.
The PersistenceManager
might use policy information about the
class to retrieve associated instances.
retrieve
in interface javax.jdo.PersistenceManager
pc
- the instancepublic void retrieveAll(java.lang.Object[] pcs)
PersistenceManager
that the application intends to use the
instances, and all field values must be retrieved.
The PersistenceManager
might use policy information about the
class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancespublic void retrieveAll(java.lang.Object[] pcs, boolean DFGOnly)
PersistenceManager
that the application intends to use the
instances, and their field values should be retrieved. The fields
in the default fetch group must be retrieved, and the implementation
might retrieve more fields than the default fetch group.
The PersistenceManager
might use policy information about the
class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancesDFGOnly
- whether to retrieve only the default fetch group fieldspublic void retrieveAll(java.util.Collection pcs)
PersistenceManager
that the application intends to use the
instances, and all field values must be retrieved.
The PersistenceManager
might use policy information about the
class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancespublic void retrieveAll(java.util.Collection pcs, boolean DFGOnly)
PersistenceManager
that the application intends to use the
instances, and their field values should be retrieved. The fields
in the default fetch group must be retrieved, and the implementation
might retrieve more fields than the default fetch group.
The PersistenceManager
might use policy information about the
class to retrieve associated instances.
retrieveAll
in interface javax.jdo.PersistenceManager
pcs
- the instancesDFGOnly
- whether to retrieve only the default fetch group fieldspublic javax.jdo.PersistenceManagerFactory getPersistenceManagerFactory()
getPersistenceManagerFactory
in interface javax.jdo.PersistenceManager
public void setUserObject(java.lang.Object o)
setUserObject
in interface javax.jdo.PersistenceManager
o
- the user instance to be remembered by the PersistenceManagergetUserObject()
public java.lang.Object getUserObject()
getUserObject
in interface javax.jdo.PersistenceManager
setUserObject(java.lang.Object)
public java.util.Properties getProperties()
Standard properties include:
public void assertIsOpen()
assertIsOpen
in interface PersistenceManagerInternal
public StoreManager getStoreManager()
PersistenceManagerInternal
getStoreManager
in interface PersistenceManagerInternal
PersistenceManagerInternal.getStoreManager()
public java.lang.Object newSCOInstanceInternal(java.lang.Class type)
newSCOInstanceInternal
in interface PersistenceManagerInternal
type
- Class of the new SCO instance
(Class type)
public java.util.Collection newCollectionInstanceInternal(java.lang.Class type, java.lang.Class elementType, boolean allowNulls, java.lang.Integer initialSize, java.lang.Float loadFactor, java.util.Collection initialContents, java.util.Comparator comparator)
newCollectionInstanceInternal
in interface PersistenceManagerInternal
PersistenceManagerInternal.newCollectionInstanceInternal(Class type,
Class elementType, boolean allowNulls, Integer initialSize,
Float loadFactor, Collection initialContents, Comparator comparator)
public java.util.Map newMapInstanceInternal(java.lang.Class type, java.lang.Class keyType, java.lang.Class valueType, boolean allowNulls, java.lang.Integer initialSize, java.lang.Float loadFactor, java.util.Map initialContents, java.util.Comparator comparator)
newMapInstanceInternal
in interface PersistenceManagerInternal
PersistenceManagerInternal.newMapInstanceInternal(Class type,
Class keyType, Class valueType, boolean allowNulls, Integer initialSize,
Float loadFactor, Map initialContents, Comparator comparator)
public boolean isSupportedSCOType(java.lang.Class type)
PersistenceManagerInternal
isSupportedSCOType
in interface PersistenceManagerInternal
type
- Class type of the field.
(Class type)
public void register(StateManagerInternal sm, java.lang.Object oid, boolean transactional, boolean throwDuplicateException)
PersistenceManagerInternal
register
in interface PersistenceManagerInternal
sm
- instance of StateManagerInternal to be addedoid
- ObjectId of the corresponding persistence-capable instancetransactional
- true if the corresponding lifecycle state is transactionalthrowDuplicateException
- true if the exception should be thrown in case the same ObjectId
has been already registered.PersistenceManagerInternal.register(StateManagerInternal sm, Object oid,
boolean transactional, boolean throwDuplicateException)
public void registerTransient(StateManagerInternal sm)
PersistenceManagerInternal
registerTransient
in interface PersistenceManagerInternal
sm
- instance of StateManagerInternal to be addedPersistenceManagerInternal.registerTransient(StateManagerInternal sm)
public void deregister(java.lang.Object oid)
PersistenceManagerInternal
deregister
in interface PersistenceManagerInternal
oid
- ObjectId of the instance to be removed.PersistenceManagerInternal.deregister(Object oid)
public void deregisterTransient(StateManagerInternal sm)
PersistenceManagerInternal
deregisterTransient
in interface PersistenceManagerInternal
sm
- instance of StateManagerInternal to be removedPersistenceManagerInternal.deregisterTransient(StateManagerInternal sm)
public void replaceObjectId(java.lang.Object oldId, java.lang.Object newId)
PersistenceManagerInternal
replaceObjectId
in interface PersistenceManagerInternal
oldId
- previous value of ObjectId.newId
- new value of ObjectId.PersistenceManagerInternal.replaceObjectId(Object oldId, Object newId)
public void markAsFlushed(StateManagerInternal sm)
PersistenceManagerInternal
markAsFlushed
in interface PersistenceManagerInternal
sm
- StateManagerInternal instance that has been flushedPersistenceManagerInternal.markAsFlushed(StateManagerInternal sm)
public boolean insideCommit()
PersistenceManagerInternal
insideCommit
in interface PersistenceManagerInternal
PersistenceManagerInternal.insideCommit()
public void hereIsStateManager(StateManagerInternal sm, javax.jdo.spi.PersistenceCapable pc)
hereIsStateManager
in interface PersistenceManagerInternal
pc
- PC instancesm
- StateManager to savepublic StateManagerInternal getStateManager(java.lang.Object oid, java.lang.Class pcClass)
PersistenceManagerInternal
getStateManager
in interface PersistenceManagerInternal
oid
- the given Object Id.pcClass
- Class of a PersistenceCapable instance to be created
if this Object Id was not registered with this PersistenceManager.
PersistenceManagerInternal.getStateManager(java.lang.Object, java.lang.Class)
public StateManagerInternal findStateManager(javax.jdo.spi.PersistenceCapable pc)
findStateManager
in interface PersistenceManagerInternal
pc
- PC instance
public javax.jdo.PersistenceManager getCurrentWrapper()
getCurrentWrapper
in interface PersistenceManagerInternal
public java.util.Collection getInsertedInstances()
getInsertedInstances
in interface PersistenceManagerInternal
PersistenceManagerInternal.getInsertedInstances()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the reference object with which to compare.
true
if this object is the same as the obj
argument; false
otherwise.protected void pushCurrentWrapper(PersistenceManagerWrapper pmw)
protected void popCurrentWrapper(PersistenceManagerWrapper prev)
protected void setJTATransaction(java.lang.Object t)
protected void deregisterJTA()
protected void forceClose()
protected boolean verify(java.lang.String username, java.lang.String password)
protected void flushInstances()
protected void afterCompletion(int status)
status
- javax.transaction.Statuspublic void flush()
flush
in interface PersistenceManagerInternal
flushInstances()
protected void notifyStatusChange(boolean isActive)
protected void notifyOptimistic(boolean optimistic)
public java.lang.ClassLoader getContextClassLoaderPrivileged() throws java.lang.SecurityException
java.lang.SecurityException
- thrown by getContextClassLoader.public void assertReadAllowed()
assertReadAllowed
in interface PersistenceManagerInternal
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |