net.hasor.jdbc.core.util
类 StatementSetterUtils

java.lang.Object
  继承者 net.hasor.jdbc.core.util.StatementSetterUtils

public class StatementSetterUtils
extends Object

版本:
: 2013-10-15
作者:
赵永春(zyc@hasor.net)

构造方法摘要
StatementSetterUtils()
           
 
方法摘要
static void cleanupParameters(Collection paramValues)
          Clean up all resources held by parameter values which were passed to an execute method.
static void cleanupParameters(Object[] paramValues)
          Clean up all resources held by parameter values which were passed to an execute method.
static int javaTypeToSqlParameterType(Class<?> javaType)
          根据 Java 类型Derive a default SQL type from the given Java type.
static void setParameterValue(PreparedStatement ps, int parameterPosition, int sqlType, Object inValue)
           
static void setParameterValue(PreparedStatement ps, int parameterPosition, SqlParameter paramValue, Object inValue)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

StatementSetterUtils

public StatementSetterUtils()
方法详细信息

javaTypeToSqlParameterType

public static int javaTypeToSqlParameterType(Class<?> javaType)
根据 Java 类型Derive a default SQL type from the given Java type.


setParameterValue

public static void setParameterValue(PreparedStatement ps,
                                     int parameterPosition,
                                     SqlParameter paramValue,
                                     Object inValue)
                              throws SQLException
抛出:
SQLException

setParameterValue

public static void setParameterValue(PreparedStatement ps,
                                     int parameterPosition,
                                     int sqlType,
                                     Object inValue)
                              throws SQLException
抛出:
SQLException

cleanupParameters

public static void cleanupParameters(Object[] paramValues)
Clean up all resources held by parameter values which were passed to an execute method. This is for example important for closing LOB values.

参数:
paramValues - parameter values supplied. May be null.
另请参见:
DisposableSqlTypeValue.cleanup(), org.noe.lib.jdbcorm.jdbc.core.support.SqlLobValue#cleanup()

cleanupParameters

public static void cleanupParameters(Collection paramValues)
Clean up all resources held by parameter values which were passed to an execute method. This is for example important for closing LOB values.

参数:
paramValues - parameter values supplied. May be null.
另请参见:
DisposableSqlTypeValue.cleanup(), org.noe.lib.jdbcorm.jdbc.core.support.SqlLobValue#cleanup()


Copyright © 2013-2014. All Rights Reserved.