org.apache.derby.impl.sql.execute
Class IndexColumnOrder

java.lang.Object
  extended byorg.apache.derby.impl.sql.execute.IndexColumnOrder
All Implemented Interfaces:
ColumnOrdering, java.io.Externalizable, Formatable, java.io.Serializable, TypedFormat

public class IndexColumnOrder
extends java.lang.Object
implements ColumnOrdering, Formatable

Basic implementation of ColumnOrdering. Not sure what to tell callers about 0-based versus 1-based numbering. Assume 0-based for now.

Author:
ames
See Also:
Serialized Form

Field Summary
(package private)  boolean ascending
           
(package private)  int colNum
          This class implements Formatable.
 
Constructor Summary
IndexColumnOrder()
          Niladic constructor for formatable
IndexColumnOrder(int colNum)
           
IndexColumnOrder(int colNum, boolean ascending)
           
 
Method Summary
 int getColumnId()
           
 boolean getIsAscending()
           
 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 writeExternal(java.io.ObjectOutput out)
          Write this object out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

colNum

int colNum
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.


ascending

boolean ascending
Constructor Detail

IndexColumnOrder

public IndexColumnOrder()
Niladic constructor for formatable


IndexColumnOrder

public IndexColumnOrder(int colNum)

IndexColumnOrder

public IndexColumnOrder(int colNum,
                        boolean ascending)
Method Detail

getColumnId

public int getColumnId()
Specified by:
getColumnId in interface ColumnOrdering

getIsAscending

public boolean getIsAscending()
Specified by:
getIsAscending in interface ColumnOrdering

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this object out

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

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

getTypeFormatId

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

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

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

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