org.apache.derby.iapi.types
Class DataValueFactoryImpl

java.lang.Object
  extended byorg.apache.derby.iapi.types.DataValueFactoryImpl
All Implemented Interfaces:
DataValueFactory

public class DataValueFactoryImpl
extends java.lang.Object
implements DataValueFactory

This class implements DataValueFactory.

See Also:
DataValueFactory

Field Summary
(package private)  LocaleFinder localeFinder
           
 
Constructor Summary
DataValueFactoryImpl(LocaleFinder localeFinder)
          Make the constructor public.
 
Method Summary
 BitDataValue getBitDataValue(byte[] value)
          Get a SQL bit with the given value.
 BitDataValue getBitDataValue(byte[] value, BitDataValue previous)
           
 BitDataValue getBlobDataValue(byte[] value)
          Get a SQL Blob with the given value.
 BitDataValue getBlobDataValue(byte[] value, BitDataValue previous)
           
 StringDataValue getCharDataValue(java.lang.String value)
          Get a SQL char with the given value.
 StringDataValue getCharDataValue(java.lang.String value, StringDataValue previous)
           
 StringDataValue getClobDataValue(java.lang.String value)
          Get a SQL Clob with the given value.
 StringDataValue getClobDataValue(java.lang.String value, StringDataValue previous)
           
 NumberDataValue getDataValue(java.math.BigDecimal value)
          Get a SQL DECIMAL with the given value.
 NumberDataValue getDataValue(java.math.BigDecimal value, NumberDataValue previous)
           
 BooleanDataValue getDataValue(boolean value)
          Get a SQL boolean with the given value.
 BooleanDataValue getDataValue(java.lang.Boolean value)
          Get a SQL boolean with the given value.
 BooleanDataValue getDataValue(boolean value, BooleanDataValue previous)
           
 BooleanDataValue getDataValue(java.lang.Boolean value, BooleanDataValue previous)
           
 BooleanDataValue getDataValue(BooleanDataValue value)
          Get a SQL boolean with the given value.
 NumberDataValue getDataValue(byte value)
          Get a SQL TINYINT with the given value.
 NumberDataValue getDataValue(java.lang.Byte value)
          Get a SQL TINYINT with the given value.
 NumberDataValue getDataValue(byte value, NumberDataValue previous)
           
 NumberDataValue getDataValue(java.lang.Byte value, NumberDataValue previous)
           
 NumberDataValue getDataValue(char value)
          Get a SQL int with a char value.
 NumberDataValue getDataValue(char value, NumberDataValue previous)
           
 DateTimeDataValue getDataValue(java.sql.Date value)
          Get a SQL date with the given value.
 DateTimeDataValue getDataValue(java.sql.Date value, DateTimeDataValue previous)
           
 NumberDataValue getDataValue(double value)
          Get a SQL double precision with the given value.
 NumberDataValue getDataValue(java.lang.Double value)
          Get a SQL double precision with the given value.
 NumberDataValue getDataValue(double value, NumberDataValue previous)
           
 NumberDataValue getDataValue(java.lang.Double value, NumberDataValue previous)
           
 NumberDataValue getDataValue(float value)
          Get a SQL real with the given value.
 NumberDataValue getDataValue(java.lang.Float value)
          Get a SQL real with the given value.
 NumberDataValue getDataValue(float value, NumberDataValue previous)
           
 NumberDataValue getDataValue(java.lang.Float value, NumberDataValue previous)
           
 NumberDataValue getDataValue(int value)
          Get a SQL int with the given value.
 NumberDataValue getDataValue(java.lang.Integer value)
          Get a SQL int with the given value.
 NumberDataValue getDataValue(java.lang.Integer value, NumberDataValue previous)
           
 NumberDataValue getDataValue(int value, NumberDataValue previous)
           
 NumberDataValue getDataValue(long value)
          Get a SQL bigint with the given value.
 NumberDataValue getDataValue(java.lang.Long value)
          Get a SQL bigint with the given value.
 NumberDataValue getDataValue(long value, NumberDataValue previous)
           
 NumberDataValue getDataValue(java.lang.Long value, NumberDataValue previous)
           
 UserDataValue getDataValue(java.lang.Object value)
          Get a User-defined data value with the given value and type name.
 UserDataValue getDataValue(java.lang.Object value, UserDataValue previous)
           
 RefDataValue getDataValue(RowLocation value)
          Get a RefDataValue with the given value.
 RefDataValue getDataValue(RowLocation value, RefDataValue previous)
           
 NumberDataValue getDataValue(short value)
          Get a SQL SMALLINT with the given value.
 NumberDataValue getDataValue(java.lang.Short value)
          Get a SQL smallint with the given value.
 NumberDataValue getDataValue(short value, NumberDataValue previous)
           
 NumberDataValue getDataValue(java.lang.Short value, NumberDataValue previous)
           
 DateTimeDataValue getDataValue(java.sql.Time value)
          Get a SQL time with the given value.
 DateTimeDataValue getDataValue(java.sql.Time value, DateTimeDataValue previous)
           
 DateTimeDataValue getDataValue(java.sql.Timestamp value)
          Get a SQL timestamp with the given value.
 DateTimeDataValue getDataValue(java.sql.Timestamp value, DateTimeDataValue previous)
           
 DateTimeDataValue getDateValue(java.lang.String dateStr, boolean isJdbcEscape)
           
 NumberDataValue getDecimalDataValue(java.lang.String value)
          Get a SQL DECIMAL with the given value.
 NumberDataValue getDecimalDataValue(java.lang.String value, NumberDataValue previous)
           
private  LocaleFinder getLocaleFinder()
           
 BitDataValue getLongVarbitDataValue(byte[] value)
          Get a SQL Long Bit Varying with the given value.
 BitDataValue getLongVarbitDataValue(byte[] value, BitDataValue previous)
           
 StringDataValue getLongvarcharDataValue(java.lang.String value)
          Get a SQL long varchar with the given value.
 StringDataValue getLongvarcharDataValue(java.lang.String value, StringDataValue previous)
           
 StringDataValue getNationalCharDataValue(java.lang.String value)
          Get a SQL national char with the given value.
 StringDataValue getNationalCharDataValue(java.lang.String value, StringDataValue previous)
           
 StringDataValue getNationalLongvarcharDataValue(java.lang.String value)
          Get a SQL national long varchar with the given value.
 StringDataValue getNationalLongvarcharDataValue(java.lang.String value, StringDataValue previous)
           
 StringDataValue getNationalVarcharDataValue(java.lang.String value)
          Get a SQL national varchar with the given value.
 StringDataValue getNationalVarcharDataValue(java.lang.String value, StringDataValue previous)
           
 StringDataValue getNClobDataValue(java.lang.String value)
          Get a SQL national blob with the given value.
 StringDataValue getNClobDataValue(java.lang.String value, StringDataValue previous)
           
 NumberDataValue getNullBigDecimal(NumberDataValue dataValue)
          Get a SQL Decimal/Numeric with a SQL null value.
 BitDataValue getNullBit(BitDataValue dataValue)
          Get a SQL Bit with a SQL null value.
 BitDataValue getNullBlob(BitDataValue dataValue)
          Get a SQL Blob with a SQL null value.
 BooleanDataValue getNullBoolean(BooleanDataValue dataValue)
          Get a SQL boolean with a SQL null value.
 NumberDataValue getNullByte(NumberDataValue dataValue)
          Get a SQL tinyint with a SQL null value.
 StringDataValue getNullChar(StringDataValue dataValue)
          Get a SQL char with a SQL null value.
 StringDataValue getNullClob(StringDataValue dataValue)
          Get a SQL long varchar with a SQL null value.
 DateTimeDataValue getNullDate(DateTimeDataValue dataValue)
          Get a SQL date with a SQL null value.
 NumberDataValue getNullDouble(NumberDataValue dataValue)
          Get a SQL double with a SQL null value.
 NumberDataValue getNullFloat(NumberDataValue dataValue)
          Get a SQL float with a SQL null value.
 NumberDataValue getNullInteger(NumberDataValue dataValue)
          Get a SQL int with a SQL null value.
 NumberDataValue getNullLong(NumberDataValue dataValue)
          Get a SQL bigint with a SQL null value.
 BitDataValue getNullLongVarbit(BitDataValue dataValue)
          Get a SQL Long Bit Varying with a SQL null value.
 StringDataValue getNullLongvarchar(StringDataValue dataValue)
          Get a SQL long varchar with a SQL null value.
 StringDataValue getNullNationalChar(StringDataValue dataValue)
          Get a SQL national char with a SQL null value.
 StringDataValue getNullNationalLongvarchar(StringDataValue dataValue)
          Get a SQL national long varchar with a SQL null value.
 StringDataValue getNullNationalVarchar(StringDataValue dataValue)
          Get a SQL national varchar with a SQL null value.
 StringDataValue getNullNClob(StringDataValue dataValue)
          Get a SQL NCLOB with a SQL null value.
 UserDataValue getNullObject(UserDataValue dataValue)
          Get a User-defined data value with a SQL null value.
 RefDataValue getNullRef(RefDataValue dataValue)
          Get a RefDataValue with a SQL null value.
 NumberDataValue getNullShort(NumberDataValue dataValue)
          Get a SQL smallint with a SQL null value.
 DateTimeDataValue getNullTime(DateTimeDataValue dataValue)
          Get a SQL time with a SQL null value.
 DateTimeDataValue getNullTimestamp(DateTimeDataValue dataValue)
          Get a SQL timestamp with a SQL null value.
 BitDataValue getNullVarbit(BitDataValue dataValue)
          Get a SQL Bit Varying with a SQL null value.
 StringDataValue getNullVarchar(StringDataValue dataValue)
          Get a SQL varchar with a SQL null value.
 DateTimeDataValue getTimestamp(DataValueDescriptor date, DataValueDescriptor time)
          Construct a SQL timestamp from a date and time.
 DateTimeDataValue getTimestampValue(java.lang.String timestampStr, boolean isJdbcEscape)
           
 DateTimeDataValue getTimeValue(java.lang.String timeStr, boolean isJdbcEscape)
           
 BitDataValue getVarbitDataValue(byte[] value)
          Get a SQL bit with the given value.
 BitDataValue getVarbitDataValue(byte[] value, BitDataValue previous)
           
 StringDataValue getVarcharDataValue(java.lang.String value)
          Get a SQL varchar with the given value.
 StringDataValue getVarcharDataValue(java.lang.String value, StringDataValue previous)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localeFinder

LocaleFinder localeFinder
Constructor Detail

DataValueFactoryImpl

public DataValueFactoryImpl(LocaleFinder localeFinder)
Make the constructor public.

Method Detail

getDataValue

public NumberDataValue getDataValue(int value)
Description copied from interface: DataValueFactory
Get a SQL int with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
See Also:
DataValueFactory.getDataValue(java.lang.Integer)

getDataValue

public NumberDataValue getDataValue(int value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Integer value)
Description copied from interface: DataValueFactory
Get a SQL int with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(java.lang.Integer value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(char value)
Description copied from interface: DataValueFactory
Get a SQL int with a char value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(char value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(short value)
Description copied from interface: DataValueFactory
Get a SQL SMALLINT with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(short value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Short value)
Description copied from interface: DataValueFactory
Get a SQL smallint with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(java.lang.Short value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(byte value)
Description copied from interface: DataValueFactory
Get a SQL TINYINT with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(byte value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Byte value)
Description copied from interface: DataValueFactory
Get a SQL TINYINT with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(java.lang.Byte value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(long value)
Description copied from interface: DataValueFactory
Get a SQL bigint with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(long value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Long value)
Description copied from interface: DataValueFactory
Get a SQL bigint with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(java.lang.Long value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(float value)
                             throws StandardException
Description copied from interface: DataValueFactory
Get a SQL real with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getDataValue

public NumberDataValue getDataValue(float value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Float value)
                             throws StandardException
Description copied from interface: DataValueFactory
Get a SQL real with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Float value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(double value)
                             throws StandardException
Description copied from interface: DataValueFactory
Get a SQL double precision with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getDataValue

public NumberDataValue getDataValue(double value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.lang.Double value)
                             throws StandardException
Description copied from interface: DataValueFactory
Get a SQL double precision with the given value. A null argument means a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getDataValue

public NumberDataValue getDataValue(java.lang.Double value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public NumberDataValue getDataValue(java.math.BigDecimal value)
Description copied from interface: DataValueFactory
Get a SQL DECIMAL with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public NumberDataValue getDataValue(java.math.BigDecimal value,
                                    NumberDataValue previous)
                             throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDecimalDataValue

public NumberDataValue getDecimalDataValue(java.lang.String value)
                                    throws StandardException
Description copied from interface: DataValueFactory
Get a SQL DECIMAL with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDecimalDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getDecimalDataValue

public NumberDataValue getDecimalDataValue(java.lang.String value,
                                           NumberDataValue previous)
                                    throws StandardException
Specified by:
getDecimalDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public BooleanDataValue getDataValue(boolean value)
Description copied from interface: DataValueFactory
Get a SQL boolean with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public BooleanDataValue getDataValue(boolean value,
                                     BooleanDataValue previous)
                              throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public BooleanDataValue getDataValue(java.lang.Boolean value)
Description copied from interface: DataValueFactory
Get a SQL boolean with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public BooleanDataValue getDataValue(java.lang.Boolean value,
                                     BooleanDataValue previous)
                              throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public BooleanDataValue getDataValue(BooleanDataValue value)
Description copied from interface: DataValueFactory
Get a SQL boolean with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getBitDataValue

public BitDataValue getBitDataValue(byte[] value)
                             throws StandardException
Description copied from interface: DataValueFactory
Get a SQL bit with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getBitDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getBitDataValue

public BitDataValue getBitDataValue(byte[] value,
                                    BitDataValue previous)
                             throws StandardException
Specified by:
getBitDataValue in interface DataValueFactory
Throws:
StandardException

getVarbitDataValue

public BitDataValue getVarbitDataValue(byte[] value)
Description copied from interface: DataValueFactory
Get a SQL bit with the given value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getVarbitDataValue in interface DataValueFactory

getVarbitDataValue

public BitDataValue getVarbitDataValue(byte[] value,
                                       BitDataValue previous)
                                throws StandardException
Specified by:
getVarbitDataValue in interface DataValueFactory
Throws:
StandardException

getLongVarbitDataValue

public BitDataValue getLongVarbitDataValue(byte[] value)
                                    throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Long Bit Varying with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getLongVarbitDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getLongVarbitDataValue

public BitDataValue getLongVarbitDataValue(byte[] value,
                                           BitDataValue previous)
                                    throws StandardException
Specified by:
getLongVarbitDataValue in interface DataValueFactory
Throws:
StandardException

getBlobDataValue

public BitDataValue getBlobDataValue(byte[] value)
                              throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Blob with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getBlobDataValue in interface DataValueFactory
Throws:
StandardException - Thrown on error

getBlobDataValue

public BitDataValue getBlobDataValue(byte[] value,
                                     BitDataValue previous)
                              throws StandardException
Specified by:
getBlobDataValue in interface DataValueFactory
Throws:
StandardException

getCharDataValue

public StringDataValue getCharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL char with the given value. A null argument means get a SQL null value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getCharDataValue in interface DataValueFactory

getCharDataValue

public StringDataValue getCharDataValue(java.lang.String value,
                                        StringDataValue previous)
                                 throws StandardException
Specified by:
getCharDataValue in interface DataValueFactory
Throws:
StandardException

getVarcharDataValue

public StringDataValue getVarcharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL varchar with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getVarcharDataValue in interface DataValueFactory

getVarcharDataValue

public StringDataValue getVarcharDataValue(java.lang.String value,
                                           StringDataValue previous)
                                    throws StandardException
Specified by:
getVarcharDataValue in interface DataValueFactory
Throws:
StandardException

getLongvarcharDataValue

public StringDataValue getLongvarcharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL long varchar with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getLongvarcharDataValue in interface DataValueFactory

getClobDataValue

public StringDataValue getClobDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL Clob with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getClobDataValue in interface DataValueFactory

getLongvarcharDataValue

public StringDataValue getLongvarcharDataValue(java.lang.String value,
                                               StringDataValue previous)
                                        throws StandardException
Specified by:
getLongvarcharDataValue in interface DataValueFactory
Throws:
StandardException

getClobDataValue

public StringDataValue getClobDataValue(java.lang.String value,
                                        StringDataValue previous)
                                 throws StandardException
Specified by:
getClobDataValue in interface DataValueFactory
Throws:
StandardException

getNationalCharDataValue

public StringDataValue getNationalCharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL national char with the given value. A null argument means get a SQL null value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getNationalCharDataValue in interface DataValueFactory

getNationalCharDataValue

public StringDataValue getNationalCharDataValue(java.lang.String value,
                                                StringDataValue previous)
                                         throws StandardException
Specified by:
getNationalCharDataValue in interface DataValueFactory
Throws:
StandardException

getNationalVarcharDataValue

public StringDataValue getNationalVarcharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL national varchar with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getNationalVarcharDataValue in interface DataValueFactory

getNationalVarcharDataValue

public StringDataValue getNationalVarcharDataValue(java.lang.String value,
                                                   StringDataValue previous)
                                            throws StandardException
Specified by:
getNationalVarcharDataValue in interface DataValueFactory
Throws:
StandardException

getNationalLongvarcharDataValue

public StringDataValue getNationalLongvarcharDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL national long varchar with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getNationalLongvarcharDataValue in interface DataValueFactory

getNationalLongvarcharDataValue

public StringDataValue getNationalLongvarcharDataValue(java.lang.String value,
                                                       StringDataValue previous)
                                                throws StandardException
Specified by:
getNationalLongvarcharDataValue in interface DataValueFactory
Throws:
StandardException

getNClobDataValue

public StringDataValue getNClobDataValue(java.lang.String value)
Description copied from interface: DataValueFactory
Get a SQL national blob with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getNClobDataValue in interface DataValueFactory

getNClobDataValue

public StringDataValue getNClobDataValue(java.lang.String value,
                                         StringDataValue previous)
                                  throws StandardException
Specified by:
getNClobDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Date value)
                               throws StandardException
Description copied from interface: DataValueFactory
Get a SQL date with the given value. A null argument means get a SQL null value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Date value,
                                      DateTimeDataValue previous)
                               throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Time value)
                               throws StandardException
Description copied from interface: DataValueFactory
Get a SQL time with the given value. A null argument means get a SQL null value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Time value,
                                      DateTimeDataValue previous)
                               throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Timestamp value)
                               throws StandardException
Description copied from interface: DataValueFactory
Get a SQL timestamp with the given value. A null argument means get a SQL null value. The second form re-uses the previous value, if non-null, as the data holder to return.

Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getDataValue

public DateTimeDataValue getDataValue(java.sql.Timestamp value,
                                      DateTimeDataValue previous)
                               throws StandardException
Specified by:
getDataValue in interface DataValueFactory
Throws:
StandardException

getTimestamp

public DateTimeDataValue getTimestamp(DataValueDescriptor date,
                                      DataValueDescriptor time)
                               throws StandardException
Description copied from interface: DataValueFactory
Construct a SQL timestamp from a date and time.

Specified by:
getTimestamp in interface DataValueFactory
Parameters:
date - Must be convertible to a date.
time - Must be convertible to a time.
Throws:
StandardException

getDataValue

public UserDataValue getDataValue(java.lang.Object value)
Description copied from interface: DataValueFactory
Get a User-defined data value with the given value and type name. A null argument means get a SQL null value. The second form uses the previous value (if non-null) hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public UserDataValue getDataValue(java.lang.Object value,
                                  UserDataValue previous)
Specified by:
getDataValue in interface DataValueFactory

getDataValue

public RefDataValue getDataValue(RowLocation value)
Description copied from interface: DataValueFactory
Get a RefDataValue with the given value. A null argument means get a SQL null value. The second form uses the previous value (if non-null) to hold the return value.

Specified by:
getDataValue in interface DataValueFactory

getDataValue

public RefDataValue getDataValue(RowLocation value,
                                 RefDataValue previous)
Specified by:
getDataValue in interface DataValueFactory

getNullInteger

public NumberDataValue getNullInteger(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL int with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullInteger in interface DataValueFactory

getNullShort

public NumberDataValue getNullShort(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL smallint with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullShort in interface DataValueFactory

getNullLong

public NumberDataValue getNullLong(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL bigint with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullLong in interface DataValueFactory

getNullByte

public NumberDataValue getNullByte(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL tinyint with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullByte in interface DataValueFactory

getNullFloat

public NumberDataValue getNullFloat(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL float with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullFloat in interface DataValueFactory

getNullDouble

public NumberDataValue getNullDouble(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL double with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullDouble in interface DataValueFactory

getNullBigDecimal

public NumberDataValue getNullBigDecimal(NumberDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL Decimal/Numeric with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullBigDecimal in interface DataValueFactory

getNullBoolean

public BooleanDataValue getNullBoolean(BooleanDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL boolean with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullBoolean in interface DataValueFactory

getNullBit

public BitDataValue getNullBit(BitDataValue dataValue)
                        throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Bit with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullBit in interface DataValueFactory
Throws:
StandardException - Thrown on error

getNullVarbit

public BitDataValue getNullVarbit(BitDataValue dataValue)
                           throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Bit Varying with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullVarbit in interface DataValueFactory
Throws:
StandardException - Thrown on error

getNullLongVarbit

public BitDataValue getNullLongVarbit(BitDataValue dataValue)
                               throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Long Bit Varying with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullLongVarbit in interface DataValueFactory
Throws:
StandardException - Thrown on error

getNullBlob

public BitDataValue getNullBlob(BitDataValue dataValue)
                         throws StandardException
Description copied from interface: DataValueFactory
Get a SQL Blob with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullBlob in interface DataValueFactory
Throws:
StandardException - Thrown on error

getNullChar

public StringDataValue getNullChar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL char with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullChar in interface DataValueFactory

getNullVarchar

public StringDataValue getNullVarchar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL varchar with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullVarchar in interface DataValueFactory

getNullLongvarchar

public StringDataValue getNullLongvarchar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL long varchar with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullLongvarchar in interface DataValueFactory

getNullClob

public StringDataValue getNullClob(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL long varchar with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullClob in interface DataValueFactory

getNullNationalChar

public StringDataValue getNullNationalChar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL national char with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullNationalChar in interface DataValueFactory

getNullNationalVarchar

public StringDataValue getNullNationalVarchar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL national varchar with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullNationalVarchar in interface DataValueFactory

getNullNationalLongvarchar

public StringDataValue getNullNationalLongvarchar(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL national long varchar with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullNationalLongvarchar in interface DataValueFactory

getNullNClob

public StringDataValue getNullNClob(StringDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL NCLOB with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullNClob in interface DataValueFactory

getNullObject

public UserDataValue getNullObject(UserDataValue dataValue)
Description copied from interface: DataValueFactory
Get a User-defined data value with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullObject in interface DataValueFactory

getNullRef

public RefDataValue getNullRef(RefDataValue dataValue)
Description copied from interface: DataValueFactory
Get a RefDataValue with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullRef in interface DataValueFactory

getNullDate

public DateTimeDataValue getNullDate(DateTimeDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL date with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullDate in interface DataValueFactory

getNullTime

public DateTimeDataValue getNullTime(DateTimeDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL time with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullTime in interface DataValueFactory

getNullTimestamp

public DateTimeDataValue getNullTimestamp(DateTimeDataValue dataValue)
Description copied from interface: DataValueFactory
Get a SQL timestamp with a SQL null value. If the supplied value is null then get a new value, otherwise set it to null and return that value.

Specified by:
getNullTimestamp in interface DataValueFactory

getDateValue

public DateTimeDataValue getDateValue(java.lang.String dateStr,
                                      boolean isJdbcEscape)
                               throws StandardException
Specified by:
getDateValue in interface DataValueFactory
Parameters:
dateStr - A date in one of the DB2 standard date formats or the local format.
isJdbcEscape - If true then the timestamp must be in the JDBC timestamp escape format, otherwise it must be in the DB2 timestamp format.
Returns:
A DateTimeDataValue
Throws:
StandardException - if the syntax is invalid or the date is out of range.

getTimeValue

public DateTimeDataValue getTimeValue(java.lang.String timeStr,
                                      boolean isJdbcEscape)
                               throws StandardException
Specified by:
getTimeValue in interface DataValueFactory
Parameters:
timeStr - A date in one of the DB2 standard time formats or the local format.
isJdbcEscape - If true then the timestamp must be in the JDBC time escape format, otherwise it must be in the DB2 time format.
Returns:
A DateTimeDataValue
Throws:
StandardException - if the syntax is invalid or the time is out of range.

getTimestampValue

public DateTimeDataValue getTimestampValue(java.lang.String timestampStr,
                                           boolean isJdbcEscape)
                                    throws StandardException
Specified by:
getTimestampValue in interface DataValueFactory
Parameters:
isJdbcEscape - If true then the time must be in the JDBC time escape format, otherwise it must be in the DB2 time format.
Returns:
An internal timestamp
Throws:
StandardException - if the syntax is invalid or the timestamp is out of range.

getLocaleFinder

private LocaleFinder getLocaleFinder()


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.