org.melati.poem
Class IntegerPoemType<T>

Package class diagram package IntegerPoemType
java.lang.Object
  extended by org.melati.poem.BasePoemType<T>
      extended by org.melati.poem.AtomPoemType<T>
          extended by org.melati.poem.IntegerPoemType<T>
All Implemented Interfaces:
Cloneable, PoemType, SQLPoemType, SQLType
Direct Known Subclasses:
IndexPoemType, TroidPoemType

public class IntegerPoemType<T>
extends AtomPoemType<T>

Plain old integers, the range being contingent on the underlying SQL type.


Field Summary
static IntegerPoemType nullableInstance
          Instance of a nullable IntegerPoemType.
 
Fields inherited from class org.melati.poem.AtomPoemType
sqlTypeName
 
Fields inherited from class org.melati.poem.BasePoemType
nullable
 
Constructor Summary
  IntegerPoemType(boolean nullable)
          Constructor.
protected IntegerPoemType(int sqlTypeCode, String sqlTypeName, boolean nullable)
           
 
Method Summary
protected  void _assertValidRaw(Object raw)
           
protected  boolean _canRepresent(SQLPoemType other)
          
protected  Object _getRaw(ResultSet rs, int col)
           
protected  Enumeration _possibleRaws()
           
protected  Object _rawOfString(String rawString)
          Converts a non-null string to an appropriate value for insertion into the underlying DBMS.
protected  void _saveColumnInfo(ColumnInfo columnInfo)
           
protected  void _setRaw(PreparedStatement ps, int col, Object integer)
           
 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, _stringOfCooked, _stringOfRaw, _toString, sqlDefaultValue
 
Methods inherited from class org.melati.poem.BasePoemType
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
 

Field Detail

nullableInstance

public static final IntegerPoemType nullableInstance
Instance of a nullable IntegerPoemType.

Constructor Detail

IntegerPoemType

public IntegerPoemType(boolean nullable)
Constructor.

Parameters:
nullable - whether nullable or not

IntegerPoemType

protected IntegerPoemType(int sqlTypeCode,
                          String sqlTypeName,
                          boolean nullable)
Method Detail

_possibleRaws

protected Enumeration _possibleRaws()
Overrides:
_possibleRaws in class BasePoemType<T>
To do something:
Do down-counting?

_assertValidRaw

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

_getRaw

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

_setRaw

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

_rawOfString

protected Object _rawOfString(String rawString)
                       throws ParsingPoemException
Description copied from class: BasePoemType
Converts a non-null string to an appropriate value for insertion into the underlying DBMS.

Specified by:
_rawOfString in class BasePoemType<T>
Throws:
ParsingPoemException

_canRepresent

protected boolean _canRepresent(SQLPoemType other)

Specified by:
_canRepresent in class BasePoemType<T>
See Also:
BasePoemType._canRepresent(org.melati.poem.SQLPoemType)

toDsdType

public String toDsdType()
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<T>
Throws:
AccessPoemException


Copyright © 2000-2010 PanEris. All Rights Reserved.