Database Access Classes

Reference Section

Reference Section

Reference Section

Reference Section

Reference Section

Value Classes

The SQLCommandBean class has a property named values, which is a java.util.Vector with com.ora.jsp.sql.Value subclass instances. The subclasses are defined in the com.ora.jsp.sql.value package, with subclasses corresponding to most of the JDBC column datatypes.

All subclasses provide a constructor with an argument of the Java datatype that the class represents. The Value superclass contains access methods for all datatypes (that just throw an UnsupportedConversionException), and each subclass overrides the method for its datatype:

com.ora.jsp.sql.value.BigDecimalValue: public BigDecimalValue(java.math.BigDecimal value); public java.math.BigDecimal getBigDecimal( ) throws UnsupportedConversionException; com.ora.jsp.sql.value.BooleanValue: public BooleanValue(boolean value); public boolean getBooleanValue( ) throws UnsupportedConversionException; com.ora.jsp.sql.value.BytesValue: public BytesValue(byte[] value); public byte[] getBytesValue( ) throws UnsupportedConversionException; com.ora.jsp.sql.value.ByteValue: public ByteValue(byte value); public byte getByte( ) throws UnsupportedConversionException; com.ora.jsp.sql.value.DateValue: public DateValue(java.sql.Date value); public java.sql.Date getDate( ) throws UnsupportedConversionException; com.ora.jsp.sql.value.DoubleValue: public DoubleValue(double value); public double getDouble( ) throws UnsupportedConversionException; ...

Get Java Server Pages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.