net.sf.farrago.type.runtime
Class SqlDateTimeWithoutTZ.SqlTimestamp

java.lang.Object
  extended by net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ
      extended by net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ.SqlTimestamp
All Implemented Interfaces:
AssignableValue, DataValue, SpecialDataValue
Enclosing class:
SqlDateTimeWithoutTZ

public static class SqlDateTimeWithoutTZ.SqlTimestamp
extends SqlDateTimeWithoutTZ

SQL timestamp value.


Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ
SqlDateTimeWithoutTZ.SqlDate, SqlDateTimeWithoutTZ.SqlTime, SqlDateTimeWithoutTZ.SqlTimestamp
 
Field Summary
protected  ZonelessDate currentDate
          The current date as returned by the current_date context variable
 
Fields inherited from class net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ
ADJUST_PRECISION_METHOD_NAME, CEIL_METHOD_NAME, DateFormatStr, FLOOR_METHOD_NAME, INTERNAL_TIME_FIELD_NAME, isNull, TimeFormatStr, TimestampFormatStr, value
 
Fields inherited from interface net.sf.farrago.type.runtime.AssignableValue
ASSIGNMENT_METHOD_NAME
 
Constructor Summary
SqlDateTimeWithoutTZ.SqlTimestamp()
          Constructs a SqlTimestamp.
 
Method Summary
 void assignFrom(Object o)
          Assigns a value from another object.
protected  void assignFromString(String s, String format, TimeZone timeZone)
          Assigns the value from a string.
protected  String getFormat()
          Returns the format string for this type.
protected  Object getJdbcValue()
          Gets data, casted as a Jdbc value.
protected  String getTypeName()
          Returns the name of this type: DATE, TIME, or TIMESTAMP.
 void setCurrentDate(SqlDateTimeWithoutTZ date)
          Sets the current date for use by time to timestamp conversion
 
Methods inherited from class net.sf.farrago.type.runtime.SqlDateTimeWithoutTZ
adjustPrecision, assignFrom, assignFrom, ceil, ceil, floor, floor, getCal, getClientTimeZone, getNullableData, getPrimitiveClass, getSpecialData, getTempCal, getValueTimeZone, isNull, setCal, setNull, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

currentDate

protected ZonelessDate currentDate
The current date as returned by the current_date context variable

Constructor Detail

SqlDateTimeWithoutTZ.SqlTimestamp

public SqlDateTimeWithoutTZ.SqlTimestamp()
Constructs a SqlTimestamp.

Method Detail

setCurrentDate

public void setCurrentDate(SqlDateTimeWithoutTZ date)
Sets the current date for use by time to timestamp conversion

Parameters:
date - the value of the current_date context variable

assignFrom

public void assignFrom(Object o)
Description copied from class: SqlDateTimeWithoutTZ
Assigns a value from another object.

The Object may be a Long or long if it is being intialized from a constant, or being translated from a Fennel value. If so, then the Fennel type must match the Farrago type. It is legal to assign a ZonelessDate to a ZonelessDate and a ZonelessTime to a ZonelessTime, but it is not valid to assign a Timestamp to either, or vice versa.

Specified by:
assignFrom in interface AssignableValue
Overrides:
assignFrom in class SqlDateTimeWithoutTZ
Parameters:
o - value to assign, or null to set null

getJdbcValue

protected Object getJdbcValue()
Description copied from class: SqlDateTimeWithoutTZ
Gets data, casted as a Jdbc value.

Specified by:
getJdbcValue in class SqlDateTimeWithoutTZ

assignFromString

protected void assignFromString(String s,
                                String format,
                                TimeZone timeZone)
Description copied from class: SqlDateTimeWithoutTZ
Assigns the value from a string.

Specified by:
assignFromString in class SqlDateTimeWithoutTZ
Parameters:
s - a string representing a datetime in the given format
format - format string as per SimpleDateFormat, not null
timeZone - target timezone

getFormat

protected String getFormat()
Description copied from class: SqlDateTimeWithoutTZ
Returns the format string for this type.

Specified by:
getFormat in class SqlDateTimeWithoutTZ

getTypeName

protected String getTypeName()
Description copied from class: SqlDateTimeWithoutTZ
Returns the name of this type: DATE, TIME, or TIMESTAMP.

Specified by:
getTypeName in class SqlDateTimeWithoutTZ