com.workingdogs.village
Class Column

java.lang.Object
  |
  +--com.workingdogs.village.Column

public class Column
extends java.lang.Object

This class represents a Column in the database and its associated meta information. A Record is a collection of columns.

Version:
$Revision: 1.9 $
Author:
Jon S. Stevens jon@latchkey.com

Field Summary
private  boolean autoIncrement
          is this an auto increment column?
private  int columnNumber
          column number in a schema object
private  int columnType
          what java.sql.Type is this column?
private  java.lang.String columnTypeName
          example: this column is of type "String"
private  int length
          what is the length of this column?
private  java.lang.String name
          name of the column
private  boolean nullAllowed
          is null allowed for this column?
private  int precision
          what is the precision of this column?
private  boolean readOnly
          is this a read only column?
private  int scale
          what is the scale of this column?
private  boolean searchable
          is this a searchable column?
private  java.lang.String tableName
          name of table that this column belongs to
private  java.lang.String type
          the column type resolved internally
 
Constructor Summary
Column()
          constructor
 
Method Summary
 boolean autoIncrement()
          does this column auto increment?
 java.lang.String dbKonaMethod()
          unknown use
 java.lang.String dbType()
          the data type of a column
 java.lang.String getTableName()
           
 boolean isBigDecimal()
          column isBigDecimal: 2 || 3
 boolean isBinary()
          column isBinary: -2
 boolean isBoolean()
          column isBoolean: -7
 boolean isByte()
          column isByte: -6
 boolean isBytes()
          column isBytes: -4 || -3 || -2
 boolean isDate()
          column isBytes: 91
 boolean isDouble()
          column isDouble: 6 || 8
 boolean isFloat()
          column isFloat: 7
 boolean isInt()
          column isInt: 4
 boolean isLong()
          column isLong: -5
 boolean isLongVarBinary()
          column isLongVarBinary: -4
 boolean isShort()
          column isShort: 5
 boolean isString()
          column isString: -1 || -11 || 12
 boolean isTime()
          column isTime: 92
 boolean isTimestamp()
          column isTimestamp: 93
 boolean isVarBinary()
          column isVarBinary: -3
 java.lang.String javaType()
          unknown use
 int length()
          the storage length of a column
 java.lang.String name()
          the name of the column
 boolean nullAllowed()
          does this column allow null?
(package private)  void populate(java.sql.ResultSetMetaData rsmd, int colNum, java.lang.String tableName)
          internal package method for populating a Column instance
 int precision()
          the precision of the column
 java.lang.String preparedStatemntBindMethod()
          unknown use
 boolean readOnly()
          is this column read only?
 java.lang.String resultSetMethod()
          unknown use
 int scale()
          the scale of the column
 boolean searchable()
          is this column searchable?
 java.lang.String type()
          the type of the column as a string
 int typeEnum()
          the data type of a column
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

columnNumber

private int columnNumber
column number in a schema object

name

private java.lang.String name
name of the column

columnTypeName

private java.lang.String columnTypeName
example: this column is of type "String"

columnType

private int columnType
what java.sql.Type is this column?

tableName

private java.lang.String tableName
name of table that this column belongs to

nullAllowed

private boolean nullAllowed
is null allowed for this column?

autoIncrement

private boolean autoIncrement
is this an auto increment column?

readOnly

private boolean readOnly
is this a read only column?

searchable

private boolean searchable
is this a searchable column?

scale

private int scale
what is the scale of this column?

precision

private int precision
what is the precision of this column?

length

private int length
what is the length of this column?

type

private java.lang.String type
the column type resolved internally
Constructor Detail

Column

public Column()
constructor
Method Detail

populate

void populate(java.sql.ResultSetMetaData rsmd,
              int colNum,
              java.lang.String tableName)
        throws java.sql.SQLException
internal package method for populating a Column instance

name

public java.lang.String name()
the name of the column

dbType

public java.lang.String dbType()
the data type of a column

typeEnum

public int typeEnum()
the data type of a column

nullAllowed

public boolean nullAllowed()
does this column allow null?

autoIncrement

public boolean autoIncrement()
does this column auto increment?

readOnly

public boolean readOnly()
is this column read only?

searchable

public boolean searchable()
is this column searchable?

scale

public int scale()
the scale of the column

precision

public int precision()
the precision of the column

length

public int length()
the storage length of a column

type

public java.lang.String type()
the type of the column as a string

isBoolean

public boolean isBoolean()
column isBoolean: -7

isBigDecimal

public boolean isBigDecimal()
column isBigDecimal: 2 || 3

isBinary

public boolean isBinary()
column isBinary: -2

isByte

public boolean isByte()
column isByte: -6

isBytes

public boolean isBytes()
column isBytes: -4 || -3 || -2

isDate

public boolean isDate()
column isBytes: 91

isDouble

public boolean isDouble()
column isDouble: 6 || 8

isFloat

public boolean isFloat()
column isFloat: 7

isInt

public boolean isInt()
column isInt: 4

isLong

public boolean isLong()
column isLong: -5

isShort

public boolean isShort()
column isShort: 5

isString

public boolean isString()
column isString: -1 || -11 || 12

isTime

public boolean isTime()
column isTime: 92

isTimestamp

public boolean isTimestamp()
column isTimestamp: 93

isVarBinary

public boolean isVarBinary()
column isVarBinary: -3

isLongVarBinary

public boolean isLongVarBinary()
column isLongVarBinary: -4

dbKonaMethod

public java.lang.String dbKonaMethod()
                              throws DataSetException
unknown use

javaType

public java.lang.String javaType()
                          throws DataSetException
unknown use

preparedStatemntBindMethod

public final java.lang.String preparedStatemntBindMethod()
                                                  throws DataSetException
unknown use

resultSetMethod

public final java.lang.String resultSetMethod()
                                       throws DataSetException
unknown use

getTableName

public java.lang.String getTableName()


Copyright © 1999-2002 Share.Whichever.com All Rights Reserved.