arlut.csd.ganymede
Interface db_object

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
DBObject

public interface db_object
extends java.rmi.Remote

Remote reference to a Ganymede DBObject or DBEditObject, the db_object is used by the client to get information about and/or make changes to a object held in the Ganymede server.


Method Summary
 boolean canInactivate()
          Returns true if inactivate() is a valid operation on checked-out objects of this type.
 java.util.Date getExpirationDate()
          Returns the date that this object is to be automatically inactivated if it has an expiration date set.
 db_field getField(short id)
          Get access to a field from this object.
 db_field getField(java.lang.String fieldname)
          Get access to a field from this object, by name.
 short getFieldId(java.lang.String fieldname)
          This method returns the short field id code for the named field, if the field is present in this object, or -1 if the field could not be found.
 java.util.Vector getFieldInfoVector()
          Returns a vector of custom field information records, in display order.
 java.lang.String getFieldName(short id)
          Returns the name of a field from this object.
 java.lang.Object getFieldValue(short fieldID)
          Shortcut method to get a scalar field's value.
 java.util.Vector getFieldValues(short fieldID)
          Shortcut method to get a vector field's values.
 int getID()
          Returns the numeric id of the object in the objectBase
 Invid getInvid()
          Returns the unique object id (invid) of this object
 java.lang.String getLabel()
          Returns the primary label of this object.
 db_field getLabelField()
          Get access to the field that serves as this object's label
 short getLabelFieldID()
          Get access to the field id for the field that serves as this object's label, if any.
 java.util.Date getRemovalDate()
          Returns the date that this object is to go through final removal if it has been inactivated.
 java.lang.StringBuffer getSummaryDescription()
          This method is used to provide a summary description of this object, including a listing of all non-null fields and their contents.
 short getTypeID()
          Returns the base id of the object's type
 java.lang.String getTypeName()
          Returns the name of the object's type
 boolean isEmbedded()
          Returns true if this object is an embedded type
 boolean isInactivated()
          Returns true if this object has been inactivated and is pending deletion.
 boolean isValid()
          Returns true if this object has all its required fields defined
 db_field[] listFields()
          Get list of all db_fields contained in this object, in unsorted order.
 ReturnVal setFieldValue(short fieldID, java.lang.Object value)
          Shortcut method to set a field's value.
 boolean willExpire()
          Returns true if this object has an expiration date set.
 

Method Detail

getID

public int getID()
          throws java.rmi.RemoteException

Returns the numeric id of the object in the objectBase


getTypeID

public short getTypeID()
                throws java.rmi.RemoteException

Returns the base id of the object's type


getTypeName

public java.lang.String getTypeName()
                             throws java.rmi.RemoteException

Returns the name of the object's type


getInvid

public Invid getInvid()
               throws java.rmi.RemoteException

Returns the unique object id (invid) of this object


getFieldInfoVector

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

Returns a vector of custom field information records, in display order.

See Also:
FieldInfo

getField

public db_field getField(short id)
                  throws java.rmi.RemoteException

Get access to a field from this object.

Parameters:
id - The field code for the desired field of this object.

getField

public db_field getField(java.lang.String fieldname)
                  throws java.rmi.RemoteException

Get access to a field from this object, by name.

Parameters:
fieldname - The fieldname for the desired field of this object

getFieldName

public java.lang.String getFieldName(short id)
                              throws java.rmi.RemoteException

Returns the name of a field from this object.

Parameters:
id - The field code for the desired field of this object.

getFieldId

public short getFieldId(java.lang.String fieldname)
                 throws java.rmi.RemoteException

This method returns the short field id code for the named field, if the field is present in this object, or -1 if the field could not be found.


getLabelField

public db_field getLabelField()
                       throws java.rmi.RemoteException

Get access to the field that serves as this object's label

Not all objects use simple field values as their labels. If an object has a calculated label, this method will return null.


getLabelFieldID

public short getLabelFieldID()
                      throws java.rmi.RemoteException

Get access to the field id for the field that serves as this object's label, if any.

Not all objects use simple field values as their labels. If an object has a calculated label, this method will return -1.


listFields

public db_field[] listFields()
                      throws java.rmi.RemoteException

Get list of all db_fields contained in this object, in unsorted order.


getLabel

public java.lang.String getLabel()
                          throws java.rmi.RemoteException

Returns the primary label of this object.


isEmbedded

public boolean isEmbedded()
                   throws java.rmi.RemoteException

Returns true if this object is an embedded type


canInactivate

public boolean canInactivate()
                      throws java.rmi.RemoteException

Returns true if inactivate() is a valid operation on checked-out objects of this type.


isInactivated

public boolean isInactivated()
                      throws java.rmi.RemoteException

Returns true if this object has been inactivated and is pending deletion.


isValid

public boolean isValid()
                throws java.rmi.RemoteException

Returns true if this object has all its required fields defined


getRemovalDate

public java.util.Date getRemovalDate()
                              throws java.rmi.RemoteException

Returns the date that this object is to go through final removal if it has been inactivated.


willExpire

public boolean willExpire()
                   throws java.rmi.RemoteException

Returns true if this object has an expiration date set.


getExpirationDate

public java.util.Date getExpirationDate()
                                 throws java.rmi.RemoteException

Returns the date that this object is to be automatically inactivated if it has an expiration date set.


setFieldValue

public ReturnVal setFieldValue(short fieldID,
                               java.lang.Object value)
                        throws java.rmi.RemoteException

Shortcut method to set a field's value. Using this method saves a roundtrip to the server, which is particularly useful in database loading.


getFieldValue

public java.lang.Object getFieldValue(short fieldID)
                               throws java.rmi.RemoteException

Shortcut method to get a scalar field's value. Using this method saves a roundtrip to the server.


getFieldValues

public java.util.Vector getFieldValues(short fieldID)
                                throws java.rmi.RemoteException

Shortcut method to get a vector field's values. Using this method saves a roundtrip to the server.


getSummaryDescription

public java.lang.StringBuffer getSummaryDescription()
                                             throws java.rmi.RemoteException

This method is used to provide a summary description of this object, including a listing of all non-null fields and their contents. This method is remotely callable by the client, and so will only reveal fields that the user has permission to view.