本文整理匯總了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);
}