arlut.csd.ganymede
Interface db_field

All Superinterfaces:
java.rmi.Remote
All Known Subinterfaces:
boolean_field, date_field, float_field, invid_field, ip_field, num_field, pass_field, perm_field, string_field
All Known Implementing Classes:
BooleanDBField, DateDBField, DBField, FloatDBField, InvidDBField, IPDBField, NumericDBField, PasswordDBField, PermissionMatrixDBField, StringDBField

public interface db_field
extends java.rmi.Remote

Remote reference to a Ganymede DBField, the db_field is used by the client to make changes to a field when editing the db_object the field is contained within.


Method Summary
 arlut.csd.ganymede.ReturnVal addElement(java.lang.Object value)
          Adds an element to the end of this field, if a vector.
 arlut.csd.ganymede.ReturnVal addElements(java.util.Vector values)
          Adds a set of elements to the end of this field, if a vector.
 boolean containsElement(java.lang.Object value)
          Returns true if this field is a vector field and value is contained in this field.
 arlut.csd.ganymede.ReturnVal deleteAllElements()
          Removes all elements from this field, if a vector.
 arlut.csd.ganymede.ReturnVal deleteElement(int index)
          Deletes an element of this field, if a vector.
 arlut.csd.ganymede.ReturnVal deleteElement(java.lang.Object value)
          Deletes an element of this field, if a vector.
 arlut.csd.ganymede.ReturnVal deleteElements(java.util.Vector values)
          Removes a set of elements from this field, if a vector.
 java.lang.String getComment()
          Returns the description of this field from the schema.
 java.lang.Object getElement(int index)
          Returns the value of an element of this field, if a vector.
 java.lang.String getEncodingString()
          Returns a String representing a reversible encoding of the value of this field.
 arlut.csd.ganymede.FieldInfo getFieldInfo()
          Returns a summary of this field's current value and visibility/editability status.
 arlut.csd.ganymede.FieldTemplate getFieldTemplate()
          Returns this field type's static type and constraint information.
 short getID()
          Returns the field # for this field.
 java.lang.String getName()
          Returns the schema name for this field.
 short getType()
          Returns the type code for this field from the schema.
 java.lang.String getTypeDesc()
          Returns the description of this field's type from the schema.
 java.lang.Object getValue()
          Returns the value of this field, if a scalar.
 java.util.Vector getValues()
          Returns a Vector of the values of the elements in this field, if a vector.
 java.lang.String getValueString()
          Returns a String representing the value of this field.
 boolean isBuiltIn()
          Returns true if this field is a mandatory server field, one that will be present in all objects and which may not be removed from the server's schema.
 boolean isDefined()
          Returns true if this field has a value associated with it, or false if it is an unfilled 'placeholder'.
 boolean isEditable()
          Returns true if this field is editable, false otherwise.
 boolean isEditInPlace()
          Returns true if this field is edit in place.
 boolean isVector()
          Returns true if this field is a vector, false otherwise.
 boolean isVisible()
          Returns true if this field should be displayed in the current client context.
 arlut.csd.ganymede.ReturnVal setElement(int index, java.lang.Object value)
          Sets the value of an element of this field, if a vector.
 arlut.csd.ganymede.ReturnVal setValue(java.lang.Object value)
          Sets the value of this field, if a scalar.
 int size()
          Returns number of elements in vector if this is a vector field.
 

Method Detail

getFieldTemplate

public arlut.csd.ganymede.FieldTemplate getFieldTemplate()
                                                  throws java.rmi.RemoteException

Returns this field type's static type and constraint information.

java.rmi.RemoteException

getFieldInfo

public arlut.csd.ganymede.FieldInfo getFieldInfo()
                                          throws java.rmi.RemoteException

Returns a summary of this field's current value and visibility/editability status.

java.rmi.RemoteException

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Returns the schema name for this field.

java.rmi.RemoteException

isBuiltIn

public boolean isBuiltIn()
                  throws java.rmi.RemoteException
Returns true if this field is a mandatory server field, one that will be present in all objects and which may not be removed from the server's schema.

java.rmi.RemoteException

getID

public short getID()
            throws java.rmi.RemoteException
Returns the field # for this field.

java.rmi.RemoteException

getComment

public java.lang.String getComment()
                            throws java.rmi.RemoteException
Returns the description of this field from the schema.

java.rmi.RemoteException

getTypeDesc

public java.lang.String getTypeDesc()
                             throws java.rmi.RemoteException
Returns the description of this field's type from the schema.

java.rmi.RemoteException

getType

public short getType()
              throws java.rmi.RemoteException
Returns the type code for this field from the schema.

java.rmi.RemoteException

getValueString

public java.lang.String getValueString()
                                throws java.rmi.RemoteException
Returns a String representing the value of this field.

java.rmi.RemoteException

getEncodingString

public java.lang.String getEncodingString()
                                   throws java.rmi.RemoteException
Returns a String representing a reversible encoding of the value of this field. Each field type will have its own encoding, suitable for embedding in a DumpResult.

