|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--arlut.csd.ganymede.DBField
|
+--arlut.csd.ganymede.BooleanDBField
BooleanDBField is a subclass of DBField
for the storage and handling of boolean
fields in the DBStore on the Ganymede
server.
The Ganymede client talks to BooleanDBFields through the
boolean_field RMI interface.
| Fields inherited from class arlut.csd.ganymede.DBField |
fieldcode, owner, value |
| Constructor Summary | |
|
BooleanDBField(DBObject owner,
BooleanDBField field)
Copy constructor. |
|
BooleanDBField(DBObject owner,
boolean value,
DBObjectBaseField definition)
Scalar value constructor. |
(package private) |
BooleanDBField(DBObject owner,
java.io.DataInput in,
DBObjectBaseField definition)
Receive constructor. |
(package private) |
BooleanDBField(DBObject owner,
DBObjectBaseField definition)
No-value constructor. |
|
BooleanDBField(DBObject owner,
java.util.Vector values,
DBObjectBaseField definition)
Vector value constructor. |
| Method Summary | |
java.lang.Object |
clone()
|
(package private) void |
emit(java.io.DataOutput out)
This method is responsible for writing out the contents of this field to an binary output stream. |
(package private) void |
emitXML(XMLDumpContext xmlOut)
This method is used when the database is being dumped, to write out this field to disk. |
java.lang.String |
falseLabel()
Returns the false label if this field is defined to have the true/false values associated with labels. |
DBField |
getCopy(DBObject newOwner)
This method is used to return a copy of this field, with the field's owner set to newOwner. |
java.lang.String |
getDiffString(DBField orig)
Returns a String representing the change in value between this field and orig. |
java.lang.String |
getEncodingString()
The normal boolean getValueString() encoding is adequate. |
java.lang.String |
getValueString()
This method returns a text encoded value for this BooleanDBField without checking permissions. |
boolean |
isDefined()
Returns true if this field has a value associated with it, or false if it is an unfilled 'placeholder'. |
boolean |
labeled()
Returns true if this field is defined to have the true/false values associated with labels. |
(package private) void |
receive(java.io.DataInput in,
DBObjectBaseField definition)
This method is responsible for reading in the contents of this field from an binary input stream. |
ReturnVal |
setUndefined(boolean local)
This method is used to mark a field as undefined when it is checked out for editing. |
java.lang.String |
trueLabel()
Returns the true label if this field is defined to have the true/false values associated with labels. |
boolean |
value()
|
boolean |
value(int index)
|
ReturnVal |
verifyNewValue(java.lang.Object o)
Overridable method to verify that an object submitted to this field has an appropriate value. |
boolean |
verifyTypeMatch(java.lang.Object o)
Overridable method to determine whether an Object submitted to this field is of an appropriate type. |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface arlut.csd.ganymede.db_field |
addElement, addElements, containsElement, deleteAllElements, deleteElement, deleteElement, deleteElements, getComment, getElement, getFieldInfo, getFieldTemplate, getID, getName, getType, getTypeDesc, getValue, getValues, isBuiltIn, isEditable, isEditInPlace, isVector, isVisible, setElement, setValue, size |
| Constructor Detail |
BooleanDBField(DBObject owner,
java.io.DataInput in,
DBObjectBaseField definition)
throws java.io.IOException
BooleanDBField(DBObject owner,
DBObjectBaseField definition)
No-value constructor. Allows the construction of a
'non-initialized' field, for use where the
DBObjectBase
definition indicates that a given field may be present,
but for which no value has been stored in the
DBStore.
Used to provide the client a template for 'creating' this field if so desired.
public BooleanDBField(DBObject owner,
BooleanDBField field)
public BooleanDBField(DBObject owner,
boolean value,
DBObjectBaseField definition)
public BooleanDBField(DBObject owner,
java.util.Vector values,
DBObjectBaseField definition)
| Method Detail |
public DBField getCopy(DBObject newOwner)
This method is used to return a copy of this field, with the field's owner set to newOwner.
getCopy in class DBFieldpublic java.lang.Object clone()
clone in class java.lang.Object
void emit(java.io.DataOutput out)
throws java.io.IOException
DBFieldThis method is responsible for writing out the contents of this field to an binary output stream. It is used in writing fields to the ganymede.db file and to the journal file.
This method only writes out the value contents of this field.
The DBObject
emit()
method is responsible for writing out the field identifier information
ahead of the field's contents.
emit in class DBField
void receive(java.io.DataInput in,
DBObjectBaseField definition)
throws java.io.IOException
DBFieldThis method is responsible for reading in the contents of this field from an binary input stream. It is used in reading fields from the ganymede.db file and from the journal file.
The code that calls receive() on this field is responsible for having read enough of the binary input stream's context to place the read cursor at the point in the file immediately after the field's id and type information has been read.
receive in class DBField
void emitXML(XMLDumpContext xmlOut)
throws java.io.IOException
This method is used when the database is being dumped, to write out this field to disk. It is mated with receiveXML().
emitXML in class DBFieldpublic boolean isDefined()
isDefined in interface db_fieldisDefined in class DBFielddb_fieldpublic ReturnVal setUndefined(boolean local)
This method is used to mark a field as undefined when it is
checked out for editing. Different subclasses of
DBField may
implement this in different ways, if simply setting the field's
value member to null is not appropriate. Any namespace values claimed
by the field will be released, and when the transaction is
committed, this field will be released.
setUndefined in class DBFieldpublic boolean value()
public boolean value(int index)
public java.lang.String getValueString()
This method returns a text encoded value for this BooleanDBField without checking permissions.
This method avoids checking permissions because it is used on
the server side only and because it is involved in the
getLabel()
logic for DBObject,
which is invoked from GanymedeSession's
getPerm()
method.
If this method checked permissions and the getPerm() method failed for some reason and tried to report the failure using object.getLabel(), as it does at present, the server could get into an infinite loop.
getValueString in interface db_fieldgetValueString in class DBFieldpublic java.lang.String getEncodingString()
getEncodingString in interface db_fieldgetEncodingString in class DBFieldarlut.csd.ganymede.DBFielddb_fieldpublic java.lang.String getDiffString(DBField orig)
Returns a String representing the change in value between this field and orig. This String is intended for logging and email, not for any sort of programmatic activity. The format of the generated string is not defined, but is intended to be suitable for inclusion in a log entry and in an email message.
If there is no change in the field, null will be returned.
getDiffString in class DBFieldpublic boolean labeled()
labeled in interface boolean_fieldboolean_fieldpublic java.lang.String trueLabel()
trueLabel in interface boolean_fieldboolean_fieldpublic java.lang.String falseLabel()
falseLabel in interface boolean_fieldboolean_fieldpublic boolean verifyTypeMatch(java.lang.Object o)
DBFieldverifyTypeMatch in class DBFieldpublic ReturnVal verifyNewValue(java.lang.Object o)
DBFieldverifyNewValue in class DBField
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||