com.workingdogs.village
Class Column

java.lang.Object
  extended by 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: 568 $
Author:
Jon S. Stevens

Constructor Summary
Column()
          constructor
 
Method Summary
 java.lang.String getTableName()
          TODO: DOCUMENT ME!
 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 name()
          the name of the column
 boolean nullAllowed()
          does this column allow null?
 void populate(java.sql.ResultSetMetaData rsmd, int colNum, java.lang.String tableName, java.lang.String columnName)
          internal package method for populating a Column instance
 void populate(java.lang.String tableName, java.lang.String columnName, java.lang.String columnTypeName, int columnType, boolean isNullable)
          internal package method for populating a Column instance
 boolean readOnly()
          is this column read only?
 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, toString, wait, wait, wait
 

Constructor Detail

Column

public Column()
constructor

Method Detail

populate

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

Parameters:
rsmd - TODO: DOCUMENT ME!
colNum - TODO: DOCUMENT ME!
tableName - TODO: DOCUMENT ME!
columnName - The name of the column
Throws:
java.sql.SQLException - TODO: DOCUMENT ME!

populate

public void populate(java.lang.String tableName,
                     java.lang.String columnName,
                     java.lang.String columnTypeName,
                     int columnType,
                     boolean isNullable)
internal package method for populating a Column instance

Parameters:
tableName - The name of the table
columnName - The name of the column
columnTypeName - The Data source dependent type name
columnType - The SQL type from java.sql.Types
isNullable - true if NULL allowed.

name

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

Returns:
the name of the column

typeEnum

public int typeEnum()
the data type of a column

Returns:
the java.sql.Types enum

nullAllowed

public boolean nullAllowed()
does this column allow null?

Returns:
whether or not the column has null Allowed

readOnly

public boolean readOnly()
is this column read only?

Returns:
whether or not this column is read only

type

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

Returns:
the type of the column as a string

isBoolean

public boolean isBoolean()
column isBoolean: -7

Returns:
TODO: DOCUMENT ME!

isBigDecimal

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

Returns:
TODO: DOCUMENT ME!

isBinary

public boolean isBinary()
column isBinary: -2

Returns:
TODO: DOCUMENT ME!

isByte

public boolean isByte()
column isByte: -6

Returns:
TODO: DOCUMENT ME!

isBytes

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

Returns:
TODO: DOCUMENT ME!

isDate

public boolean isDate()
column isBytes: 91

Returns:
TODO: DOCUMENT ME!

isDouble

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

Returns:
TODO: DOCUMENT ME!

isFloat

public boolean isFloat()
column isFloat: 7

Returns:
TODO: DOCUMENT ME!

isInt

public boolean isInt()
column isInt: 4

Returns:
TODO: DOCUMENT ME!

isLong

public boolean isLong()
column isLong: -5

Returns:
TODO: DOCUMENT ME!

isShort

public boolean isShort()
column isShort: 5

Returns:
TODO: DOCUMENT ME!

isString

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

Returns:
TODO: DOCUMENT ME!

isTime

public boolean isTime()
column isTime: 92

Returns:
TODO: DOCUMENT ME!

isTimestamp

public boolean isTimestamp()
column isTimestamp: 93

Returns:
TODO: DOCUMENT ME!

isVarBinary

public boolean isVarBinary()
column isVarBinary: -3

Returns:
TODO: DOCUMENT ME!

isLongVarBinary

public boolean isLongVarBinary()
column isLongVarBinary: -4

Returns:
TODO: DOCUMENT ME!

getTableName

public java.lang.String getTableName()
TODO: DOCUMENT ME!

Returns:
TODO: DOCUMENT ME!


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.