java.rmi.RemoteException

isDefined

public boolean isDefined()
                  throws java.rmi.RemoteException
Returns true if this field has a value associated with it, or false if it is an unfilled 'placeholder'.

java.rmi.RemoteException

isVector

public boolean isVector()
                 throws java.rmi.RemoteException
Returns true if this field is a vector, false otherwise.

java.rmi.RemoteException

isEditable

public boolean isEditable()
                   throws java.rmi.RemoteException

Returns true if this field is editable, false otherwise.

Note that DBField are only editable if they are contained in a subclass of DBEditObject.

java.rmi.RemoteException

isVisible

public boolean isVisible()
                  throws java.rmi.RemoteException
Returns true if this field should be displayed in the current client context.

java.rmi.RemoteException

isEditInPlace

public boolean isEditInPlace()
                      throws java.rmi.RemoteException
Returns true if this field is edit in place.

java.rmi.RemoteException

getValue

public java.lang.Object getValue()
                          throws java.rmi.RemoteException
Returns the value of this field, if a scalar. An exception will be thrown if this field is a vector.

java.rmi.RemoteException

setValue

public arlut.csd.ganymede.ReturnVal setValue(java.lang.Object value)
                                      throws java.rmi.RemoteException

Sets the value of this field, if a scalar.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog.

java.rmi.RemoteException

size

public int size()
         throws java.rmi.RemoteException
Returns number of elements in vector if this is a vector field. If this is not a vector field, will return 1. (Should throw exception?)

java.rmi.RemoteException

getValues

public java.util.Vector getValues()
                           throws java.rmi.RemoteException

Returns a Vector of the values of the elements in this field, if a vector.

This is only valid for vectors. If the field is a scalar, use getValue().

java.rmi.RemoteException

getElement

public java.lang.Object getElement(int index)
                            throws java.rmi.RemoteException

Returns the value of an element of this field, if a vector.

java.rmi.RemoteException

setElement

public arlut.csd.ganymede.ReturnVal setElement(int index,
                                               java.lang.Object value)
                                        throws java.rmi.RemoteException

Sets the value of an element of this field, if a vector.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog. A null result means the operation was carried out successfully and no information needed to be passed back about side-effects.

java.rmi.RemoteException

addElement

public arlut.csd.ganymede.ReturnVal addElement(java.lang.Object value)
                                        throws java.rmi.RemoteException

Adds an element to the end of this field, if a vector.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog.

The ReturnVal resulting from a successful addElement will encode an order to rescan this field.

java.rmi.RemoteException

addElements

public arlut.csd.ganymede.ReturnVal addElements(java.util.Vector values)
                                         throws java.rmi.RemoteException

Adds a set of elements to the end of this field, if a vector. Using addElements() to add a sequence of items to a field may be many times more efficient than calling addElement() repeatedly, as addElements() can do a single server checkpoint before attempting to add all the values.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog. If a success code is returned, all values were added. If failure is returned, no values were added.

The ReturnVal resulting from a successful addElements will encode an order to rescan this field.

java.rmi.RemoteException

deleteElement

public arlut.csd.ganymede.ReturnVal deleteElement(int index)
                                           throws java.rmi.RemoteException

Deletes an element of this field, if a vector.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog.

The ReturnVal resulting from a successful deleteElement will encode an order to rescan this field.

java.rmi.RemoteException

deleteElement

public arlut.csd.ganymede.ReturnVal deleteElement(java.lang.Object value)
                                           throws java.rmi.RemoteException

Deletes an element of this field, if a vector.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog.

The ReturnVal resulting from a successful deleteElement will encode an order to rescan this field.

java.rmi.RemoteException

deleteElements

public arlut.csd.ganymede.ReturnVal deleteElements(java.util.Vector values)
                                            throws java.rmi.RemoteException

Removes a set of elements from this field, if a vector. Using deleteElements() to remove a sequence of items from a field may be many times more efficient than calling deleteElement() repeatedly, as deleteElements() can do a single server checkpoint before attempting to remove all the values.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog. If a success code is returned, all values were deleted. If failure is returned, no values were deleted.

The ReturnVal resulting from a successful deleteElements will encode an order to rescan this field.

java.rmi.RemoteException

deleteAllElements

public arlut.csd.ganymede.ReturnVal deleteAllElements()
                                               throws java.rmi.RemoteException

Removes all elements from this field, if a vector.

The ReturnVal object returned encodes success or failure, and may optionally pass back a dialog. If a success code is returned, all elements in values was removed from this field. If a failure code is returned, no elements in values were removed.

The ReturnVal resulting from a successful deleteAllElements will encode an order to rescan this field.

java.rmi.RemoteException

containsElement

public boolean containsElement(java.lang.Object value)
                        throws java.rmi.RemoteException

Returns true if this field is a vector field and value is contained in this field.

This method always checks for read privileges.

Parameters:
value - The value to look for in this field
java.rmi.RemoteException