com.caucho.amber.type
Class TrueFalseType

java.lang.Object
  extended by com.caucho.amber.type.AmberType
      extended by com.caucho.amber.type.TrueFalseType

public class TrueFalseType
extends AmberType

The type of a property.


Method Summary
static TrueFalseType create()
          Returns the singleton type.
 int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index)
          Generates a string to load the property.
 void generateSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String value)
          Generates a string to set the property.
 java.lang.String getName()
          Returns the type name.
 java.lang.Object getObject(java.sql.ResultSet rs, int index)
          Gets the value.
static java.lang.Boolean toBoolean(java.lang.String value, boolean wasNull)
          Converts a value to a boolean.
 
Methods inherited from class com.caucho.amber.type.AmberType
findItem, fromObject, generateCastFromObject, generateCreateColumnSQL, generateEquals, generateIncrementVersion, generateIsNull, generateLoad, generateLoadForeign, generateLoadNative, generateNull, generateSetNull, generateSetVersion, getColumnCount, getForeignType, getForeignTypeName, getJavaTypeName, getObject, init, isAssignableTo, isAutoIncrement, isBoolean, isNumeric, setParameter, toObject, toObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static TrueFalseType create()
Returns the singleton type.


getName

public java.lang.String getName()
Returns the type name.

Specified by:
getName in class AmberType

generateLoad

public int generateLoad(JavaWriter out,
                        java.lang.String rs,
                        java.lang.String indexVar,
                        int index)
                 throws java.io.IOException
Generates a string to load the property.

Overrides:
generateLoad in class AmberType
Throws:
java.io.IOException

generateSet

public void generateSet(JavaWriter out,
                        java.lang.String pstmt,
                        java.lang.String index,
                        java.lang.String value)
                 throws java.io.IOException
Generates a string to set the property.

Overrides:
generateSet in class AmberType
Throws:
java.io.IOException

toBoolean

public static java.lang.Boolean toBoolean(java.lang.String value,
                                          boolean wasNull)
Converts a value to a boolean.


getObject

public java.lang.Object getObject(java.sql.ResultSet rs,
                                  int index)
                           throws java.sql.SQLException
Gets the value.

Overrides:
getObject in class AmberType
Throws:
java.sql.SQLException