|
|||||||||||
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
This is an AbstractRequest that uses an exception-throwing implementation FieldManager to implement that interface. Subclasses can override particular FieldManager methods they need. E.g., a subclass might override only the storeABCField methods, knowing that its fetchABCField methods will never be invoked.
Field Summary | |
private AbstractFieldManager |
afm
|
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. |
Constructor Summary | |
(package private) |
AbstractFieldRequest(StateManagerInternal sm,
Message m,
FOStorePMF pmf)
|
Method Summary | |
void |
doRequest()
Does whatever it is that the kind of request does in actually making a request of the store. |
protected abstract void |
doRequestBody()
Subclasses must implement in this method the actual writing of their Request type-specific data. |
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()
|
StateManagerInternal |
getStateManager()
Get the StateManager associated with this request, null if none. |
void |
handleReply(Status status,
java.io.DataInput in,
int length)
Processes the results of the effect of the request in the store. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private AbstractFieldManager afm
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 |
AbstractFieldRequest(StateManagerInternal sm, Message m, FOStorePMF pmf)
Method Detail |
public void storeBooleanField(int fieldNum, boolean value)
FieldManager
storeBooleanField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Boolean that is the value of a particular field.FieldManager.storeBooleanField(int fieldNum,
boolean value)
public boolean fetchBooleanField(int fieldNum)
fetchBooleanField
in interface FieldManager
FieldManager.fetchBooleanField(int fieldNum)
public void storeCharField(int fieldNum, char value)
FieldManager
storeCharField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Char that is the value of a particular field.FieldManager.storeCharField(int fieldNum,
char value)
public char fetchCharField(int fieldNum)
fetchCharField
in interface FieldManager
FieldManager.fetchCharField(int fieldNum)
public void storeByteField(int fieldNum, byte value)
FieldManager
storeByteField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Byte that is the value of a particular field.FieldManager.storeByteField(int fieldNum,
byte value)
public byte fetchByteField(int fieldNum)
fetchByteField
in interface FieldManager
FieldManager.fetchByteField(int fieldNum)
public void storeShortField(int fieldNum, short value)
FieldManager
storeShortField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Short that is the value of a particular field.FieldManager.storeShortField(int fieldNum,
short value)
public short fetchShortField(int fieldNum)
fetchShortField
in interface FieldManager
FieldManager.fetchShortField(int fieldNum)
public void storeIntField(int fieldNum, int value)
FieldManager
storeIntField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Int that is the value of a particular field.FieldManager.storeIntField(int fieldNum, int value)
public int fetchIntField(int fieldNum)
fetchIntField
in interface FieldManager
FieldManager.fetchIntField(int fieldNum)
public void storeLongField(int fieldNum, long value)
FieldManager
storeLongField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Long that is the value of a particular field.FieldManager.storeLongField(int fieldNum,
long value)
public long fetchLongField(int fieldNum)
fetchLongField
in interface FieldManager
FieldManager.fetchLongField(int fieldNum)
public void storeFloatField(int fieldNum, float value)
FieldManager
storeFloatField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- that is the value of a particular field.FieldManager.storeFloatField(int fieldNum,
float value)
public float fetchFloatField(int fieldNum)
fetchFloatField
in interface FieldManager
FieldManager.fetchFloatField(int fieldNum)
public void storeDoubleField(int fieldNum, double value)
FieldManager
storeDoubleField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Double that is the value of a particular field.FieldManager.storeDoubleField(int fieldNum,
double value)
public double fetchDoubleField(int fieldNum)
fetchDoubleField
in interface FieldManager
FieldManager.fetchDoubleField(int fieldNum)
public void storeStringField(int fieldNum, java.lang.String value)
FieldManager
storeStringField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- String that is the value of a particular field.FieldManager.storeStringField(int fieldNum,
String value)
public java.lang.String fetchStringField(int fieldNum)
fetchStringField
in interface FieldManager
FieldManager.fetchStringField(int fieldNum)
public void storeObjectField(int fieldNum, java.lang.Object value)
FieldManager
storeObjectField
in interface FieldManager
fieldNum
- Field number of the field in the object whose value is
given.value
- Object that is the value of a particular field.FieldManager.storeObjectField(int fieldNum,
Object value)
public java.lang.Object fetchObjectField(int fieldNum)
fetchObjectField
in interface FieldManager
FieldManager.fetchObjectField(int fieldNum)
protected RequestId getId()
public final void doRequest() throws java.io.IOException
Request
doRequest
in interface Request
java.io.IOException
- in case of errors with the stream.Request.doRequest()
protected abstract void doRequestBody() throws java.io.IOException
java.io.IOException
public StateManagerInternal getStateManager()
getStateManager
in interface Request
public void handleReply(Status status, java.io.DataInput in, int length) throws java.io.IOException
in
- the input stream.length
- the length of data in the stream.status
- Indication as to the success, failure, etc. of the
request as handled by the store.
java.io.IOException
- if any problems reading the stream.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |