com.caucho.amber.type
Class PrimitiveBooleanType

java.lang.Object
  extended by com.caucho.amber.type.AmberType
      extended by com.caucho.amber.type.PrimitiveType
          extended by com.caucho.amber.type.PrimitiveBooleanType

public class PrimitiveBooleanType
extends PrimitiveType

The type of a property.


Method Summary
static PrimitiveBooleanType create()
          Returns the boolean type.
 java.lang.String generateCastFromObject(java.lang.String value)
          Converts the value.
 java.lang.String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale)
          Generates the type for the table.
 java.lang.String generateIsNull(java.lang.String value)
          Returns a test for null.
 int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index)
          Generates a string to load the property.
 int generateLoadNative(JavaWriter out, 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.
 void generateSetNull(JavaWriter out, java.lang.String pstmt, java.lang.String index)
          Generates a string to set the property.
 AmberType getForeignType()
          Returns the foreign key type.
 java.lang.String getName()
          Returns the type name.
 boolean isBoolean()
          Returns true for a boolean type.
 java.lang.String toObject(java.lang.String value)
          Converts to an object.
 
Methods inherited from class com.caucho.amber.type.PrimitiveType
generateEquals, generateNull
 
Methods inherited from class com.caucho.amber.type.AmberType
findItem, fromObject, generateIncrementVersion, generateLoad, generateLoadForeign, generateSetVersion, getColumnCount, getForeignTypeName, getJavaTypeName, getObject, getObject, init, isAssignableTo, isAutoIncrement, isNumeric, setParameter, toObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static PrimitiveBooleanType create()
Returns the boolean type.


getName

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

Specified by:
getName in class AmberType

getForeignType

public AmberType getForeignType()
Returns the foreign key type.

Overrides:
getForeignType in class AmberType

isBoolean

public boolean isBoolean()
Returns true for a boolean type.

Overrides:
isBoolean in class AmberType

generateCreateColumnSQL

public java.lang.String generateCreateColumnSQL(AmberPersistenceUnit manager,
                                                int length,
                                                int precision,
                                                int scale)
Generates the type for the table.

Overrides:
generateCreateColumnSQL 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

generateLoadNative

public int generateLoadNative(JavaWriter out,
                              int index)
                       throws java.io.IOException
Generates a string to load the property.

Overrides:
generateLoadNative 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

generateSetNull

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

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

toObject

public java.lang.String toObject(java.lang.String value)
Converts to an object.

Overrides:
toObject in class AmberType

generateCastFromObject

public java.lang.String generateCastFromObject(java.lang.String value)
Converts the value.

Overrides:
generateCastFromObject in class AmberType

generateIsNull

public java.lang.String generateIsNull(java.lang.String value)
Returns a test for null.

Overrides:
generateIsNull in class PrimitiveType