com.ora.jsp.sql
Class Column
java.lang.Object
|
+--com.ora.jsp.sql.Column
- Direct Known Subclasses:
- BigDecimalColumn, BooleanColumn, ByteColumn, BytesColumn, DateColumn, DoubleColumn, FloatColumn, IntColumn, LongColumn, ObjectColumn, ShortColumn, StringColumn, TimeColumn, TimestampColumn
- public abstract class Column
- extends java.lang.Object
This class represents a column in a row returned by a SQL query. It
contains default implementations of get methods for all supported types,
to avoid casting when using a concrete implementation. All default
implementations throw an UnsupportedConversionException.
Each subclass must override the getString() method, returning the
value as a String, plus the get method for the appropriate data
type, and provide a constructor to set the value.
- Version:
- 1.0
- Author:
- Hans Bergsten, Gefion software
Field Summary |
protected java.lang.String |
name
|
Constructor Summary |
Column(java.lang.String name)
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
name
protected java.lang.String name
Column
public Column(java.lang.String name)
getName
public java.lang.String getName()
getBigDecimal
public java.math.BigDecimal getBigDecimal()
throws UnsupportedConversionException
getBoolean
public boolean getBoolean()
throws UnsupportedConversionException
getByte
public byte getByte()
throws UnsupportedConversionException
getBytes
public byte[] getBytes()
throws UnsupportedConversionException
getDate
public java.sql.Date getDate()
throws UnsupportedConversionException
getDouble
public double getDouble()
throws UnsupportedConversionException
getFloat
public float getFloat()
throws UnsupportedConversionException
getInt
public int getInt()
throws UnsupportedConversionException
getLong
public long getLong()
throws UnsupportedConversionException
getShort
public short getShort()
throws UnsupportedConversionException
getString
public abstract java.lang.String getString()
- This method must be implemented by all subclasses.
All data types can be converted to a String.
getTime
public java.sql.Time getTime()
throws UnsupportedConversionException
getTimestamp
public java.sql.Timestamp getTimestamp()
throws UnsupportedConversionException
getObject
public java.lang.Object getObject()
throws UnsupportedConversionException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object