|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.conn.CachedStatement
public class CachedStatement
| Field Summary | |
|---|---|
private java.lang.Object |
identity
|
private GenericPreparedStatement |
ps
|
| Constructor Summary | |
|---|---|
CachedStatement()
|
|
| Method Summary | |
|---|---|
void |
clean(boolean forRemove)
Clean the object. |
void |
clearIdentity()
Put the object into the No Identity state. |
Cacheable |
createIdentity(java.lang.Object key,
java.lang.Object createParameter)
Create a new item. |
java.lang.Object |
getIdentity()
Get the identity of this object. |
GenericPreparedStatement |
getPreparedStatement()
Get the PreparedStatement that is associated with this Cacheable |
boolean |
isDirty()
Returns true of the object is dirty. |
Cacheable |
setIdentity(java.lang.Object key)
Set the identity of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private GenericPreparedStatement ps
private java.lang.Object identity
| Constructor Detail |
|---|
public CachedStatement()
| Method Detail |
|---|
public GenericPreparedStatement getPreparedStatement()
public void clean(boolean forRemove)
Cacheable
clean in interface CacheableCacheable.clean(boolean)public Cacheable setIdentity(java.lang.Object key)
Cacheable
Set the identity of the object to represent an item that already exists,
e.g. an existing container.
The object will be in the No Identity state,
ie. it will have just been created or clearIdentity() was just called.
The object must copy the information out of key, not just store a reference to key.
After this call the expression getIdentity().equals(key) must return true.
If the class of the object needs to change (e.g. to support a different format)
then the object should create a new object, call its initParameter() with the parameters
the original object was called with, set its identity and return a reference to it. The cache
manager will discard the reference to the old object.
If an exception is thrown the object must be left in the no-identity state.
MT - single thread required - Method must only be called be cache manager
and the cache manager will guarantee only one thread can be calling it.
setIdentity in interface CacheableCacheManager.find(java.lang.Object)
public Cacheable createIdentity(java.lang.Object key,
java.lang.Object createParameter)
Cacheable
Create a new item and set the identity of the object to represent it.
The object will be in the No Identity state,
ie. it will have just been created or clearIdentity() was just called.
The object must copy the information out of key, not just store a reference to key
if the key is not immutable.
After this call the expression getIdentity().equals(key) must return true.
If the class of the object needs to change (e.g. to support a different format)
then the object should create a new object, call its initParameter() with the parameters
the original object was called with, set its identity and return a reference to it. The cache
manager will discard the reference to the old object.
If an exception is thrown the object must be left in the no-identity state.
MT - single thread required - Method must only be called be cache manager
and the cache manager will guarantee only one thread can be calling it.
createIdentity in interface CacheableCacheable.createIdentity(java.lang.Object, java.lang.Object)public void clearIdentity()
Cacheable
clearIdentity in interface CacheableCacheable.clearIdentity()public java.lang.Object getIdentity()
Cacheable
getIdentity in interface CacheableCacheable.getIdentity()public boolean isDirty()
Cacheable
isDirty in interface CacheableCacheable.isDirty()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||