|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.jdo.impl.fostore.AbstractRequest
org.apache.jdo.impl.fostore.AbstractFieldRequest
org.apache.jdo.impl.fostore.InsertRequest
org.apache.jdo.impl.fostore.VerifyRequest
Represents a request to verify that in-memory data is the same as that in the database.
| Field Summary | |
private java.util.BitSet |
fieldsToVerify
Fields to verify in database. |
protected FOStoreSchemaUID |
fsuid
uid corresponding to the same java.lang.Class that initializes jdoClass. |
protected JDOClass |
jdoClass
Class meta data of the object represented by the constructor's given state manager |
protected static int |
LENGTH_COOKIE
|
(package private) static org.apache.commons.logging.Log |
logger
Logger |
protected static I18NHelper |
msg
|
protected FOStoreOutput |
out
Stream to which request writes itself. |
protected FOStorePMF |
pmf
PersistenceManagerFactory via which request is being done. |
protected StateManagerInternal |
sm
The state manager which is the subject of this request. |
private boolean |
verified
Result of executing request. |
private boolean |
verifyFields
If true, verify values of object, otherwise verify only existence (and ignore remaining parameters). |
| Constructor Summary | |
(package private) |
VerifyRequest(StateManagerInternal sm,
Message m,
FOStorePMF pmf,
boolean verifyFields,
java.util.BitSet fieldsToVerify)
|
| Method Summary | |
void |
doRequest()
Does whatever it is that the kind of request does in actually making a request of the store. |
protected void |
doRequestBody()
Provides the information necessary for a VerifyRequest. |
boolean |
fetchBooleanField(int fieldNum)
|
byte |
fetchByteField(int fieldNum)
|
char |
fetchCharField(int fieldNum)
|
double |
fetchDoubleField(int fieldNum)
|
float |
fetchFloatField(int fieldNum)
|
int |
fetchIntField(int fieldNum)
|
long |
fetchLongField(int fieldNum)
|
java.lang.Object |
fetchObjectField(int fieldNum)
|
short |
fetchShortField(int fieldNum)
|
java.lang.String |
fetchStringField(int fieldNum)
|
protected RequestId |
getId()
|
protected OID |
getOID()
|
StateManagerInternal |
getStateManager()
Get the StateManager associated with this request, null if none. |
(package private) boolean |
getVerified()
|
void |
handleReply(Status status,
java.io.DataInput in,
int length)
Handles reply data from a VerifyReply. |
void |
storeBooleanField(int fieldNum,
boolean value)
Provides the means by which the value of a boolean field can be given by a StateManager to an object that needs the value. |
void |
storeByteField(int fieldNum,
byte value)
Provides the means by which the value of a byte field can be given by a StateManager to an object that needs the value. |
void |
storeCharField(int fieldNum,
char value)
Provides the means by which the value of a char field can be given by a StateManager to an object that needs the value. |
void |
storeDoubleField(int fieldNum,
double value)
Provides the means by which the value of a double field can be given by a StateManager to an object that needs the value. |
void |
storeFloatField(int fieldNum,
float value)
Provides the means by which the value of a field can be given by a StateManager to an object that needs the value. |
void |
storeIntField(int fieldNum,
int value)
Provides the means by which the value of a int field can be given by a StateManager to an object that needs the value. |
void |
storeLongField(int fieldNum,
long value)
Provides the means by which the value of a long field can be given by a StateManager to an object that needs the value. |
void |
storeObjectField(int fieldNum,
java.lang.Object value)
Provides the means by which the value of an Object field can be given by a StateManager to an object that needs the value. |
void |
storeShortField(int fieldNum,
short value)
Provides the means by which the value of a short field can be given by a StateManager to an object that needs the value. |
void |
storeStringField(int fieldNum,
java.lang.String value)
Provides the means by which the value of a String field can be given by a StateManager to an object that needs the value. |
protected int |
writeBlock(int[] fields,
boolean identifying)
Writes a data block, which consists of the values of the specified fields, plus the CLID's and corresponding class names of referenced objects. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private final boolean verifyFields
private final java.util.BitSet fieldsToVerify
private boolean verified
protected StateManagerInternal sm
protected final FOStorePMF pmf
protected final FOStoreOutput out
protected JDOClass jdoClass
protected FOStoreSchemaUID fsuid
protected static final I18NHelper msg
static final org.apache.commons.logging.Log logger
protected static final int LENGTH_COOKIE
| Constructor Detail |
VerifyRequest(StateManagerInternal sm,
Message m,
FOStorePMF pmf,
boolean verifyFields,
java.util.BitSet fieldsToVerify)
| Method Detail |
protected void doRequestBody()
throws java.io.IOException
oid: OID boolean: verifyFields data block (optional; only if verifyFields is true)
doRequestBody in class InsertRequestjava.io.IOExceptionAbstractRequest.doRequestBody()
public void handleReply(Status status,
java.io.DataInput in,
int length)
throws java.io.IOException
boolean: true => object exists in database, and (if verifyFields is true) values match those in request.
handleReply in interface RequesthandleReply in class InsertRequestjava.io.IOExceptionRequest.handleReply(org.apache.jdo.impl.fostore.Status, java.io.DataInput, int)boolean getVerified()
public void storeBooleanField(int fieldNum,
boolean value)
FieldManager
storeBooleanField in interface FieldManagerstoreBooleanField in class AbstractFieldRequestFieldManager.storeBooleanField(int fieldNum,
boolean value)
public void storeCharField(int fieldNum,
char value)
FieldManager
storeCharField in interface FieldManagerstoreCharField in class AbstractFieldRequestFieldManager.storeCharField(int fieldNum,
char value)
public void storeByteField(int fieldNum,
byte value)
FieldManager
storeByteField in interface FieldManagerstoreByteField in class AbstractFieldRequestFieldManager.storeByteField(int fieldNum,
byte value)
public void storeShortField(int fieldNum,
short value)
FieldManager
storeShortField in interface FieldManagerstoreShortField in class AbstractFieldRequestFieldManager.storeShortField(int fieldNum,
short value)
public void storeIntField(int fieldNum,
int value)
FieldManager
storeIntField in interface FieldManagerstoreIntField in class AbstractFieldRequestFieldManager.storeIntField(int fieldNum, int value)
public void storeLongField(int fieldNum,
long value)
FieldManager
storeLongField in interface FieldManagerstoreLongField in class AbstractFieldRequestFieldManager.storeLongField(int fieldNum,
long value)
public void storeFloatField(int fieldNum,
float value)
FieldManager
storeFloatField in interface FieldManagerstoreFloatField in class AbstractFieldRequestFieldManager.storeFloatField(int fieldNum,
float value)
public void storeDoubleField(int fieldNum,
double value)
FieldManager
storeDoubleField in interface FieldManagerstoreDoubleField in class AbstractFieldRequestFieldManager.storeDoubleField(int fieldNum,
double value)
public void storeStringField(int fieldNum,
java.lang.String value)
FieldManager
storeStringField in interface FieldManagerstoreStringField in class AbstractFieldRequestFieldManager.storeStringField(int fieldNum,
String value)
public void storeObjectField(int fieldNum,
java.lang.Object value)
FieldManager
storeObjectField in interface FieldManagerstoreObjectField in class AbstractFieldRequestFieldManager.storeObjectField(int fieldNum,
Object value)protected OID getOID()
protected int writeBlock(int[] fields,
boolean identifying)
throws java.io.IOException
fields - Field numbers of the fields to be writtenidentifying - If true, write before/flushed image fields,
otherwise write current fields.
java.io.IOExceptionpublic boolean fetchBooleanField(int fieldNum)
fetchBooleanField in interface FieldManagerFieldManager.fetchBooleanField(int fieldNum)public char fetchCharField(int fieldNum)
fetchCharField in interface FieldManagerFieldManager.fetchCharField(int fieldNum)public byte fetchByteField(int fieldNum)
fetchByteField in interface FieldManagerFieldManager.fetchByteField(int fieldNum)public short fetchShortField(int fieldNum)
fetchShortField in interface FieldManagerFieldManager.fetchShortField(int fieldNum)public int fetchIntField(int fieldNum)
fetchIntField in interface FieldManagerFieldManager.fetchIntField(int fieldNum)public long fetchLongField(int fieldNum)
fetchLongField in interface FieldManagerFieldManager.fetchLongField(int fieldNum)public float fetchFloatField(int fieldNum)
fetchFloatField in interface FieldManagerFieldManager.fetchFloatField(int fieldNum)public double fetchDoubleField(int fieldNum)
fetchDoubleField in interface FieldManagerFieldManager.fetchDoubleField(int fieldNum)public java.lang.String fetchStringField(int fieldNum)
fetchStringField in interface FieldManagerFieldManager.fetchStringField(int fieldNum)public java.lang.Object fetchObjectField(int fieldNum)
fetchObjectField in interface FieldManagerFieldManager.fetchObjectField(int fieldNum)protected RequestId getId()
public final void doRequest()
throws java.io.IOException
Request
doRequest in interface Requestjava.io.IOException - in case of errors with the stream.Request.doRequest()public StateManagerInternal getStateManager()
getStateManager in interface Request
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||