se.unlogic.standardutils.dao
Class PreparedStatementQueryMethods

java.lang.Object
  extended by se.unlogic.standardutils.dao.PreparedStatementQueryMethods

public class PreparedStatementQueryMethods
extends Object

This class provides a static map containing mappings from classes to their corresponding set methods in the PreparedStatement interface.

Integer, Long, Double, Float, Boolean and Byte types are mapped to the setObject method in order to allow null values.

All other types are mapped to their default set method in the PreparedStatement interface.

Author:
Robert "Unlogic" Olofsson (unlogic@unlogic.se)

Field Summary
protected static HashMap<Class<?>,Method> QUERY_METHOD_MAP
           
protected static Method SET_OBJECT_METHOD
           
 
Constructor Summary
PreparedStatementQueryMethods()
           
 
Method Summary
static Method getObjectQueryMethod()
           
static Method getQueryMethod(Class<?> clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QUERY_METHOD_MAP

protected static final HashMap<Class<?>,Method> QUERY_METHOD_MAP

SET_OBJECT_METHOD

protected static final Method SET_OBJECT_METHOD
Constructor Detail

PreparedStatementQueryMethods

public PreparedStatementQueryMethods()
Method Detail

getQueryMethod

public static Method getQueryMethod(Class<?> clazz)

getObjectQueryMethod

public static Method getObjectQueryMethod()


Copyright © 2011. All Rights Reserved.