|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PersistenceStore
The persistence store allows access to the persistent
storage mechanism within the application.
PersistenceStore instances ARE NOT
thread safe. The best practices approach for using
the persistence store is to use
PersistenceStoreContainer.getStoreForThread()
any time the store is to be accessed.
Field Summary | |
static int |
LOCK_NO_LOCK
No lock at all aka the object is read only changes WILL NOT be persisted at checkPoints or commits. |
static int |
LOCK_PESSIMISTIC
changes to the object will be written to the database. |
static int |
LOCK_READ
changes to the object will be written to the database, in this case the lock will be automatically upgraded to the write lock on transaction |
Method Summary | |
void |
addEventListener(PersistenceStoreEventListener listener)
|
void |
close()
|
void |
deleteAll(Object query)
|
void |
deletePersistent(Object obj)
|
Collection |
getCollectionByQuery(Object query)
|
Collection |
getCollectionByQuery(Object query,
int lockLevel)
|
int |
getCount(Object query)
|
Collection |
getExtent(Class clazz)
|
Collection |
getExtent(Class clazz,
int lockLevel)
|
Iterator |
getIteratorByQuery(Object query)
|
Iterator |
getIteratorByQuery(Object query,
int lockLevel)
|
Object |
getObjectByIdentity(Object object)
|
Object |
getObjectByIdentity(Object object,
int lockLevel)
|
Object |
getObjectByQuery(Object query)
|
Object |
getObjectByQuery(Object query,
int lockLevel)
|
Transaction |
getTransaction()
getTransaction |
void |
invalidate(Object obj)
|
void |
invalidateAll()
|
void |
invalidateByQuery(Object query)
|
void |
invalidateExtent(Class clazz)
|
boolean |
isClosed()
isClosed |
void |
lockForWrite(Object obj)
|
void |
makePersistent(Object obj)
|
Filter |
newFilter()
|
Object |
newQuery(Class clazz,
Filter filter)
|
Field Detail |
public static final int LOCK_NO_LOCK
public static final int LOCK_READ
public static final int LOCK_PESSIMISTIC
Method Detail |
public void addEventListener(PersistenceStoreEventListener listener)
public void close()
public void deletePersistent(Object obj) throws LockFailedException
LockFailedException
public void deleteAll(Object query) throws LockFailedException
LockFailedException
public Collection getCollectionByQuery(Object query)
public Collection getCollectionByQuery(Object query, int lockLevel)
public Object getObjectByQuery(Object query)
public Object getObjectByQuery(Object query, int lockLevel)
public Object getObjectByIdentity(Object object) throws LockFailedException
LockFailedException
public Object getObjectByIdentity(Object object, int lockLevel) throws LockFailedException
LockFailedException
public int getCount(Object query)
public Iterator getIteratorByQuery(Object query)
public Iterator getIteratorByQuery(Object query, int lockLevel)
public boolean isClosed()
isClosed
indicates whether or not this PersistenceStore
instance has been closed. A closed store will generally
throw exceptions when any operation is performed upon it.
public Transaction getTransaction()
getTransaction
Returns the current Transaction
for thsis
PersistenceStore
instance. The transaction
will always be the same for the lifetime of the
PersistenceStore
instance.
Transaction
for this
PersistenceStore
public void invalidate(Object obj) throws LockFailedException
LockFailedException
public void invalidateAll() throws LockFailedException
LockFailedException
public void invalidateExtent(Class clazz) throws LockFailedException
LockFailedException
public void invalidateByQuery(Object query) throws LockFailedException
LockFailedException
public void lockForWrite(Object obj) throws LockFailedException
LockFailedException
public void makePersistent(Object obj) throws LockFailedException
LockFailedException
public Filter newFilter()
public Object newQuery(Class clazz, Filter filter)
public Collection getExtent(Class clazz)
public Collection getExtent(Class clazz, int lockLevel)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |