org.melati.poem
Class DatePoemType

Package class diagram package DatePoemType
java.lang.Object
  extended by org.melati.poem.BasePoemType<T>
      extended by org.melati.poem.AtomPoemType
          extended by org.melati.poem.DatePoemType
All Implemented Interfaces:
Cloneable, PoemType, SQLPoemType, SQLType

public class DatePoemType
extends AtomPoemType

A type for Normal dates.


Field Summary
 
Fields inherited from class org.melati.poem.AtomPoemType
sqlTypeName
 
Fields inherited from class org.melati.poem.BasePoemType
nullable
 
Constructor Summary
DatePoemType(boolean nullable)
          Constructor.
DatePoemType(int sqlTypeCode, String sqlTypeName, boolean nullable)
          Constructor.
 
Method Summary
protected  void _assertValidRaw(Object raw)
           
protected  boolean _canRepresent(SQLPoemType other)
           
protected  Object _getRaw(ResultSet rs, int col)
           
protected  Object _rawOfString(String raw)
          HACK reformat DDMMYYYY dates to YYYY-MM-DD
protected  void _saveColumnInfo(ColumnInfo columnInfo)
           
protected  void _setRaw(PreparedStatement ps, int col, Object raw)
           
protected  String _stringOfCooked(Object cooked, PoemLocale locale, int style)
           
 String toDsdType()
          The field type used in the Data Structure Definition language.
 
Methods inherited from class org.melati.poem.AtomPoemType
_assertValidCooked, _cookedOfRaw, _quotedRaw, _rawOfCooked, _sqlDefinition, _stringOfRaw, _toString, sqlDefaultValue
 
Methods inherited from class org.melati.poem.BasePoemType
_possibleRaws, assertValidCooked, assertValidRaw, canRepresent, clone, cookedOfRaw, getLimitRaw, getLowRaw, getNullable, getRaw, possibleRaws, quotedRaw, rawOfCooked, rawOfString, saveColumnInfo, setRaw, setRawRange, sqlDefinition, sqlTypeCode, sqlTypeDefinition, stringOfCooked, stringOfRaw, toString, withNullable
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatePoemType

public DatePoemType(boolean nullable)
Constructor.

Parameters:
nullable - whether this type may contain null.

DatePoemType

public DatePoemType(int sqlTypeCode,
                    String sqlTypeName,
                    boolean nullable)
Constructor.

See Also:
org.melati.poem.dbms.SQLServer.SQLServerDatePoemType
Method Detail

_assertValidRaw

protected void _assertValidRaw(Object raw)
Specified by:
_assertValidRaw in class BasePoemType

_getRaw

protected Object _getRaw(ResultSet rs,
                         int col)
                  throws SQLException
Specified by:
_getRaw in class BasePoemType
Throws:
SQLException

_setRaw

protected void _setRaw(PreparedStatement ps,
                       int col,
                       Object raw)
                throws SQLException
Specified by:
_setRaw in class BasePoemType
Throws:
SQLException

_rawOfString

protected Object _rawOfString(String raw)
HACK reformat DDMMYYYY dates to YYYY-MM-DD

Specified by:
_rawOfString in class BasePoemType
See Also:
BasePoemType._rawOfString(java.lang.String)

_stringOfCooked

protected String _stringOfCooked(Object cooked,
                                 PoemLocale locale,
                                 int style)
Overrides:
_stringOfCooked in class AtomPoemType

_canRepresent

protected boolean _canRepresent(SQLPoemType other)
Specified by:
_canRepresent in class BasePoemType

toDsdType

public String toDsdType()
The field type used in the Data Structure Definition language. The field type used in the Data Structure Definition language.

Returns:
the Type name
See Also:
PoemType.toDsdType()

_saveColumnInfo

protected void _saveColumnInfo(ColumnInfo columnInfo)
                        throws AccessPoemException
Specified by:
_saveColumnInfo in class BasePoemType
Throws:
AccessPoemException


Copyright © 2000-2010 PanEris. All Rights Reserved.