org.apache.derby.iapi.types
Class CDCDataValueFactory

java.lang.Object
  extended by org.apache.derby.iapi.types.DataValueFactoryImpl
      extended by org.apache.derby.iapi.types.CDCDataValueFactory
All Implemented Interfaces:
ModuleControl, ModuleSupportable, DataValueFactory

public class CDCDataValueFactory
extends DataValueFactoryImpl
implements ModuleSupportable

DataValueFactory implementation for J2ME/CDC/Foundation. Cannot use SQLDecimal since that requires java.math.BigDecimal. Uses BigIntegerDecimal for DECIMAL support.

See Also:
DataValueFactory

Field Summary
 
Fields inherited from class org.apache.derby.iapi.types.DataValueFactoryImpl
localeFinder
 
Constructor Summary
CDCDataValueFactory()
          Make the constructor public.
 
Method Summary
 boolean canSupport(java.util.Properties properties)
          See if this implementation can support any attributes that are listed in properties.
 NumberDataValue getDecimalDataValue(java.lang.Long value, NumberDataValue previous)
          Get a SQL DECIMAL with the given value.
 NumberDataValue getDecimalDataValue(java.lang.String value)
          Get a SQL DECIMAL with the given value.
 NumberDataValue getNullDecimal(NumberDataValue dataValue)
          Get a SQL Decimal/Numeric with a SQL null value.
 
Methods inherited from class org.apache.derby.iapi.types.DataValueFactoryImpl
boot, getBitDataValue, getBitDataValue, getBlobDataValue, getBlobDataValue, getCharacterCollator, getCharDataValue, getCharDataValue, getCharDataValue, getClobDataValue, getClobDataValue, getClobDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDataValue, getDate, getDateValue, getDecimalDataValue, getDecimalDataValue, getDecimalDataValue, getLongVarbitDataValue, getLongvarcharDataValue, getLongvarcharDataValue, getLongvarcharDataValue, getNull, getNullBit, getNullBlob, getNullBoolean, getNullByte, getNullChar, getNullChar, getNullClob, getNullClob, getNullDate, getNullDouble, getNullDVDWithUCS_BASICcollation, getNullFloat, getNullInteger, getNullLong, getNullLongVarbit, getNullLongvarchar, getNullLongvarchar, getNullObject, getNullRef, getNullShort, getNullTime, getNullTimestamp, getNullVarbit, getNullVarchar, getNullVarchar, getNullXML, getTimestamp, getTimestamp, getTimestampValue, getTimeValue, getVarbitDataValue, getVarcharDataValue, getVarcharDataValue, getVarcharDataValue, getXMLDataValue, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDCDataValueFactory

public CDCDataValueFactory()
Make the constructor public.

Method Detail

canSupport

public boolean canSupport(java.util.Properties properties)
Description copied from interface: ModuleSupportable
See if this implementation can support any attributes that are listed in properties. This call may be made on a newly created instance before the boot() method has been called, or after the boot method has been called for a running module.

The module can check for attributes in the properties to see if it can fulfill the required behaviour. E.g. the raw store may define an attribute called RawStore.Recoverable. If a temporary raw store is required the property RawStore.recoverable=false would be added to the properties before calling bootServiceModule. If a raw store cannot support this attribute its canSupport method would return null. Also see the Monitor class's prologue to see how the identifier is used in looking up properties.
Actually a better way maybe to have properties of the form RawStore.Attributes.mandatory=recoverable,smallfootprint and RawStore.Attributes.requested=oltp,fast

Specified by:
canSupport in interface ModuleSupportable
Returns:
true if this instance can be used, false otherwise.

getDecimalDataValue

public NumberDataValue getDecimalDataValue(java.lang.Long value,
                                           NumberDataValue previous)
                                    throws StandardException
Description copied from interface: DataValueFactory
Get a SQL DECIMAL with the given value.

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

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

getNullDecimal

public NumberDataValue getNullDecimal(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:
getNullDecimal in interface DataValueFactory

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.