com.objectwave.persist.collectionAdapters
Class VectorCollectionAdapter

java.lang.Object
  |
  +--com.objectwave.persist.collectionAdapters.VectorCollectionAdapter
All Implemented Interfaces:
CollectionAdapter, java.io.Serializable

public class VectorCollectionAdapter
extends java.lang.Object
implements CollectionAdapter

Collection Adapters were introduced to support multiple collection types within the JavaGrinder Framework.

Version:
$Id: VectorCollectionAdapter.java,v 2.0 2001/06/11 16:00:04 dave_hoag Exp $
Author:
dhoag
See Also:
Serialized Form

Constructor Summary
VectorCollectionAdapter()
           
 
Method Summary
 void addElement(java.lang.Object obj)
          Add the object to this collection.
 java.lang.Object firstElement()
           
 java.lang.Object getCollectionObject()
          Get the actual collection object.
 CollectionAdapter getNewInstance()
          Invoked when a new instance is needed.
 void preQuery(SQLQuery q)
          An entry point to tweak the query before issuing the find.
 void setDataObject(java.util.Vector v)
          Sets the DataObject attribute of the VectorCollectionAdapter object
 int size()
          The number of elements in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorCollectionAdapter

public VectorCollectionAdapter()
Method Detail

setDataObject

public void setDataObject(java.util.Vector v)
Sets the DataObject attribute of the VectorCollectionAdapter object

Parameters:
v - The new DataObject value

getCollectionObject

public java.lang.Object getCollectionObject()
Get the actual collection object.

Specified by:
getCollectionObject in interface CollectionAdapter
Returns:
java.util.Vector

getNewInstance

public CollectionAdapter getNewInstance()
Description copied from interface: CollectionAdapter
Invoked when a new instance is needed. This could simply return 'this'. This is called when creating the SQLQuery that will realize a collection attribute. Normally, this method is not invoked, only when a CollectionAdapter is associated with an AttributeTypeColumn.

Specified by:
getNewInstance in interface CollectionAdapter
Returns:
The NewInstance value

firstElement

public java.lang.Object firstElement()
Specified by:
firstElement in interface CollectionAdapter
Returns:

preQuery

public void preQuery(SQLQuery q)
An entry point to tweak the query before issuing the find. This will be a noop for most CollectionAdapters.

Specified by:
preQuery in interface CollectionAdapter
Parameters:
q -

addElement

public void addElement(java.lang.Object obj)
Add the object to this collection.

Specified by:
addElement in interface CollectionAdapter
Parameters:
obj - The feature to be added to the Element attribute

size

public int size()
The number of elements in the collection.

Specified by:
size in interface CollectionAdapter
Returns: