org.melati.poem.dbms
Class MySQL.MySQLBooleanPoemType

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

public static class MySQL.MySQLBooleanPoemType
extends BooleanPoemType

Translates a MySQL Boolean into a Poem BooleanType.


Field Summary
 
Fields inherited from class org.melati.poem.AtomPoemType
sqlTypeName
 
Fields inherited from class org.melati.poem.BasePoemType
nullable
 
Constructor Summary
MySQL.MySQLBooleanPoemType(boolean nullable)
          Constructor.
 
Method Summary
protected  Object _getRaw(ResultSet rs, int col)
           
protected  Object _rawOfString(String rawString)
          We could use original method from BooleanPoemType, it too recognizes 0/1.
protected  void _setRaw(PreparedStatement ps, int col, Object bool)
           
 
Methods inherited from class org.melati.poem.BooleanPoemType
_assertValidRaw, _canRepresent, _possibleRaws, _saveColumnInfo, toDsdType
 
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
 

Constructor Detail

MySQL.MySQLBooleanPoemType

public MySQL.MySQLBooleanPoemType(boolean nullable)
Constructor.

Parameters:
nullable - whether nullable
Method Detail

_getRaw

protected Object _getRaw(ResultSet rs,
                         int col)
                  throws SQLException
Overrides:
_getRaw in class BooleanPoemType
Throws:
SQLException

_setRaw

protected void _setRaw(PreparedStatement ps,
                       int col,
                       Object bool)
                throws SQLException
Overrides:
_setRaw in class BooleanPoemType
Throws:
SQLException

_rawOfString

protected Object _rawOfString(String rawString)
                       throws ParsingPoemException
We could use original method from BooleanPoemType, it too recognizes 0/1. Converts a non-null string to an appropriate value for insertion into the underlying DBMS.

Overrides:
_rawOfString in class BooleanPoemType
Throws:
ParsingPoemException
See Also:
BooleanPoemType._rawOfString(java.lang.String)


Copyright © 2000-2010 PanEris. All Rights Reserved.