railo.runtime.db
Class SQLCaster

java.lang.Object
  extended by railo.runtime.db.SQLCaster

public final class SQLCaster
extends Object

SQL Caster


Method Summary
static void setValue(PreparedStatement stat, int parameterIndex, SQLItem item)
           
static Object toCFType(Object value)
           
static Object toCFType(Object value, int type)
           
static Object toCFType(Object value, Object defaultValue)
           
static Object toCFTypeEL(SQLItem item)
           
static Object toCFTypex(SQLItem item)
          cast a Value to a correspondance CF Type
static int toIntType(String strType)
          cast a String SQL Type to int Type
static Object toSqlType(SQLItem item)
          sets a Value to a PreparedStatement
static String toString(SQLItem item)
          Cast a SQL Item to a String (Display) Value
static String toStringType(int type)
          returns CF SQL Type as String
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

toSqlType

public static Object toSqlType(SQLItem item)
                        throws PageException,
                               DatabaseException
sets a Value to a PreparedStatement

Parameters:
stat -
parameterIndex -
item -
Throws:
SQLException
PageException
DatabaseException

setValue

public static void setValue(PreparedStatement stat,
                            int parameterIndex,
                            SQLItem item)
                     throws PageException,
                            SQLException,
                            DatabaseException
Throws:
PageException
SQLException
DatabaseException

toString

public static String toString(SQLItem item)
Cast a SQL Item to a String (Display) Value

Parameters:
item -
Returns:
String Value

toCFTypex

public static Object toCFTypex(SQLItem item)
                        throws PageException
cast a Value to a correspondance CF Type

Parameters:
item -
Returns:
cf type
Throws:
PageException

toCFTypeEL

public static Object toCFTypeEL(SQLItem item)

toCFType

public static Object toCFType(Object value,
                              Object defaultValue)

toCFType

public static Object toCFType(Object value)
                       throws PageException
Throws:
PageException

toCFType

public static Object toCFType(Object value,
                              int type)
                       throws PageException
Throws:
PageException

toStringType

public static String toStringType(int type)
                           throws DatabaseException
returns CF SQL Type as String

Parameters:
type -
Returns:
SQL Type as String
Throws:
DatabaseException

toIntType

public static int toIntType(String strType)
                     throws DatabaseException
cast a String SQL Type to int Type

Parameters:
strType -
Returns:
SQL Type as int
Throws:
DatabaseException


Copyright © 2012 Railo