jxDBCon 0.9z

org.sourceforge.jxdbcon.postgresql
Class PGDateTimeTypes.PGtimestampBase

java.lang.Object
  |
  +--org.sourceforge.jxutil.sql.type.AbstractType
        |
        +--org.sourceforge.jxutil.sql.type.AbstractTIMESTAMP
              |
              +--org.sourceforge.jxdbcon.postgresql.PGDateTimeTypes.PGtimestampBase
Direct Known Subclasses:
PGDateTimeTypes.PGtimestamp, PGDateTimeTypes.PGtimestamptz, PGDateTimeTypes.PGtimestampV72
Enclosing class:
PGDateTimeTypes

public abstract static class PGDateTimeTypes.PGtimestampBase
extends AbstractTIMESTAMP

The base class for timestamp implementations. TIMESTAMP type with high precision. An 8 byte value. Stored as a double. integer part stores seconds since 2000.01.01 00:00:00.00 Depending on version of the backend the semantics of rolling time zone change.


Field Summary
 
Fields inherited from class org.sourceforge.jxutil.sql.type.AbstractType
BD_ONE, BD_ZERO, name
 
Constructor Summary
protected PGDateTimeTypes.PGtimestampBase(String name)
           
 
Method Summary
 byte[] getBytes(Object row, ConversionContext ctx)
           
 String getLiteralPrefix()
           
 String getLiteralSuffix()
           
 Timestamp getTimestamp(Object row, Calendar cal, ConversionContext ctx)
           
protected abstract  long rollGet(long ld, Calendar cal)
           
protected abstract  long rollSet(long ld, Calendar cal)
           
 void setDouble(Object row, double val, ConversionContext ctx)
           
 void setNull(Object row, ConversionContext ctx)
           
 void setTimestamp(Object row, Timestamp val, Calendar cal, ConversionContext ctx)
           
 
Methods inherited from class org.sourceforge.jxutil.sql.type.AbstractTIMESTAMP
getDate, getJavaClass, getJavaType, getJDBCType, getObject, getString, getTime, setDate, setString
 
Methods inherited from class org.sourceforge.jxutil.sql.type.AbstractType
dataTruncationRead, dataTruncationWrite, deriveType, getArray, getAsciiStream, getAutoInc, getBigDecimal, getBinaryStream, getBlob, getBoolean, getByte, getCaseSensitive, getCharacterStream, getClob, getCreateParams, getCurrency, getDate, getDouble, getFloat, getInt, getLiteral, getLocalName, getLong, getMaxScale, getMinScale, getName, getNullable, getNumRadix, getObject, getPrecision, getRef, getScale, getSearchable, getShort, getTime, getTimestamp, getUnsigned, getURL, noConversion, noConversion, noConversion, setArray, setAsciiStream, setBigDecimal, setBinaryStream, setBlob, setBoolean, setByte, setBytes, setCharacterStream, setClob, setDate, setFloat, setInt, setLong, setNull, setNull, setObject, setObject, setObject, setRef, setShort, setStruct, setTime, setTime, setTimestamp, setURL, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PGDateTimeTypes.PGtimestampBase

protected PGDateTimeTypes.PGtimestampBase(String name)
Method Detail

getBytes

public final byte[] getBytes(Object row,
                             ConversionContext ctx)
Overrides:
getBytes in class AbstractType

getLiteralPrefix

public final String getLiteralPrefix()
Overrides:
getLiteralPrefix in class AbstractTIMESTAMP

getLiteralSuffix

public final String getLiteralSuffix()
Overrides:
getLiteralSuffix in class AbstractTIMESTAMP

getTimestamp

public final Timestamp getTimestamp(Object row,
                                    Calendar cal,
                                    ConversionContext ctx)
                             throws SQLException
Specified by:
getTimestamp in class AbstractTIMESTAMP
SQLException

rollGet

protected abstract long rollGet(long ld,
                                Calendar cal)

rollSet

protected abstract long rollSet(long ld,
                                Calendar cal)

setDouble

public final void setDouble(Object row,
                            double val,
                            ConversionContext ctx)
Overrides:
setDouble in class AbstractType

setNull

public final void setNull(Object row,
                          ConversionContext ctx)
                   throws SQLException
Overrides:
setNull in class AbstractType
SQLException

setTimestamp

public final void setTimestamp(Object row,
                               Timestamp val,
                               Calendar cal,
                               ConversionContext ctx)
Specified by:
setTimestamp in class AbstractTIMESTAMP

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.