本文整理汇总了Java中java.sql.CallableStatement.getObject方法的典型用法代码示例。如果您正苦于以下问题:Java CallableStatement.getObject方法的具体用法?Java CallableStatement.getObject怎么用?Java CallableStatement.getObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.sql.CallableStatement
的用法示例。
在下文中一共展示了CallableStatement.getObject方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getResult
import java.sql.CallableStatement; //导入方法依赖的package包/类
public Object getResult(CallableStatement cs, int columnIndex) throws SQLException {
Object obj = cs.getObject(columnIndex);
if (cs.wasNull()) {
return null;
}
else {
return obj;
}
}
示例2: getResultSet
import java.sql.CallableStatement; //导入方法依赖的package包/类
@Override
public ResultSet getResultSet(CallableStatement ps) throws SQLException {
ps.execute();
return (ResultSet) ps.getObject( 1 );
}
示例3: getResultSet
import java.sql.CallableStatement; //导入方法依赖的package包/类
public ResultSet getResultSet(CallableStatement statement, int resultSetParamIndex) {
try {
return (ResultSet) statement.getObject(resultSetParamIndex);
} catch (SQLException e) {
throw new CallException(e);
}
}
示例4: getNullableResult
import java.sql.CallableStatement; //导入方法依赖的package包/类
public T getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
PGgeometry pGgeometry = (PGgeometry) cs.getObject(columnIndex);
if (pGgeometry == null) {
return null;
}
return (T) pGgeometry.getGeometry();
}
示例5: extract
import java.sql.CallableStatement; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public T extract(CallableStatement statement) {
if ( mode == ParameterMode.IN ) {
throw new ParameterMisuseException( "IN parameter not valid for output extraction" );
}
else if ( mode == ParameterMode.REF_CURSOR ) {
throw new ParameterMisuseException( "REF_CURSOR parameters should be accessed via results" );
}
try {
if ( ProcedureParameterExtractionAware.class.isInstance( hibernateType ) ) {
return (T) ( (ProcedureParameterExtractionAware) hibernateType ).extract( statement, startIndex, session() );
}
else {
return (T) statement.getObject( startIndex );
}
}
catch (SQLException e) {
throw procedureCall.getSession().getFactory().getSQLExceptionHelper().convert(
e,
"Unable to extract OUT/INOUT parameter value"
);
}
}
示例6: getNullableResult
import java.sql.CallableStatement; //导入方法依赖的package包/类
@Override
public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
Object s = cs.getObject(columnIndex);
return this.findObject(s);
}
示例7: getNullableResult
import java.sql.CallableStatement; //导入方法依赖的package包/类
@Override
public Object getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return cs.getObject(columnIndex);
}
示例8: getNullableResult
import java.sql.CallableStatement; //导入方法依赖的package包/类
@Override
public UUID getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return (UUID) cs.getObject(columnIndex);
}