org.melati.poem
Class AtomPoemType<T>
java.lang.Object
org.melati.poem.BasePoemType<T>
org.melati.poem.AtomPoemType<T>
- All Implemented Interfaces:
- Cloneable, PoemType, SQLPoemType, SQLType
- Direct Known Subclasses:
- BooleanPoemType, DatePoemType, DoublePoemType, FixedPointAtomPoemType, IntegerPoemType, LongPoemType, SizedAtomPoemType, TimestampPoemType
public abstract class AtomPoemType<T>
- extends BasePoemType<T>
Base class for all atomic types.
Currently all types, as generated classes are instances of IntegerPoemType.
Constructor Summary |
AtomPoemType(int sqlTypeCode,
String sqlTypeName,
boolean nullable)
Constructor. |
Methods inherited from class org.melati.poem.BasePoemType |
_assertValidRaw, _canRepresent, _getRaw, _possibleRaws, _rawOfString, _saveColumnInfo, _setRaw, assertValidCooked, assertValidRaw, canRepresent, clone, cookedOfRaw, getLimitRaw, getLowRaw, getNullable, getRaw, possibleRaws, quotedRaw, rawOfCooked, rawOfString, saveColumnInfo, setRaw, setRawRange, sqlDefinition, sqlTypeCode, sqlTypeDefinition, stringOfCooked, stringOfRaw, toString, withNullable |
sqlTypeName
protected String sqlTypeName
AtomPoemType
public AtomPoemType(int sqlTypeCode,
String sqlTypeName,
boolean nullable)
- Constructor.
- Parameters:
sqlTypeCode
- from TypessqlTypeName
- SQL Type namenullable
- whether null is an allowed value
_quotedRaw
protected String _quotedRaw(Object raw)
- Specified by:
_quotedRaw
in class BasePoemType<T>
_stringOfRaw
protected String _stringOfRaw(Object raw)
- Specified by:
_stringOfRaw
in class BasePoemType<T>
_assertValidCooked
protected void _assertValidCooked(Object cooked)
throws ValidationPoemException
- Specified by:
_assertValidCooked
in class BasePoemType<T>
- Throws:
ValidationPoemException
_cookedOfRaw
protected Object _cookedOfRaw(Object raw)
throws PoemException
- Returns the given value unchanged.
- Specified by:
_cookedOfRaw
in class BasePoemType<T>
- Parameters:
raw
- the base object or Integer object id
- Returns:
- the unchanged base object or an instantiated type
- Throws:
PoemException
_rawOfCooked
protected Object _rawOfCooked(Object cooked)
- Returns the given value unchanged.
- Specified by:
_rawOfCooked
in class BasePoemType<T>
_stringOfCooked
protected String _stringOfCooked(Object cooked,
PoemLocale locale,
int style)
- Specified by:
_stringOfCooked
in class BasePoemType<T>
_sqlDefinition
protected String _sqlDefinition(Dbms dbms)
- Specified by:
_sqlDefinition
in class BasePoemType<T>
sqlDefaultValue
public String sqlDefaultValue(Dbms dbms)
- Used to set a not null value when
creating a non nullable column.
- Parameters:
dbms
- the dbms the value is suitable for
- Returns:
- a String suitable for substitution in UPDATE table SET field = ?
- See Also:
org.melati.poem.SQLType#sqlDefaultValue()
_toString
protected String _toString()
- Specified by:
_toString
in class BasePoemType<T>
Copyright © 2000-2010 PanEris. All Rights Reserved.