org.axiondb.types

Class TimestampType

public class TimestampType extends BaseDataType implements Comparator

A DataTyperepresenting a timestamp value.

Version: $Revision: 1.33 $ $Date: 2005/08/24 00:37:25 $

Author: Chuck Burdick Ritesh Adval Ahimanikya Satapathy Jonathan Giron

Field Summary
static LocaleLOCALE
Constructor Summary
TimestampType()
Method Summary
booleanaccepts(Object value)
Returns true iff value is null, a Number, or a String that can be converted to a Long.
intcompare(Object left, Object right)
Objectconvert(Object value)
Returns an Byte converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.
intgetColumnDisplaySize()
protected ComparatorgetComparator()
intgetJdbcType()
intgetPrecision()
StringgetPreferredValueClassName()
static TimeZonegetTimeZone()
DataTypemakeNewInstance()
Objectread(DataInput in)
static voidsetTimeZone(String id)
Objectsuccessor(Object value)
booleansupportsSuccessor()
BigDecimaltoBigDecimal(Object value)
DatetoDate(Object value)
StringtoString()
StringtoString(Object value)
TimetoTime(Object value)
TimestamptoTimestamp(Object value)
voidwrite(Object value, DataOutput out)
Writes the given value to the given DataOutput.

Field Detail

LOCALE

public static final Locale LOCALE

Constructor Detail

TimestampType

public TimestampType()

Method Detail

accepts

public boolean accepts(Object value)
Returns true iff value is null, a Number, or a String that can be converted to a Long.

compare

public int compare(Object left, Object right)

convert

public Object convert(Object value)
Returns an Byte converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.

getColumnDisplaySize

public int getColumnDisplaySize()

getComparator

protected Comparator getComparator()

getJdbcType

public int getJdbcType()

getPrecision

public int getPrecision()

getPreferredValueClassName

public String getPreferredValueClassName()

getTimeZone

public static TimeZone getTimeZone()

makeNewInstance

public DataType makeNewInstance()

read

public Object read(DataInput in)

See Also: TimestampType

setTimeZone

public static void setTimeZone(String id)

successor

public Object successor(Object value)

supportsSuccessor

public boolean supportsSuccessor()

toBigDecimal

public BigDecimal toBigDecimal(Object value)

toDate

public Date toDate(Object value)

toString

public String toString()

toString

public String toString(Object value)

toTime

public Time toTime(Object value)

toTimestamp

public Timestamp toTimestamp(Object value)

write

public void write(Object value, DataOutput out)
Writes the given value to the given DataOutput. Null values are written as Integer.MIN_VALUE. All other values are written directly with an int representing nanoseconds first, and a long representing the time.

Parameters: value the value to write, which must be acceptable