下面列出了java.sql.ResultSet#FETCH_FORWARD 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
public void setFetchDirection(int direction) throws SQLException {
checkOpen();
if (direction == ResultSet.FETCH_FORWARD ||
direction == ResultSet.FETCH_REVERSE ||
direction == ResultSet.FETCH_UNKNOWN) {
this.fetchDirection = direction;
} else {
throw new SQLException(CsvResources.getString("unsupportedDirection") + ": " + direction);
}
}
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
RowSet rs = newInstance();
return new Object[][]{
{rs, ResultSet.FETCH_FORWARD},
{rs, ResultSet.FETCH_REVERSE},
{rs, ResultSet.FETCH_UNKNOWN}
};
}
@Override
public void setFetchDirection(int direction) throws SQLException
{
logger.debug(
"public void setFetchDirection(int direction)");
raiseSQLExceptionIfResultSetIsClosed();
if (direction != ResultSet.FETCH_FORWARD)
{
throw new SQLFeatureNotSupportedException();
}
}
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
RowSet rs = newInstance();
return new Object[][]{
{rs, ResultSet.FETCH_FORWARD},
{rs, ResultSet.FETCH_REVERSE},
{rs, ResultSet.FETCH_UNKNOWN}
};
}
@DataProvider(name = "rowSetFetchDirection")
protected Object[][] rowSetFetchDirection() throws Exception {
RowSet rs = newInstance();
return new Object[][]{
{rs, ResultSet.FETCH_FORWARD},
{rs, ResultSet.FETCH_REVERSE},
{rs, ResultSet.FETCH_UNKNOWN}
};
}
public void setFetchDirection(int direction) throws SQLException {
validateState();
if (direction != ResultSet.FETCH_FORWARD) {
if (!quiet) {
throw CassandraErrors.notSupportedException();
}
// this.fetchDirection = direction;
}
}
/**
* {@inheritDoc}
*/
@Override
public int getFetchDirection() throws SQLException {
if (this.attrs.isSetFetchReverse()) {
return this.attrs.isFetchReverse() ? ResultSet.FETCH_REVERSE
: ResultSet.FETCH_FORWARD;
}
else {
return ResultSet.FETCH_UNKNOWN;
}
}
@Override
public void setFetchDirection(int direction) throws SQLException
{
logger.debug("setFetchDirection(int direction)");
raiseSQLExceptionIfStatementIsClosed();
if (direction != ResultSet.FETCH_FORWARD)
{
throw new SQLFeatureNotSupportedException();
}
}
/**
* {@inheritDoc}
*/
@Override
public void setFetchDirection(int direction) throws SQLException {
checkClosed();
if (direction == ResultSet.FETCH_REVERSE) {
this.attrs.setFetchReverse(true);
}
else if (direction == ResultSet.FETCH_FORWARD) {
this.attrs.setFetchReverse(false);
}
else if (this.attrs.isSetFetchReverse()) {
this.attrs.setFetchReverseIsSet(false);
this.attrs.setFetchReverse(false);
}
}
/**
* Defaults to {@link ResultSet#FETCH_FORWARD}.
*/
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
if (direction != ResultSet.FETCH_FORWARD) {
throw new SQLFeatureNotSupportedException("only FETCH_FORWARD is supported");
}
}
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
if (direction != ResultSet.FETCH_FORWARD) {
throw new SQLFeatureNotSupportedException();
}
}
@Override
public void setFetchDirection(int direction) throws SQLException {
if (direction != ResultSet.FETCH_FORWARD) {
throw new SQLFeatureNotSupportedException();
}
}
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}
@Override
public void setFetchDirection(int direction) throws SQLException {
if (direction != ResultSet.FETCH_FORWARD) {
throw new SQLFeatureNotSupportedException();
}
}
@Override
public void setFetchDirection(int direction) throws SQLException {
if (direction != ResultSet.FETCH_FORWARD) {
throw new SQLFeatureNotSupportedException();
}
}
@Override
public int getFetchDirection() throws SQLException {
return ResultSet.FETCH_FORWARD;
}