/** * Returns the resultType if set if not set returns the default * java.sql.ResultSet.TYPE_FORWARD_ONLY */ static int getResultType(StatementAttrs attrs) { int rsType; if (attrs != null && attrs.isSetResultSetType()) { rsType = attrs.getResultSetType(); } else { rsType = gfxdConstants.DEFAULT_RESULTSET_TYPE; } switch (rsType) { case gfxdConstants.RESULTSET_TYPE_FORWARD_ONLY: return ResultSet.TYPE_FORWARD_ONLY; case gfxdConstants.RESULTSET_TYPE_INSENSITIVE: return ResultSet.TYPE_SCROLL_INSENSITIVE; case gfxdConstants.RESULTSET_TYPE_SENSITIVE: return ResultSet.TYPE_SCROLL_SENSITIVE; default: throw new InternalGemFireError("unknown resultSet type " + attrs.getResultSetType()); } }
/** * Returns the resultType if set if not set returns the default * java.sql.ResultSet.TYPE_FORWARD_ONLY */ static int getResultType(StatementAttrs attrs) { int rsType; if (attrs != null && attrs.isSetResultSetType()) { rsType = attrs.getResultSetType(); } else { rsType = gfxdConstants.DEFAULT_RESULTSET_TYPE; } switch (rsType) { case gfxdConstants.RESULTSET_TYPE_FORWARD_ONLY: return ResultSet.TYPE_FORWARD_ONLY; case gfxdConstants.RESULTSET_TYPE_INSENSITIVE: return ResultSet.TYPE_SCROLL_INSENSITIVE; case gfxdConstants.RESULTSET_TYPE_SENSITIVE: return ResultSet.TYPE_SCROLL_SENSITIVE; default: throw new InternalGemFireError("unknown resultSet type " + attrs.getResultSetType()); } }
/** * {@inheritDoc} */ @Override public int getResultSetType() throws SQLException { if (this.attrs.isSetResultSetType()) { return Converters.getJdbcResultSetType(this.attrs.getResultSetType()); } else { return ResultSet.TYPE_FORWARD_ONLY; } }
public Object getFieldValue(_Fields field) { switch (field) { case RESULT_SET_TYPE: return Byte.valueOf(getResultSetType());