org.tinygroup.dbrouter.util
类 ParamObjectBuilder
java.lang.Object
org.tinygroup.dbrouter.util.ParamObjectBuilder
public class ParamObjectBuilder
- extends Object
功能说明:用于prepare以及resultset curd操作参数赋值
系统版本: v1.0
开发人员: renhui
开发时间: 2014-1-9
|
方法摘要 |
void |
addDateParamterObject(int parameterIndex,
Date value,
Calendar cal)
|
void |
addInputStreamParamterObject(int parameterIndex,
InputStream value,
int length,
boolean asciiStream)
|
void |
addNullParamterObject(int parameterIndex,
int sqlType)
|
void |
addNullParamterObject(int parameterIndex,
int sqlType,
String typeName)
|
void |
addParamterObject(int parameterIndex,
Object value)
|
void |
addParamterObject(int parameterIndex,
Object value,
int targetSqlType)
|
void |
addParamterObject(int parameterIndex,
Object value,
int targetSqlType,
int scale)
|
void |
addReaderParamterObject(int parameterIndex,
Reader value,
int length)
|
void |
addTimeParamterObject(int parameterIndex,
Time value,
Calendar cal)
|
void |
addTimestampParamterObject(int parameterIndex,
Timestamp value,
Calendar cal)
|
void |
clear()
|
void |
expandParam()
|
int |
getParameterCount()
|
Object |
getParamValue(int columnIndex)
获取字段对应的参数值 |
Object[] |
getPreparedParams()
|
void |
removeParameterObject(int parameterIndex,
Object value)
|
void |
setParamters(PreparedStatement preparedStatement)
|
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParamObjectBuilder
public ParamObjectBuilder(int paramNumber)
expandParam
public void expandParam()
addParamterObject
public void addParamterObject(int parameterIndex,
Object value)
throws SQLException
- 抛出:
SQLException
addNullParamterObject
public void addNullParamterObject(int parameterIndex,
int sqlType)
throws SQLException
- 抛出:
SQLException
addNullParamterObject
public void addNullParamterObject(int parameterIndex,
int sqlType,
String typeName)
throws SQLException
- 抛出:
SQLException
addParamterObject
public void addParamterObject(int parameterIndex,
Object value,
int targetSqlType)
throws SQLException
- 抛出:
SQLException
addInputStreamParamterObject
public void addInputStreamParamterObject(int parameterIndex,
InputStream value,
int length,
boolean asciiStream)
throws SQLException
- 抛出:
SQLException
addReaderParamterObject
public void addReaderParamterObject(int parameterIndex,
Reader value,
int length)
throws SQLException
- 抛出:
SQLException
addDateParamterObject
public void addDateParamterObject(int parameterIndex,
Date value,
Calendar cal)
throws SQLException
- 抛出:
SQLException
addTimeParamterObject
public void addTimeParamterObject(int parameterIndex,
Time value,
Calendar cal)
throws SQLException
- 抛出:
SQLException
addTimestampParamterObject
public void addTimestampParamterObject(int parameterIndex,
Timestamp value,
Calendar cal)
throws SQLException
- 抛出:
SQLException
addParamterObject
public void addParamterObject(int parameterIndex,
Object value,
int targetSqlType,
int scale)
throws SQLException
- 抛出:
SQLException
removeParameterObject
public void removeParameterObject(int parameterIndex,
Object value)
throws SQLException
- 抛出:
SQLException
clear
public void clear()
setParamters
public void setParamters(PreparedStatement preparedStatement)
throws SQLException
- 抛出:
SQLException
getPreparedParams
public Object[] getPreparedParams()
getParameterCount
public int getParameterCount()
getParamValue
public Object getParamValue(int columnIndex)
- 获取字段对应的参数值
- 参数:
columnIndex - 列序号 如1、2、3
- 返回:
Copyright © 2006–2015 TinyGroup. All rights reserved.