wt.fc
Class BasicObjectVector

java.lang.Object
  extended bywt.fc.BasicObjectVector
All Implemented Interfaces:
Externalizable, ObjectVectorIfc, ResultProcessor, Serializable
Direct Known Subclasses:
ObjectSetVector, ObjectVector

public abstract class BasicObjectVector
extends Object
implements ObjectVectorIfc, Externalizable

This class implments a basic vector of objects and is used to hold query results.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
protected static long R51_FORMAT_VERSION_UID
           
protected static long R7_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
protected  Vector typedVector
           
 
Constructor Summary
BasicObjectVector()
           
 
Method Summary
abstract  void addElement(Object anObj)
          

Supported API: false
 void append(ObjectVectorIfc oV)
          Append an object vector to this object vector.
 boolean contains(Object anObj)
          Test if the specified object is a component of this object vector.
 Enumeration elements()
          Return an Enumeration of the components of this object vector.
 Object firstElement()
          Return the first object in the object vector.
 Vector getVector()
          

Supported API: false
 boolean isEmpty()
          Test if the object vector has no object.
 Object lastElement()
          Return the last object in the object vector.
abstract  void makeNonPersistent()
          

Supported API: false
protected  void prepareForExternalization()
          Hook to allow object vectors to do any work prior to externalization.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(BasicObjectVector thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void removeAllElements()
          Remove all objects from the object vector and set the size to zero.
abstract  void removeElement(Object anObj)
          

Supported API: false
 int size()
          Return the number of objects in this Object Vector.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

typedVector

protected Vector typedVector

R51_FORMAT_VERSION_UID

protected static final long R51_FORMAT_VERSION_UID
See Also:
Constant Field Values

R7_FORMAT_VERSION_UID

protected static final long R7_FORMAT_VERSION_UID
See Also:
Constant Field Values
Constructor Detail

BasicObjectVector

public BasicObjectVector()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(BasicObjectVector thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

addElement

public abstract void addElement(Object anObj)


Supported API: false

Specified by:
addElement in interface ResultProcessor
Parameters:
anObj -

removeElement

public abstract void removeElement(Object anObj)


Supported API: false

Specified by:
removeElement in interface ObjectVectorIfc
Parameters:
anObj -

makeNonPersistent

public abstract void makeNonPersistent()


Supported API: false

Specified by:
makeNonPersistent in interface ObjectVectorIfc

getVector

public final Vector getVector()


Supported API: false

Specified by:
getVector in interface ObjectVectorIfc
Returns:
Vector

prepareForExternalization

protected void prepareForExternalization()
                                  throws WTException
Hook to allow object vectors to do any work prior to externalization. This is needed since QueryResults do a custom externalization of ObjectVectors.

Supported API: false

Throws:
WTException

size

public int size()
Return the number of objects in this Object Vector.

Supported API: false

Specified by:
size in interface ResultProcessor
Returns:
int

removeAllElements

public void removeAllElements()
Remove all objects from the object vector and set the size to zero.

Supported API: false

Specified by:
removeAllElements in interface ObjectVectorIfc

firstElement

public Object firstElement()
Return the first object in the object vector.

Supported API: false

Specified by:
firstElement in interface ObjectVectorIfc
Returns:
Object

lastElement

public Object lastElement()
Return the last object in the object vector.

Supported API: false

Specified by:
lastElement in interface ObjectVectorIfc
Returns:
Object

isEmpty

public boolean isEmpty()
Test if the object vector has no object.

Supported API: false

Specified by:
isEmpty in interface ObjectVectorIfc
Returns:
boolean

contains

public boolean contains(Object anObj)
Test if the specified object is a component of this object vector.

Supported API: false

Specified by:
contains in interface ObjectVectorIfc
Parameters:
anObj -
Returns:
boolean

append

public void append(ObjectVectorIfc oV)
Append an object vector to this object vector.

Supported API: false

Specified by:
append in interface ObjectVectorIfc
Parameters:
oV -

elements

public final Enumeration elements()
Return an Enumeration of the components of this object vector.

Supported API: false

Specified by:
elements in interface ObjectVectorIfc
Returns:
Enumeration