java.sql.ResultSet#FETCH_REVERSE源码实例Demo

下面列出了java.sql.ResultSet#FETCH_REVERSE 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: jTDS   文件: JtdsStatement.java
public void setFetchDirection(int direction) throws SQLException {
    checkOpen();
    switch (direction) {
    case ResultSet.FETCH_UNKNOWN:
    case ResultSet.FETCH_REVERSE:
    case ResultSet.FETCH_FORWARD:
        fetchDirection = direction;
        break;

    default:
        throw new SQLException(
                Messages.get("error.generic.badoption",
                        Integer.toString(direction),
                        "direction"),
                "24000");
    }
}
 
源代码2 项目: dragonwell8_jdk   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码3 项目: TencentKona-8   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码4 项目: jdk8u60   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码5 项目: openjdk-jdk8u   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码6 项目: openjdk-jdk8u-backup   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码7 项目: openjdk-jdk9   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码8 项目: jdk8u-jdk   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码9 项目: hottub   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码10 项目: gemfirexd-oss   文件: ClientStatement.java
/**
 * {@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);
  }
}
 
源代码11 项目: gemfirexd-oss   文件: ClientStatement.java
/**
 * {@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;
  }
}
 
源代码12 项目: jdk8u_jdk   文件: CommonRowSetTests.java
@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}
    };
}
 
源代码13 项目: jdbc-driver-csv   文件: CsvStatement.java
@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 SQLFeatureNotSupportedException(CsvResources.getString("unsupportedDirection") + ": " + direction);
    }
}
 
源代码14 项目: jdbc-driver-csv   文件: CsvResultSet.java
@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);
    }
}
 
源代码15 项目: gemfirexd-oss   文件: ClientStatement.java
/**
 * {@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);
  }
}
 
源代码16 项目: gemfirexd-oss   文件: ClientStatement.java
/**
 * {@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;
  }
}
 
@SuppressWarnings("boxing")
public void setFetchDirection(int direction) throws SQLException
   {
       checkNotClosed();

       if (direction == ResultSet.FETCH_FORWARD || direction == ResultSet.FETCH_REVERSE || direction == ResultSet.FETCH_UNKNOWN)
       {
           if ((getResultSetType() == ResultSet.TYPE_FORWARD_ONLY) && (direction != ResultSet.FETCH_FORWARD))
               throw new SQLSyntaxErrorException(String.format(BAD_FETCH_DIR, direction));
           fetchDirection = direction;
       }
       else throw new SQLSyntaxErrorException(String.format(BAD_FETCH_DIR, direction));
   }
 
源代码18 项目: presto   文件: PrestoStatement.java
private static boolean validFetchDirection(int direction)
{
    return (direction == ResultSet.FETCH_FORWARD) ||
            (direction == ResultSet.FETCH_REVERSE) ||
            (direction == ResultSet.FETCH_UNKNOWN);
}