Java Code Examples for javax.sql.RowSet#setMaxRows()
The following examples show how to use
javax.sql.RowSet#setMaxRows() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CommonRowSetTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 2
Source File: JdbcRowSetAccessor.java From XPagesExtensionLibrary with Apache License 2.0 | 5 votes |
public RowSet createRowSet(JdbcRowSetSource ds) { try { RowSet rowSet = ds.createRowSet(); // Set the maximum rows to be retrieved int maxRows = ds.getMaxRows(); rowSet.setMaxRows(maxRows); // Get the query and apply it to the row set String query = getQuery(); rowSet.setCommand(query); // Set the request parameters if any if(parameters!=null) { for(int i=0; i<parameters.size(); i++) { Object p = parameters.get(i); rowSet.setObject(i+1, p); } } // Then execute the query // Cast to CachedRoowSet until we get JNDI on //rowSet.execute(); getCachedRowSet(rowSet).execute(findConnection()); return rowSet; } catch(Exception ex) { // "Error while reading the relational data" String msg = com.ibm.xsp.extlib.relational.RelationalResourceHandler.getSpecialAudienceString( "JdbcDataBlockAccessor.Errorwhilereadingtherelationaldat"); //$NON-NLS-1$ throw new FacesExceptionEx(ex,msg); } }
Example 3
Source File: CommonRowSetTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 4
Source File: CommonRowSetTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 5
Source File: CommonRowSetTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 6
Source File: CommonRowSetTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 7
Source File: CommonRowSetTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 8
Source File: CommonRowSetTests.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 9
Source File: CommonRowSetTests.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 10
Source File: CommonRowSetTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Test(dataProvider = "rowSetType") public void commonRowSetTest0015(RowSet rs) throws Exception { int maxRows = 150; rs.setFetchSize(0); assertTrue(rs.getFetchSize() == 0); rs.setFetchSize(100); assertTrue(rs.getFetchSize() == 100); rs.setMaxRows(maxRows); rs.setFetchSize(maxRows); assertTrue(rs.getFetchSize() == maxRows); }
Example 11
Source File: CommonRowSetTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 12
Source File: CommonRowSetTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 13
Source File: CommonRowSetTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 14
Source File: CommonRowSetTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 15
Source File: CommonRowSetTests.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 16
Source File: CommonRowSetTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 17
Source File: CommonRowSetTests.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 18
Source File: CommonRowSetTests.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }
Example 19
Source File: CommonRowSetTests.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Test(dataProvider = "rowSetType", expectedExceptions = SQLException.class) public void commonRowSetTest0014(RowSet rs) throws Exception { rs.setMaxRows(5); rs.setFetchSize(rs.getMaxRows() + 1); }