com.ora.jsp.sql
Class Value

java.lang.Object
  |
  +--com.ora.jsp.sql.Value
Direct Known Subclasses:
BigDecimalValue, BooleanValue, BytesValue, ByteValue, DateValue, DoubleValue, FloatValue, IntValue, LongValue, ObjectValue, ShortValue, StringValue, TimestampValue, TimeValue

public abstract class Value
extends java.lang.Object

This class represents a value used by the SQL tags. 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

Constructor Summary
Value()
           
 
Method Summary
 java.math.BigDecimal getBigDecimal()
           
 boolean getBoolean()
           
 byte getByte()
           
 byte[] getBytes()
           
 java.sql.Date getDate()
           
 double getDouble()
           
 float getFloat()
           
 int getInt()
           
 long getLong()
           
 java.lang.Object getObject()
           
 short getShort()
           
abstract  java.lang.String getString()
          This method must be implemented by all subclasses.
 java.sql.Time getTime()
           
 java.sql.Timestamp getTimestamp()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

Value

public Value()
Method Detail

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