本文整理汇总了Java中com.ibatis.sqlmap.client.extensions.ResultGetter类的典型用法代码示例。如果您正苦于以下问题:Java ResultGetter类的具体用法?Java ResultGetter怎么用?Java ResultGetter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResultGetter类属于com.ibatis.sqlmap.client.extensions包,在下文中一共展示了ResultGetter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: assertMaps
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的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.ResultGetter; //导入依赖的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: getValue
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getValue(ResultGetter getter) throws SQLException {
java.sql.Timestamp t = getter.getTimestamp();
if (t == null) {
return null;
}
return new java.util.Date(t.getTime());
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:9,代码来源:DateNullValueHandler.java
示例4: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
Object value = getValue(getter);
if (getter.wasNull()) {
return null;
}
return value;
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:10,代码来源:NullValueHandler.java
示例5: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
String value = getter.getString();
if (getter.wasNull()) {
return null;
}
for (StringEnumValue val : getValues()) {
if (val.getValue().equals(value)) {
return val;
}
}
throw new UnsupportedOperationException("no such value " + value);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:15,代码来源:StringEnumValueHandler.java
示例6: getValue
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getValue(ResultGetter getter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#getValue() called");
}
return getter.getInt();
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:IntegerNullValueHandler.java
示例7: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
int value = getter.getInt();
if (getter.wasNull()) {
return null;
}
for (EnumValue val : getValues()) {
if (val.getValue().intValue() == value) {
return val;
}
}
throw new UnsupportedOperationException("no such value " + value);
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:15,代码来源:EnumValueHandler.java
示例8: getValue
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getValue(ResultGetter getter) throws SQLException {
if (log.isDebugEnabled()) {
log.debug("#getValue() called");
}
return getter.getBigDecimal();
}
开发者ID:otsecbsol,项目名称:linkbinder,代码行数:8,代码来源:BigDecimalNullValueHandler.java
示例9: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
Array array = getter.getResultSet().getArray(getter.getColumnName());
if (!getter.getResultSet().wasNull()) {
printArray(array.getArray());
return array.getArray();
} else {
return null;
}
}
开发者ID:jyang,项目名称:google-feedserver,代码行数:11,代码来源:SqlArrayToArrayConverter.java
示例10: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
public Object getResult(ResultGetter resultGetter) throws SQLException {
String name = resultGetter.getString();
if (name == null) {
return null;
}
return Enum.valueOf(StageEvent.class, name);
}
开发者ID:gocd,项目名称:gocd,代码行数:8,代码来源:StageEventTypeHandlerCallback.java
示例11: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
public Object getResult(ResultGetter getter) throws SQLException {
Blob blob = getter.getBlob();
byte[] returnValue;
if (!getter.wasNull()) {
returnValue = blob.getBytes(1, (int) blob.length());
} else {
returnValue = null;
}
return returnValue;
}
开发者ID:mybatis,项目名称:ibatis-2,代码行数:11,代码来源:BlobTypeHandlerCallback.java
示例12: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
public Object getResult(ResultGetter getter) throws SQLException {
int i = getter.getInt();
if (i == 100) {
return new Boolean(true);
} else if (i == 200) {
return new Boolean(false);
} else {
throw new SQLException("Unexpected value " + i + " found where 100 or 200 was expected.");
}
}
开发者ID:mybatis,项目名称:ibatis-2,代码行数:11,代码来源:HundredsTypeHandlerCallback.java
示例13: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
public Object getResult(ResultGetter getter) throws SQLException {
String s = getter.getString();
if ("Aye".equalsIgnoreCase(s)) {
return new Boolean(true);
} else if ("Nay".equalsIgnoreCase(s)) {
return new Boolean(false);
} else {
throw new SQLException("Unexpected value " + s + " found where 'Aye' or 'Nay' was expected.");
}
}
开发者ID:mybatis,项目名称:ibatis-2,代码行数:11,代码来源:PirateTypeHandlerCallback.java
示例14: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
/**
* JDBC 의 Timestamp 로 조회된 값을 resultMap 처리 시 결과
* 객체(VO 또는 Map)의 Calendar 타입 대상 Attribute 에 세팅한다.
* @param getter
* - result set 으로 부터 현재 조회 필드를 얻을 수
* 있도록(칼럼명이나 index 없이도) 지원하는 ibatis 의
* ResultGetter
* @return Calendar 타입 결과 Attribute
* @exception SQLException
*/
public Object getResult(ResultGetter getter) throws SQLException {
if (getter.wasNull())
return null;
java.util.Calendar cal = java.util.Calendar.getInstance();
java.sql.Timestamp ts = getter.getTimestamp(cal);
cal.setTime(ts);
return cal;
}
开发者ID:eGovFrame,项目名称:egovframework.rte.root,代码行数:22,代码来源:CalendarTypeHandler.java
示例15: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), ChannelParameter.class);
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:5,代码来源:ChannelParameterTypeHandler.java
示例16: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), SystemParameter.class);
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:5,代码来源:SystemParameterTypeHandler.java
示例17: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), PipelineParameter.class);
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:5,代码来源:PipelineParameterTypeHandler.java
示例18: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), new TypeReference<List<Long>>() {
});
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:6,代码来源:ListTypeHandler.java
示例19: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), Map.class);
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:5,代码来源:MapTypeHandler.java
示例20: getResult
import com.ibatis.sqlmap.client.extensions.ResultGetter; //导入依赖的package包/类
@Override
public Object getResult(ResultGetter getter) throws SQLException {
return JsonUtils.unmarshalFromString(getter.getString(), AlarmRuleParameter.class);
}
开发者ID:luoyaogui,项目名称:otter-G,代码行数:5,代码来源:AlarmRuleParameterTypeHandler.java
注:本文中的com.ibatis.sqlmap.client.extensions.ResultGetter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论