|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--arlut.csd.ganymede.DBObjectBase
The data dictionary and object store for a particular kind of
object in the DBStore on the
Ganymede server.
Each DBObjectBase object includes a set of
DBObjectBaseField objects, which
define the types and constraints on fields that may be present in objects
of this type. These field definitions are held in an
DBBaseFieldTable.
The actual DBObject's themselves are
contained in an optimized DBObjectTable
contained within this DBObjectBase.
In addition to holding name, type id, and category information for a
given object type, the DBObjectBase class may also contain a string classname
for a Java class to be dynamically loaded to manage the server's interactions
with objects of this type. Such a class name must refer to a subclass of the
DBEditObject class. If such a custom
class is defined for this object type, DBObjectBase will contain an
objectHook DBEditObject
instance whose methods will be consulted to customize a lot of the server's
functioning.
DBObjectBase also keeps track of DBReadLocks,
DBWriteLocks, and
DBDumpLocks, to manage
changes to be made to objects contained in this DBObjectBase.
DBObjectBase implements the Base RMI remote
interface, which is used by the client to determine type information for objects
of this type, as well as by the schema editor when the schema is being edited.
| Field Summary | |
(package private) Category |
category
what category is this object in? |
(package private) java.lang.Class |
classdef
Class definition for a DBEditObject subclass
dynamically loaded to manage operations on this DBObjectBase. |
(package private) java.lang.String |
classname
Fully qualified package and class name for a custom DBEditObject subclass
to be dynamically loaded to manage operations on this DBObjectBase. |
private static Compare |
comparator
|
(package private) DBLock |
currentLock
If this DBObjectBase is locked with an exclusive lock (a DBWriteLock),
this field will point to it. |
(package private) java.util.Vector |
customFields
Custom field dictionary sorted in display order. |
(package private) static boolean |
debug
|
(package private) static boolean |
debug2
More debugging. |
private java.util.Vector |
dumperList
Set of DBDumpLocks
pending on this DBObjectBase. |
private java.util.Vector |
dumpLockList
Collection of DBDumpLocks
that are locked on this DBObjectBase. |
(package private) DBSchemaEdit |
editor
Used to keep track of schema editing |
private boolean |
embedded
If true, this type of object is used as a target for an edit-in-place InvidDBField. |
(package private) DBBaseFieldTable |
fieldTable
field dictionary |
private java.util.Vector |
iterationSet
This Vector holds the current collection of DBObject objects in this
DBObjectBase, for enumeration access. |
(package private) short |
label_id
which field represents our label? |
(package private) java.util.Date |
lastChange
Timestamp for the last time this DBObjectBase was changed, used by GanymedeBuilderTasks
to determine whether a particular build sequence is necessary. |
(package private) int |
maxid
highest invid to date |
(package private) java.lang.String |
object_name
Name of this object type |
(package private) DBEditObject |
objectHook
Each DBObjectBase can have an instantiation of a custom DBEditObject subclass
to respond to a number of 'pseudostatic' method calls which customize
the Ganymede server's behavior when dealing with objects of this DBObjectBase's
type. |
(package private) DBObjectTable |
objectTable
objects in our objectBase |
private java.util.Vector |
readerList
Collection of DBReadLocks
that are locked on this DBObjectBase. |
(package private) DBStore |
store
The central Ganymede database object that this object base is contained within. |
(package private) java.util.Vector |
templateVector
Cached template vector |
(package private) int |
tmp_displayOrder
used only during loading of pre-2.0 format ganymede.db files |
(package private) short |
type_code
short type id code for this object type. |
(package private) boolean |
writeInProgress
Boolean flag monitoring whether or not this DBObjectBase is currently locked for writing. |
private java.util.Vector |
writerList
Set of DBWriteLocks
pending on this DBObjectBase. |
(package private) static boolean |
xmldebug
|
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf |
| Fields inherited from class java.rmi.server.RemoteServer |
log, logname |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
DBObjectBase(java.io.DataInput in,
DBStore store)
receive constructor. |
|
DBObjectBase(DBObjectBase original,
DBSchemaEdit editor)
copy constructor. |
|
DBObjectBase(DBStore store,
boolean embedded)
Generic constructor. |
|
DBObjectBase(DBStore store,
boolean embedded,
boolean createFields)
This constructor actually does all the work of initializing a new DBObjectBase. |
|
DBObjectBase(DBStore store,
short id,
boolean embedded,
DBSchemaEdit editor)
Creation constructor. |
|
| Method Summary | |
(package private) boolean |
addDumper(DBDumpLock dumper)
Add a DBDumpLock to this base's dumper waiting set. |
(package private) boolean |
addDumpLock(DBDumpLock dumper)
Add a DBDumpLock to this base's dumper lock list. |
(package private) void |
addFieldToEnd(DBObjectBaseField field)
This method is used to put a new user field into both the hashed field table and the customFields vector. |
(package private) void |
addFieldToStart(DBObjectBaseField field)
This method is used to put a new user field into both the hashed field table and the customFields vector. |
(package private) boolean |
addReader(DBReadLock reader)
Add a DBReadLock to this base's reader list. |
(package private) void |
addSystemField(DBObjectBaseField field)
This method is used to store a system field. |
(package private) DBObjectBaseField |
addSystemField(java.lang.String name,
short id,
short type)
This method is used to instantiate a mandatory system field in this object. |
(package private) boolean |
addWriter(DBWriteLock writer)
Add a DBWriteLock to this base's writer wait set. |
boolean |
canCreate(Session session)
Returns true if the current session is permitted to create an object of this type. |
boolean |
canInactivate()
Returns true if this object type can be inactivated |
(package private) void |
clearEditor()
Clear the editing flag. |
private void |
createBuiltIns(boolean embedded)
This method is used to instantiate the system default fields in a newly created or loaded DBObjectBase. |
(package private) DBEditObject |
createHook()
This method is used to create a DBEditObject subclass handle ( objectHook),
to allow various classes to make calls to overridden static
methods for DBEditObject subclasses. |
BaseField |
createNewField()
Creates a new base field, inserts it into the DBObjectBase field definitions hash, and returns a reference to it. |
(package private) DBEditObject |
createNewObject(DBEditSet editset)
Factory method to create a new DBEditObject of this type. |
(package private) DBEditObject |
createNewObject(DBEditSet editset,
Invid chosenSlot)
Factory method to create a new DBEditObject of this type. |
ReturnVal |
deleteField(java.lang.String fieldName)
This method is used to remove a field definition from the current schema. |
(package private) void |
emit(java.io.DataOutput out,
boolean dumpObjects)
|
(package private) void |
emitXML(XMLDumpContext xmlOut)
This method dumps schema information to an XML stream. |
boolean |
fieldInUse(DBObjectBaseField bF)
This method is used by the SchemaEditor to detect whether any objects are using a field definition. |
boolean |
fieldInUse(java.lang.String fieldName)
This method is used by the SchemaEditor to detect whether any objects are using a field definition. |
Category |
getCategory()
Get the parent Category for this object type. |
java.lang.Class |
getClassDef()
Returns the class definition for this object type |
java.lang.String |
getClassName()
Returns the name of the class managing this object type |
(package private) int |
getDumperSize()
Returns the size of the dumper wait set |
(package private) int |
getDumpLockListSize()
Returns the size of the dumper lock list |
BaseField |
getField(short id)
Returns the field definition for the field matching id, or null if no match found. |
BaseField |
getField(java.lang.String name)
Returns the field definition for the field matching name, or null if no match found. |
java.util.Vector |
getFields()
Returns all DBObjectBaseField
base field definitions for objects of this type, in random order. |
java.util.Vector |
getFields(boolean includeBuiltIns)
Returns DBObjectBaseField
base field definitions for objects of this type. |
java.util.Vector |
getFieldTemplateVector()
Returns a vector of field definition templates, in display order. |
(package private) java.util.Vector |
getIterationSet()
This method returns a vector containing references to all objects in this DBObjectBase at the time the vector reference is accessed. |
java.lang.Short |
getKey()
Returns the invid type id for this object definition as a Short, suitable for use in a hash. |
short |
getLabelField()
Returns the short type id for the field designated as this object's primary label field, if any. |
java.lang.String |
getLabelFieldName()
Returns the field name for the field designated as this object's primary label field. |
java.lang.String |
getName()
Returns the name of this object type. |
(package private) short |
getNextFieldID()
Get the next available field id for a new custom field. |
(package private) int |
getNextID()
allocate a new object id |
DBEditObject |
getObjectHook()
Helper method for DBEditObject subclasses |
java.lang.String |
getPath()
Returns the name and category path of this object type. |
(package private) int |
getReaderSize()
Returns the size of the reader list |
DBStore |
getStore()
Returns the DBStore containing this DBObjectBase. |
java.util.Date |
getTimeStamp()
Returns a Date object containing the time that any changes were committed to this DBObjectBase. |
short |
getTypeID()
Returns the invid type id for this object definition |
(package private) int |
getWriterSize()
Returns the size of the writer wait set |
(package private) boolean |
isDumperEmpty()
Returns true if this base's dumper wait set is empty. |
(package private) boolean |
isDumpLockListEmpty()
Returns true if this base's dumper lock list is empty. |
boolean |
isEmbedded()
This method returns true if this object base is for an embedded object. |
(package private) boolean |
isLocked()
Returns true if this DBObjectBase is currently locked for reading, writing, or dumping. |
(package private) boolean |
isReaderEmpty()
Returns true if this base's reader list is empty. |
boolean |
isRemovable()
This method indicates whether this base may be removed in the Schema Editor. |
(package private) boolean |
isWriterEmpty()
Returns true if this base's writer wait set is empty. |
ReturnVal |
moveFieldAfter(java.lang.String fieldName,
java.lang.String previousFieldName)
This method is used to adjust the ordering of a custom field in this Base. |
ReturnVal |
moveFieldBefore(java.lang.String fieldName,
java.lang.String nextFieldName)
This method is used to adjust the ordering of a custom field in this Base. |
void |
print(java.io.PrintWriter out,
java.lang.String indent)
Print a debugging summary of the custom type information encoded in this objectbase to a PrintWriter. |
void |
printHTML(java.io.PrintWriter out)
Print a debugging summary of the custom type information encoded in this objectbase to a PrintWriter. |
(package private) void |
receive(java.io.DataInput in)
|
(package private) void |
releaseId(int id)
releases an id if an object initially created by createDBObject is rejected due to its transaction being aborted |
void |
reloadCustomClass()
This method is used to force a reload of the custom object code for this object type. |
(package private) boolean |
removeDumper(DBDumpLock dumper)
Remove a DBDumpLock from this base's dumper waiting set. |
(package private) boolean |
removeDumpLock(DBDumpLock dumper)
Remove a DBDumpLock from this base's dumper lock list. |
private void |
removeField(DBObjectBaseField field)
This method is used to remove a field from this base's field database. |
(package private) boolean |
removeReader(DBReadLock reader)
Remove a DBReadLock from this base's reader list. |
(package private) boolean |
removeWriter(DBWriteLock writer)
Remove a DBWriteLock from this base's writer wait set. |
void |
setCategory(Category category)
Set the objectbase category. |
ReturnVal |
setClassName(java.lang.String newName)
Sets the fully qualified classname of the class managing this object type |
static void |
setDebug(boolean val)
|
ReturnVal |
setLabelField(short fieldID)
Choose what field will serve as this objectBase's label. |
ReturnVal |
setLabelField(java.lang.String fieldName)
Choose what field will serve as this objectBase's label. |
ReturnVal |
setName(java.lang.String newName)
Sets the name for this object type |
ReturnVal |
setTypeID(short objectId)
Sets the object ID code for this object type |
(package private) ReturnVal |
setXML(XMLItem root,
boolean resolveInvidLinks,
java.io.PrintWriter err)
This method is used to read the definition for this DBObjectBase from an XMLItem <objectdef> tree. |
java.lang.String |
toString()
Let's get our name here. |
private void |
updateBaseRefs()
This method is used to update base references in objects after this base has replaced an old version via the SchemaEditor. |
(package private) void |
updateIterationSet()
This method is used by the DBEditSet commit logic to replace this DBObjectBase's iterationSet with a new Vector with the current objectTable's values. |
(package private) void |
updateTimeStamp()
This method is used to allow objects in this base to notify us when their state changes. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toStub, writeObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
| Field Detail |
static boolean debug
static final boolean debug2
More debugging.
static final boolean xmldebug
private static Compare comparator
DBStore store
The central Ganymede database object that this object base is contained within.
java.lang.String object_name
Name of this object type
short type_code
short type id code for this object type. This number is
used as the type code
in Invids pointing to objects
of this type.
java.lang.String classname
Fully qualified package and class name for a custom
DBEditObject subclass
to be dynamically loaded to manage operations on this DBObjectBase.
java.lang.Class classdef
Class definition for a
DBEditObject subclass
dynamically loaded to manage operations on this DBObjectBase.
short label_id
Category category
private boolean embedded
If true, this type of object is used as a target for an
edit-in-place InvidDBField.
java.util.Vector customFields
DBObjectBaseFields.java.util.Vector templateVector
Cached template vector
DBBaseFieldTable fieldTable
DBObjectTable objectTable
int maxid
int tmp_displayOrder
java.util.Date lastChange
Timestamp for the last time this DBObjectBase was
changed, used by
GanymedeBuilderTasks
to determine whether a particular build sequence is necessary.
DBLock currentLock
If this DBObjectBase is locked with an exclusive lock
(a DBWriteLock),
this field will point to it.
This field is not currently used for anything in particular in the lock logic, it is here strictly for informational/debugging purposes.
private java.util.Vector writerList
Set of DBWriteLocks
pending on this DBObjectBase. DBWriteLocks will add themselves
to the writerList upon entering establish(). If writerList is
not empty, no new DBReadLocks will be allowed to add to add themselve to the readerList
in this DBObjectBase. DBDumpLocks
don't check the writerList, and will add themselves to the dumperList
as needed, which will block any further writers from queuing up
in the list.
When a DBWriteLock is locked onto this base, it is taken out of writerList, writeInProgress is set to true, and currentLock is set to point to the DBWriteLock that has exclusive access.
Note that there is no guarantee that DBWriteLocks will be granted access to any given DBObjectBase in the order that their threads entered the establish() method, as different DBWriteLocks may be attempting to establish() on differing sets of DBObjectBases. There is not in fact any attempt in the DBWriteLock establish() method to ensure that writers are given the lock on a DBObjectBase in their writerList ordering. The establish() methods may establish() any writer in any order, depending on the server's threading behavior.
private java.util.Vector readerList
Collection of DBReadLocks
that are locked on this DBObjectBase.
private java.util.Vector dumperList
Set of DBDumpLocks
pending on this DBObjectBase. DBDumpLocks will add themselves to
the dumperList upon entering establish(). If dumperList is not
empty, no new DBWriteLocks
will be allowed to add themselves to the writerList in this
DBObjectBase.
Note that there is no guarantee that DBDumpLocks will be granted access to any given DBObjectBase in the order that their threads entered the establish() method, as different DBDumpLocks may be attempting to establish() on differing sets of DBObjectBases. There is not in fact any attempt in the DBDumpLock establish() method to ensure that writers are given the lock on a DBObjectBase in their dumperList ordering. The establish() methods may establish() any dumper in any order, depending on the server's threading behavior.
private java.util.Vector dumpLockList
Collection of DBDumpLocks
that are locked on this DBObjectBase.
boolean writeInProgress
Boolean flag monitoring whether or not this DBObjectBase is currently locked for writing.
DBSchemaEdit editor
private java.util.Vector iterationSet
This Vector holds the current collection of DBObject objects in this
DBObjectBase, for enumeration access. The GanymedeSession query
logic iterates over this Vector so that querying on single bases
can proceed while commits are under way.
This is practicable because assignment to this variable is an inherently atomic event in the Java spec, so we just wait to assign a new Vector here until we have a new one composed. We just have to depend on all code that accesses this vector to grab its own reference to this vector and then not modify it, and to drop reference to it when the iteration is complete.
DBEditObject objectHook
Each DBObjectBase can have an instantiation of a custom
DBEditObject subclass
to respond to a number of 'pseudostatic' method calls which customize
the Ganymede server's behavior when dealing with objects of this DBObjectBase's
type. The DBObjectBase
createHook() method
is responsible for loading the custom DBEditObject subclass
(classdef) from
the classname
specified in the ganymede.db schema section.
objectHook should never be null while the server is in operation. If the Ganymede schema definition data in the ganymede.db file does not specify a special class for this object type's objectHook, DBObjectBase should have an instance of the base DBEditObject class here.
See the Ganymede DBEditObject subclassing/customization guide for a lot more details on the use of DBEditObjects as objectHooks.
| Constructor Detail |
public DBObjectBase(DBStore store,
boolean embedded)
throws java.rmi.RemoteException
Generic constructor.
store - The DBStore database this DBObjectBase is being created for.embedded - If true, objects of this DBObjectBase type will not
be top-level objects, but rather will be embedded using edit-in-place
InvidDBFields.
public DBObjectBase(DBStore store,
boolean embedded,
boolean createFields)
throws java.rmi.RemoteException
This constructor actually does all the work of initializing a new DBObjectBase. All other constructors for DBObjectBase will eventually call this constructor.
store - The DBStore database this DBObjectBase is being created for.embedded - If true, objects of this DBObjectBase type will not
be top-level objects, but rather will be embedded using edit-in-place
InvidDBFields.createFields - If true, the standard fields required by the server
for its own operations will be created as part of DBObjectBase creation. This
should be false if this DBObjectBase is being created in the process of loading
data from a pre-existing database which will presumably already have all
essential fields defined.
public DBObjectBase(DBStore store,
short id,
boolean embedded,
DBSchemaEdit editor)
throws java.rmi.RemoteException
Creation constructor. Used when the schema editor interface is used to create a new DBObjectBase.
public DBObjectBase(java.io.DataInput in,
DBStore store)
throws java.io.IOException,
java.rmi.RemoteException
receive constructor. Used to initialize this DBObjectBase from disk and load the objects of this type in from the standing store.
in - Input stream to read this object base from.store - The Ganymede database object we are loading into.
public DBObjectBase(DBObjectBase original,
DBSchemaEdit editor)
throws java.rmi.RemoteException
copy constructor. Used to create a copy that we can play with for schema editing.
| Method Detail |
public static void setDebug(boolean val)
void emit(java.io.DataOutput out,
boolean dumpObjects)
throws java.io.IOException
void receive(java.io.DataInput in)
throws java.io.IOException
private void createBuiltIns(boolean embedded)
This method is used to instantiate the system default fields in a newly created or loaded DBObjectBase.
void emitXML(XMLDumpContext xmlOut)
throws java.io.IOException
This method dumps schema information to an XML stream.
ReturnVal setXML(XMLItem root,
boolean resolveInvidLinks,
java.io.PrintWriter err)
This method is used to read the definition for this DBObjectBase from an XMLItem <objectdef> tree.
public boolean isEmbedded()
This method returns true if this object base is for an embedded object. Embedded objects do not have their own expiration and removal dates, do not have history trails, and can be only owned by a single object, not by a list of administrators.
isEmbedded in interface Basepublic boolean isRemovable()
This method indicates whether this base may be removed in the Schema Editor.
We don't allow removal of built-in Bases that the server depends on for its operation, such as permissions, notification, and logging object types.
isRemovable in interface BaseBasepublic void reloadCustomClass()
This method is used to force a reload of the custom object code for this object type.
DBEditObject createHook()
throws java.rmi.RemoteException
This method is used to create a DBEditObject subclass handle
(objectHook),
to allow various classes to make calls to overridden static
methods for DBEditObject subclasses.
DBEditObject createNewObject(DBEditSet editset)
Factory method to create a new DBEditObject of this type. The created DBEditObject will be connected to the editset, and will not be integrated into the DBStore until the editset is committed.
IMPORTANT NOTE: This method *must not* be public! All DBEditObject customization classes should go through DBSession.createDBObject() to create new objects.
editset - The transaction this object is to be created in
DBEditObject createNewObject(DBEditSet editset,
Invid chosenSlot)
Factory method to create a new DBEditObject of this type. The created DBEditObject will be connected to the editset, and will not be integrated into the DBStore until the editset is committed.
IMPORTANT NOTE: This method *must not* be public! All DBEditObject customization classes should go through DBSession.createDBObject() to create new objects.
editset - The transaction this object is to be created inchosenSlot - If this is non-null, the object will be assigned
the given invid, if availableint getNextID()
void releaseId(int id)
releases an id if an object initially created by createDBObject is rejected due to its transaction being aborted
note that we aren't being real fancy here.. if this doesn't work, it doesn't work.. we have 2 billion slots in this object base after all..
public void printHTML(java.io.PrintWriter out)
Print a debugging summary of the custom type information encoded in this objectbase to a PrintWriter.
out - PrintWriter to print to.
public void print(java.io.PrintWriter out,
java.lang.String indent)
Print a debugging summary of the custom type information encoded in this objectbase to a PrintWriter.
out - PrintWriter to print to.public DBStore getStore()
Returns the DBStore containing this DBObjectBase.
public java.lang.String getName()
Returns the name of this object type. Guaranteed to be unique in the Ganymede server.
getName in interface BaseBasepublic java.lang.String getPath()
getPath in interface Basepublic ReturnVal setName(java.lang.String newName)
Sets the name for this object type
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setName in interface BaseBasepublic java.lang.String getClassName()
Returns the name of the class managing this object type
getClassName in interface BaseBasepublic ReturnVal setClassName(java.lang.String newName)
Sets the fully qualified classname of the class managing this object type
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setClassName in interface BaseBasepublic java.lang.Class getClassDef()
Returns the class definition for this object type
public ReturnVal moveFieldAfter(java.lang.String fieldName,
java.lang.String previousFieldName)
This method is used to adjust the ordering of a custom field in this Base.
moveFieldAfter in interface BasefieldName - The name of the field to movepreviousFieldName - The name of the field that fieldName is going to
be put after, or null if fieldName is to be the first field displayed
in this object type.
public ReturnVal moveFieldBefore(java.lang.String fieldName,
java.lang.String nextFieldName)
This method is used to adjust the ordering of a custom field in this Base.
moveFieldBefore in interface BasefieldName - The name of the field to movenextFieldName - The name of the field that fieldName is going to
be put before, or null if fieldName is to be the last field displayed
in this object type.public boolean canCreate(Session session)
Returns true if the current session is permitted to create an object of this type.
canCreate in interface BaseBasepublic boolean canInactivate()
Returns true if this object type can be inactivated
canInactivate in interface BaseBasepublic short getTypeID()
Returns the invid type id for this object definition
getTypeID in interface BaseBasepublic ReturnVal setTypeID(short objectId)
Sets the object ID code for this object type
public short getLabelField()
Returns the short type id for the field designated as this object's primary label field, if any. Objects do not need to have a primary label field designated if labels for this object type are dynamically generated.
getLabelField in interface BaseBasepublic java.lang.String getLabelFieldName()
Returns the field name for the field designated as this object's primary label field. null is returned if no label has been designated.
getLabelFieldName in interface BaseBasepublic java.lang.Short getKey()
Returns the invid type id for this object definition as a Short, suitable for use in a hash.
public java.util.Vector getFields()
Returns all DBObjectBaseField
base field definitions for objects of this type, in random order.
getFields in interface BaseBasepublic java.util.Vector getFields(boolean includeBuiltIns)
Returns DBObjectBaseField
base field definitions for objects of this type.
If includeBuiltIns is false, the fields returned will be the custom fields defined for this object type, and they will be returned in display order. If includeBuiltIns is true, the built-in fields will be appended to the Vector after the custom types, in random order.
getFields in interface BaseBasepublic BaseField getField(short id)
Returns the field definition for the field matching id, or null if no match found.
getField in interface BaseBaseField,
Basepublic BaseField getField(java.lang.String name)
Returns the field definition for the field matching name, or null if no match found.
getField in interface BaseBaseField,
Basepublic ReturnVal setLabelField(java.lang.String fieldName)
Choose what field will serve as this objectBase's label. A fieldName
parameter of null will cause the object's label field to be undefined,
in which case the object will have to generate its own label using the
getLabelHook()
method.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setLabelField in interface BaseBasepublic ReturnVal setLabelField(short fieldID)
Choose what field will serve as this objectBase's label. A fieldID
parameter of -1 will cause the object's label field to be undefined,
in which case the object will have to generate its own label using the
getLabelHook()
method.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setLabelField in interface BaseBasepublic Category getCategory()
Get the parent Category for this object type. This is used by the Ganymede client and schema editor to present object types in a hierarchical tree.
getCategory in interface BaseBase,
CategoryNodepublic void setCategory(Category category)
Set the objectbase category. This operation only registers the category in this base, it doesn't register the base in the category. The proper way to add this base to a Category is to call addNode(Base, nodeBefore) on the appropriate Category object. That addNode() operation will call setCategory() here.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
setCategory in interface CategoryNodeCategoryNodepublic BaseField createNewField()
Creates a new base field, inserts it into the DBObjectBase field definitions hash, and returns a reference to it.
This method is only valid when the Base reference is obtained
from a SchemaEdit reference
by the Ganymede schema editor.
createNewField in interface BaseBasepublic ReturnVal deleteField(java.lang.String fieldName)
This method is used to remove a field definition from the current schema.
Of course, this removal will only take effect if the schema editor commits.
deleteField in interface BaseBasepublic boolean fieldInUse(DBObjectBaseField bF)
This method is used by the SchemaEditor to detect whether any objects are using a field definition.
Server-side only.
public boolean fieldInUse(java.lang.String fieldName)
This method is used by the SchemaEditor to detect whether any objects are using a field definition.
fieldInUse in interface BaseBasepublic DBEditObject getObjectHook()
Helper method for DBEditObject subclasses
short getNextFieldID()
Get the next available field id for a new custom field.
void clearEditor()
Clear the editing flag. This disables the DBObjectBase set methods on this ObjectBase and all dependent field definitions. This method also updates the FieldTemplate for each field in this object base.
void updateIterationSet()
This method is used by the DBEditSet commit logic to replace this DBObjectBase's iterationSet with a new Vector with the current objectTable's values. This method should only be called within the context of a DBWriteLock being established on this DBObjectBase, in the DBEditSet.commitTransaction() logic.
java.util.Vector getIterationSet()
This method returns a vector containing references to all objects in this DBObjectBase at the time the vector reference is accessed. The vector returned *must not* be modified by the caller, or else other threads iterating on that copy of the vector will be disrupted.
private void updateBaseRefs()
This method is used to update base references in objects after this base has replaced an old version via the SchemaEditor.
void updateTimeStamp()
This method is used to allow objects in this base to notify us when
their state changes. It is called from the
DBEditSet commit() method.
We use this method to be able to determine the last time anything in this DBObjectBase changed when making decisions as to what needs to be done in BuilderTasks.
public java.util.Date getTimeStamp()
Returns a Date object containing the time that any changes were committed to this DBObjectBase.
boolean isLocked()
Returns true if this DBObjectBase is currently locked for reading, writing, or dumping.
boolean addWriter(DBWriteLock writer)
Add a DBWriteLock to this base's writer wait set.
boolean removeWriter(DBWriteLock writer)
Remove a DBWriteLock from this base's writer wait set.
boolean isWriterEmpty()
Returns true if this base's writer wait set is empty.
int getWriterSize()
Returns the size of the writer wait set
boolean addReader(DBReadLock reader)
Add a DBReadLock to this base's reader list.
boolean removeReader(DBReadLock reader)
Remove a DBReadLock from this base's reader list.
boolean isReaderEmpty()
Returns true if this base's reader list is empty.
int getReaderSize()
Returns the size of the reader list
boolean addDumper(DBDumpLock dumper)
Add a DBDumpLock to this base's dumper waiting set.
boolean removeDumper(DBDumpLock dumper)
Remove a DBDumpLock from this base's dumper waiting set.
boolean isDumperEmpty()
Returns true if this base's dumper wait set is empty.
int getDumperSize()
Returns the size of the dumper wait set
boolean addDumpLock(DBDumpLock dumper)
Add a DBDumpLock to this base's dumper lock list.
boolean removeDumpLock(DBDumpLock dumper)
Remove a DBDumpLock from this base's dumper lock list.
boolean isDumpLockListEmpty()
Returns true if this base's dumper lock list is empty.
int getDumpLockListSize()
Returns the size of the dumper lock list
public java.lang.String toString()
Let's get our name here.
toString in class java.rmi.server.RemoteObjectpublic java.util.Vector getFieldTemplateVector()
Returns a vector of field definition templates, in display order.
FieldTemplate,
Sessionvoid addFieldToStart(DBObjectBaseField field)
This method is used to put a new user field into both the hashed field table and the customFields vector.
void addFieldToEnd(DBObjectBaseField field)
This method is used to put a new user field into both the hashed field table and the customFields vector.
DBObjectBaseField addSystemField(java.lang.String name,
short id,
short type)
This method is used to instantiate a mandatory system field in this object.
void addSystemField(DBObjectBaseField field)
This method is used to store a system field.
private void removeField(DBObjectBaseField field)
This method is used to remove a field from this base's field database.
This method is not intended for access from outside this class.. use deleteField() for that.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||