本文整理汇总了Java中com.ibatis.sqlmap.client.extensions.ParameterSetter类的典型用法代码示例。如果您正苦于以下问题:Java ParameterSetter类的具体用法?Java ParameterSetter怎么用?Java ParameterSetter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterSetter类属于com.ibatis.sqlmap.client.extensions包,在下文中一共展示了ParameterSetter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: assertMaps
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
private void assertMaps(final String str, StageResult value) throws SQLException {
final ResultGetter resultGetter;
Mockery context = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
resultGetter = context.mock(ResultGetter.class);
context.checking(new Expectations() {
{
one(resultGetter).getString();
will(returnValue(str));
}
});
StageResult result = (StageResult) callback.getResult(resultGetter);
assertThat(result, is(equal(value)));
final ParameterSetter parameterSetter = context.mock(ParameterSetter.class);
context.checking(new Expectations() {
{
one(parameterSetter).setString(str);
}
});
callback.setParameter(parameterSetter, value);
}
开发者ID:gocd,项目名称:gocd,代码行数:26,代码来源:StageResultTypeHandlerCallbackTest.java
示例2: assertMaps
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
private void assertMaps(final String str, StageState value) throws SQLException {
final ResultGetter resultGetter;
Mockery context = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
resultGetter = context.mock(ResultGetter.class);
context.checking(new Expectations() {
{
one(resultGetter).getString();
will(returnValue(str));
}
});
StageState result = (StageState) callback.getResult(resultGetter);
assertThat(result, is(equal(value)));
final ParameterSetter parameterSetter = context.mock(ParameterSetter.class);
context.checking(new Expectations() {
{
one(parameterSetter).setString(str);
}
});
callback.setParameter(parameterSetter, value);
}
开发者ID:gocd,项目名称:gocd,代码行数:26,代码来源:StageStateTypeHandlerCallbackTest.java
示例3: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
/**
* Java 의 String 타입(yyyyMMddHHmmss 형식으로 format
* 맞춰진)으로 세팅된 입력 객체(VO 또는 Map)의 특정 Attribute 로 부터
* parameterMap(inline parameterMap) 처리 시 JDBC 의
* Timestamp 로 처리한다.
* @param setter
* - prepared statement 의 현재 바인드 변수에 대한 값
* 세팅을 지원하는(index 없이) ibatis 의
* ParameterSetter
* @param parameter
* - 입력 객체
* @exception SQLException
*/
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (parameter == null) {
setter.setNull(java.sql.Types.DATE);
} else {
try {
Timestamp ts =
new Timestamp(sdf.parse((String) parameter).getTime());
setter.setTimestamp(ts);
} catch (ParseException e) {
throw new SQLException(
"Error parsing string to timestamp. Cause: "
+ e.getMessage());
}
}
}
开发者ID:eGovFrame,项目名称:egovframework.rte.root,代码行数:31,代码来源:StringTimestampTypeHandler.java
示例4: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setParameter(ParameterSetter setter, Object parameter) throws SQLException {
if (isNull(parameter)) {
setNull(setter, parameter);
} else {
setValue(setter, parameter);
}
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:9,代码来源:NullValueHandler.java
示例5: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setParameter(ParameterSetter setter, Object parameter) throws SQLException {
if (parameter == null) {
setter.setNull(Types.VARCHAR);
} else {
StringEnumValue val = (StringEnumValue) parameter;
setter.setString(val.getValue());
}
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:10,代码来源:StringEnumValueHandler.java
示例6: setNull
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setNull(ParameterSetter setter, Object parameter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#setNull() called");
}
setter.setNull(Types.INTEGER);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:IntegerNullValueHandler.java
示例7: setValue
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setValue(ParameterSetter setter, Object parameter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#setValue() called");
}
setter.setInt((Integer) parameter);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:IntegerNullValueHandler.java
示例8: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setParameter(ParameterSetter setter, Object parameter) throws SQLException {
if (parameter == null) {
setter.setNull(Types.INTEGER);
} else {
EnumValue val = (EnumValue) parameter;
setter.setInt(val.getValue());
}
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:10,代码来源:EnumValueHandler.java
示例9: setNull
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setNull(ParameterSetter setter, Object parameter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#setNull() called");
}
setter.setNull(Types.DECIMAL);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:BigDecimalNullValueHandler.java
示例10: setValue
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
@Override
public void setValue(ParameterSetter setter, Object parameter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#setValue() called");
}
setter.setBigDecimal((BigDecimal) parameter);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:BigDecimalNullValueHandler.java
示例11: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (parameter == null || parameter == Sense.UNKNOWN)
setter.setNull(java.sql.Types.TINYINT);
else
setter.setShort(((Sense)parameter).getShortVal());
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:8,代码来源:MsEnzymeDAOImpl.java
示例12: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
ProteinferStatus status = (ProteinferStatus) parameter;
if (status == null)
setter.setNull(java.sql.Types.CHAR);
else
setter.setString(String.valueOf(status.getStatusChar()));
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:9,代码来源:ProteinferRunDAO.java
示例13: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
ProteinUserValidation validation = (ProteinUserValidation) parameter;
if (validation == null)
//setter.setNull(java.sql.Types.CHAR);
setter.setString(String.valueOf(ProteinUserValidation.UNVALIDATED.getStatusChar()));
else
setter.setString(String.valueOf(validation.getStatusChar()));
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:10,代码来源:ProteinferProteinDAO.java
示例14: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
InputType inputType = (InputType) parameter;
if (inputType == null)
setter.setNull(java.sql.Types.CHAR);
else
setter.setString(String.valueOf(inputType.getShortName()));
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:9,代码来源:ProteinferInputDAO.java
示例15: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (parameter == null)
setter.setNull(java.sql.Types.VARCHAR);
else
setter.setString(((SearchFileFormat)parameter).name());
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:8,代码来源:MsRunSearchDAOImpl.java
示例16: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (parameter == null)
setter.setNull(java.sql.Types.VARCHAR);
else
setter.setString(((Program)parameter).name());
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:8,代码来源:MsSearchDAOImpl.java
示例17: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
ValidationStatus status = (ValidationStatus) parameter;
if (status == null || status == ValidationStatus.UNKNOWN)
setter.setNull(java.sql.Types.CHAR);
else
setter.setString(Character.toString(status.getStatusChar()));
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:9,代码来源:MsSearchResultDAOImpl.java
示例18: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
Character status = (Character) parameter;
if (status == null || status.charValue() == 0)
setter.setNull(java.sql.Types.CHAR);
else
setter.setString(status.toString());
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:9,代码来源:MsSearchModificationDAOImpl.java
示例19: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
String type = dataConversionTypeToTrueFalse((DataConversionType)parameter);
if (type == null)
setter.setNull(java.sql.Types.CHAR);
else
setter.setString(type);
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:9,代码来源:MsScanDAOImpl.java
示例20: setParameter
import com.ibatis.sqlmap.client.extensions.ParameterSetter; //导入依赖的package包/类
public void setParameter(ParameterSetter setter, Object parameter)
throws SQLException {
if (parameter == null)
setter.setNull(java.sql.Types.VARCHAR);
else
setter.setString(((RunFileFormat)parameter).name());
}
开发者ID:yeastrc,项目名称:msdapl,代码行数:8,代码来源:MsRunDAOImpl.java
注:本文中的com.ibatis.sqlmap.client.extensions.ParameterSetter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论