org.apache.derby.iapi.sql.dictionary
Class RowList

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended byorg.apache.derby.iapi.sql.dictionary.RowList
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.io.Externalizable, Formatable, java.util.List, java.util.RandomAccess, java.io.Serializable, TypedFormat

public class RowList
extends java.util.Vector
implements Formatable

This interface wraps a list of Rows.

Version:
0.1
Author:
Rick Hillegas
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.AbstractList
 
Field Summary
protected  TabInfo tableInfo
           
private  java.lang.String tableName
          This class implements Formatable.
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
RowList()
          Public niladic constructor.
RowList(java.lang.String tableName)
          Constructor used for testing.
RowList(TabInfo tableInfo)
          Constructor.
 
Method Summary
 void add(ExecRow row)
          Add a row to the list for this table.
 void deleteFromCatalog(LanguageConnectionContext lcc)
          Execution-time routine to delete all the keys on the list from the corresponding system table.
 long getTableID()
          Get the Conglomerate ID of the table that this list is for.
private  TabInfo getTableInfo()
           
 java.lang.String getTableName()
          Get the name of the table that this list is for.
 int getTypeFormatId()
          Get the formatID which corresponds to this class.
 void readExternal(java.io.ObjectInput in)
          Read this object from a stream of stored objects.
 void stuffCatalog(LanguageConnectionContext lcc)
          Execution-time routine to stuff all the rows on the list into the corresponding system table.
 void writeExternal(java.io.ObjectOutput out)
          Write this object to a stream of stored objects.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

tableName

private java.lang.String tableName
This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.


tableInfo

protected transient TabInfo tableInfo
Constructor Detail

RowList

public RowList()
Public niladic constructor. Needed for Formatable interface to work.


RowList

public RowList(TabInfo tableInfo)
Constructor. Creates a list of rows for a table.

Parameters:
tableInfo - Table information

RowList

public RowList(java.lang.String tableName)
Constructor used for testing.

Parameters:
tableName - name of table that this RowList buffers tuples for.
Method Detail

add

public void add(ExecRow row)
Add a row to the list for this table.

Parameters:
row - Row to chain onto list.
Returns:
Nothing

getTableName

public java.lang.String getTableName()
                              throws StandardException
Get the name of the table that this list is for.

Returns:
name of table that this Rowlist holds tuples for.
Throws:
StandardException - Thrown on error

getTableID

public long getTableID()
                throws StandardException
Get the Conglomerate ID of the table that this list is for.

Returns:
conglomerate id of table that this Rowlist holds tuples for.
Throws:
StandardException - Thrown on error

deleteFromCatalog

public void deleteFromCatalog(LanguageConnectionContext lcc)
                       throws StandardException
Execution-time routine to delete all the keys on the list from the corresponding system table.

Parameters:
lcc - language state variable
Throws:
StandardException - Thrown on error

stuffCatalog

public void stuffCatalog(LanguageConnectionContext lcc)
                  throws StandardException
Execution-time routine to stuff all the rows on the list into the corresponding system table.

Parameters:
lcc - language state variable
Throws:
StandardException - Thrown on error

getTableInfo

private TabInfo getTableInfo()
                      throws StandardException
Throws:
StandardException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read this object from a stream of stored objects.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - read this.
Throws:
java.io.IOException - thrown on error
java.lang.ClassNotFoundException - thrown on error

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this object to a stream of stored objects.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - write bytes here.
Throws:
java.io.IOException - thrown on error

getTypeFormatId

public int getTypeFormatId()
Get the formatID which corresponds to this class.

Specified by:
getTypeFormatId in interface TypedFormat
Returns:
the formatID of this class


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.