com.ninja_squad.dbsetup.bind
Class Binders

java.lang.Object
  extended by com.ninja_squad.dbsetup.bind.Binders

public final class Binders
extends java.lang.Object

Utility class allowing to get various kinds of binders. The DefaultBinderConfiguration uses binders returned by this class, based on the type of the parameter.


Method Summary
static Binder dateBinder()
          Returns a binder suitable for columns of type DATE.
static Binder decimalBinder()
          Returns a binder suitable for numeric, decimal columns.
static Binder defaultBinder()
          Returns the default binder, which uses stmt.setObject() to bind the parameter.
static Binder integerBinder()
          Returns a binder suitable for numeric, integer columns.
static Binder stringBinder()
          Returns a binder suitable for columns of type CHAR and VARCHAR.
static Binder timeBinder()
          Returns a binder suitable for columns of type TIME.
static Binder timestampBinder()
          Returns a binder suitable for columns of type TIMESTAMP.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

defaultBinder

public static Binder defaultBinder()
Returns the default binder, which uses stmt.setObject() to bind the parameter.


stringBinder

public static Binder stringBinder()
Returns a binder suitable for columns of type CHAR and VARCHAR. The returned binder supports values of type


dateBinder

public static Binder dateBinder()
Returns a binder suitable for columns of type DATE. The returned binder supports values of type If the value is none of these types, stmt.setObject() is used to bind the value.


timestampBinder

public static Binder timestampBinder()
Returns a binder suitable for columns of type TIMESTAMP. The returned binder supports values of type If the value is none of these types, stmt.setObject() is used to bind the value.


timeBinder

public static Binder timeBinder()
Returns a binder suitable for columns of type TIME. The returned binder supports values of type If the value is none of these types, stmt.setObject() is used to bind the value.


decimalBinder

public static Binder decimalBinder()
Returns a binder suitable for numeric, decimal columns. The returned binder supports values of type If the value is none of these types, stmt.setObject() is used to bind the value.


integerBinder

public static Binder integerBinder()
Returns a binder suitable for numeric, integer columns. The returned binder supports values of type If the value is none of these types, stmt.setObject() is used to bind the value.