SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.schema
Class Column

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.schema.ReferenceCounter
        |
        +--com.solarmetric.rd.kodo.impl.jdbc.schema.Column
All Implemented Interfaces:
java.lang.Comparable

public class Column
extends ReferenceCounter
implements java.lang.Comparable

Represents a database column.


Method Summary
 int compareTo(java.lang.Object other)
          Columns order on name.
 boolean equals(java.lang.Object other)
          Tests compatibility.
 int getDecimalDigits()
          Return the number of decimal digits for the column, if applicable.
 java.lang.String getDefault()
          Return the default value set for the column, if any.
 java.lang.String getDescription()
          Useful for debugging.
 java.lang.String getFullName()
          Return the column's full name, in the form <table>.<name>.
 int getIndex()
          Return the column's 0-based index in the owning table.
 java.lang.String getName()
          Return the column's name.
 int getSize()
          Return the column's size.
 com.solarmetric.rd.kodo.impl.jdbc.schema.Table getTable()
          Return the table for the column.
 int getType()
          Return the column's SQL type.
 java.lang.String getTypeName()
          If this column's type is not reflected in Types, set the type to Types.OTHER and set this string to the desired type name.
 boolean isCompatible(int type, int size)
          Return true if this column is compatible with the given JDBC type from Types and size.
 boolean isNotNull()
          Return true if this is a NOT NULL column.
 void setDecimalDigits(int digits)
          Set the number of decimal digits for the column.
 void setDefault(java.lang.String def)
          Set the default value for the column.
 void setNotNull(boolean notNull)
          Set whether this is a NOT NULL column.
 void setSize(int size)
          Set the column's size.
 void setType(int sqlType)
          Set the column's SQL type.
 void setTypeName(java.lang.String typeName)
          If this column's type is not reflected in Types, set the type to Types.OTHER and set this string to the desired type name.
 java.lang.String toString()
          Returns the column name.
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.schema.ReferenceCounter
deref, getRefCount, ref
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getTable

public com.solarmetric.rd.kodo.impl.jdbc.schema.Table getTable()
Return the table for the column.


getName

public java.lang.String getName()
Return the column's name.


getFullName

public java.lang.String getFullName()
Return the column's full name, in the form <table>.<name>.


getType

public int getType()
Return the column's SQL type. This will be one of the type constants defined in Types.


setType

public void setType(int sqlType)
Set the column's SQL type. This should be one of the type constants defined in Types.


getTypeName

public java.lang.String getTypeName()
If this column's type is not reflected in Types, set the type to Types.OTHER and set this string to the desired type name.


setTypeName

public void setTypeName(java.lang.String typeName)
If this column's type is not reflected in Types, set the type to Types.OTHER and set this string to the desired type name.


getSize

public int getSize()
Return the column's size.


setSize

public void setSize(int size)
Set the column's size.


getDecimalDigits

public int getDecimalDigits()
Return the number of decimal digits for the column, if applicable.


setDecimalDigits

public void setDecimalDigits(int digits)
Set the number of decimal digits for the column.


getDefault

public java.lang.String getDefault()
Return the default value set for the column, if any.


setDefault

public void setDefault(java.lang.String def)
Set the default value for the column.


isNotNull

public boolean isNotNull()
Return true if this is a NOT NULL column.


setNotNull

public void setNotNull(boolean notNull)
Set whether this is a NOT NULL column.


getIndex

public int getIndex()
Return the column's 0-based index in the owning table.


isCompatible

public boolean isCompatible(int type,
                            int size)
Return true if this column is compatible with the given JDBC type from Types and size.


compareTo

public int compareTo(java.lang.Object other)
Columns order on name.

Specified by:
compareTo in interface java.lang.Comparable

toString

public java.lang.String toString()
Returns the column name.

Overrides:
toString in class java.lang.Object

getDescription

public java.lang.String getDescription()
Useful for debugging.


equals

public boolean equals(java.lang.Object other)
Tests compatibility.

Overrides:
equals in class java.lang.Object

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.