javax.sql.rowset.serial.SerialArray Java Examples
The following examples show how to use
javax.sql.rowset.serial.SerialArray.
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: BaseRowSetTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "testAdvancedParameters") private Object[][] testAdvancedParameters() throws SQLException { byte[] bytes = new byte[10]; Ref aRef = new SerialRef(new StubRef("INTEGER", query)); Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1])); Blob aBlob = new SerialBlob(new StubBlob()); Clob aClob = new SerialClob(new StubClob()); Reader rdr = new StringReader(query); InputStream is = new StringBufferInputStream(query);; brs = new StubBaseRowSet(); brs.setBytes(1, bytes); brs.setAsciiStream(2, is, query.length()); brs.setRef(3, aRef); brs.setArray(4, aArray); brs.setBlob(5, aBlob); brs.setClob(6, aClob); brs.setBinaryStream(7, is, query.length()); brs.setUnicodeStream(8, is, query.length()); brs.setCharacterStream(9, rdr, query.length()); return new Object[][]{ {1, bytes}, {2, is}, {3, aRef}, {4, aArray}, {5, aBlob}, {6, aClob}, {7, is}, {8, is}, {9, rdr} }; }
Example #2
Source File: SQLOutputImplTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test04() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); outImpl.writeArray(a); SerialArray sa = (SerialArray) results.get(0); assertTrue(Arrays.equals(coffees, (Object[]) sa.getArray())); assertTrue(a.getBaseTypeName().equals(sa.getBaseTypeName())); }
Example #3
Source File: BaseRowSetTests.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "testAdvancedParameters") private Object[][] testAdvancedParameters() throws SQLException { byte[] bytes = new byte[10]; Ref aRef = new SerialRef(new StubRef("INTEGER", query)); Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1])); Blob aBlob = new SerialBlob(new StubBlob()); Clob aClob = new SerialClob(new StubClob()); Reader rdr = new StringReader(query); InputStream is = new StringBufferInputStream(query);; brs = new StubBaseRowSet(); brs.setBytes(1, bytes); brs.setAsciiStream(2, is, query.length()); brs.setRef(3, aRef); brs.setArray(4, aArray); brs.setBlob(5, aBlob); brs.setClob(6, aClob); brs.setBinaryStream(7, is, query.length()); brs.setUnicodeStream(8, is, query.length()); brs.setCharacterStream(9, rdr, query.length()); return new Object[][]{ {1, bytes}, {2, is}, {3, aRef}, {4, aArray}, {5, aBlob}, {6, aClob}, {7, is}, {8, is}, {9, rdr} }; }
Example #4
Source File: BaseRowSetTests.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "testAdvancedParameters") private Object[][] testAdvancedParameters() throws SQLException { byte[] bytes = new byte[10]; Ref aRef = new SerialRef(new StubRef("INTEGER", query)); Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1])); Blob aBlob = new SerialBlob(new StubBlob()); Clob aClob = new SerialClob(new StubClob()); Reader rdr = new StringReader(query); InputStream is = new StringBufferInputStream(query);; brs = new StubBaseRowSet(); brs.setBytes(1, bytes); brs.setAsciiStream(2, is, query.length()); brs.setRef(3, aRef); brs.setArray(4, aArray); brs.setBlob(5, aBlob); brs.setClob(6, aClob); brs.setBinaryStream(7, is, query.length()); brs.setUnicodeStream(8, is, query.length()); brs.setCharacterStream(9, rdr, query.length()); return new Object[][]{ {1, bytes}, {2, is}, {3, aRef}, {4, aArray}, {5, aBlob}, {6, aClob}, {7, is}, {8, is}, {9, rdr} }; }
Example #5
Source File: SQLOutputImplTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test04() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); outImpl.writeArray(a); SerialArray sa = (SerialArray) results.get(0); assertTrue(Arrays.equals(coffees, (Object[]) sa.getArray())); assertTrue(a.getBaseTypeName().equals(sa.getBaseTypeName())); }
Example #6
Source File: SQLOutputImplTests.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test04() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); outImpl.writeArray(a); SerialArray sa = (SerialArray) results.get(0); assertTrue(Arrays.equals(coffees, (Object[]) sa.getArray())); assertTrue(a.getBaseTypeName().equals(sa.getBaseTypeName())); }
Example #7
Source File: BaseRowSetTests.java From hottub with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "testAdvancedParameters") private Object[][] testAdvancedParameters() throws SQLException { byte[] bytes = new byte[10]; Ref aRef = new SerialRef(new StubRef("INTEGER", query)); Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1])); Blob aBlob = new SerialBlob(new StubBlob()); Clob aClob = new SerialClob(new StubClob()); Reader rdr = new StringReader(query); InputStream is = new StringBufferInputStream(query);; brs = new StubBaseRowSet(); brs.setBytes(1, bytes); brs.setAsciiStream(2, is, query.length()); brs.setRef(3, aRef); brs.setArray(4, aArray); brs.setBlob(5, aBlob); brs.setClob(6, aClob); brs.setBinaryStream(7, is, query.length()); brs.setUnicodeStream(8, is, query.length()); brs.setCharacterStream(9, rdr, query.length()); return new Object[][]{ {1, bytes}, {2, is}, {3, aRef}, {4, aArray}, {5, aBlob}, {6, aClob}, {7, is}, {8, is}, {9, rdr} }; }
Example #8
Source File: BaseRowSetTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@DataProvider(name = "testAdvancedParameters") private Object[][] testAdvancedParameters() throws SQLException { byte[] bytes = new byte[10]; Ref aRef = new SerialRef(new StubRef("INTEGER", query)); Array aArray = new SerialArray(new StubArray("INTEGER", new Object[1])); Blob aBlob = new SerialBlob(new StubBlob()); Clob aClob = new SerialClob(new StubClob()); Reader rdr = new StringReader(query); InputStream is = new StringBufferInputStream(query);; brs = new StubBaseRowSet(); brs.setBytes(1, bytes); brs.setAsciiStream(2, is, query.length()); brs.setRef(3, aRef); brs.setArray(4, aArray); brs.setBlob(5, aBlob); brs.setClob(6, aClob); brs.setBinaryStream(7, is, query.length()); brs.setUnicodeStream(8, is, query.length()); brs.setCharacterStream(9, rdr, query.length()); return new Object[][]{ {1, bytes}, {2, is}, {3, aRef}, {4, aArray}, {5, aBlob}, {6, aClob}, {7, is}, {8, is}, {9, rdr} }; }
Example #9
Source File: SQLOutputImplTests.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Test(enabled = true) public void test04() throws Exception { Object[] coffees = new Object[]{"Espresso", "Colombian", "French Roast", "Cappuccino"}; Array a = new StubArray("VARCHAR", coffees); outImpl.writeArray(a); SerialArray sa = (SerialArray) results.get(0); assertTrue(Arrays.equals(coffees, (Object[]) sa.getArray())); assertTrue(a.getBaseTypeName().equals(sa.getBaseTypeName())); }
Example #10
Source File: SerialArrayTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test public void test15() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(1, 2); assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3))); }
Example #11
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test public void test15() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(1, 2); assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3))); }
Example #12
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test public void test13() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(); assertTrue(Arrays.equals(o, coffees)); }
Example #13
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void test14() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(map); assertTrue(Arrays.equals(o, coffees)); }
Example #14
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test10() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1); }
Example #15
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test11() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseType(); }
Example #16
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test12() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseTypeName(); }
Example #17
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void test13() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(); assertTrue(Arrays.equals(o, coffees)); }
Example #18
Source File: SerialArrayTests.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
@Test public void test16() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(1, 2, map); assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3))); }
Example #19
Source File: SerialArrayTests.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test12() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseTypeName(); }
Example #20
Source File: SerialArrayTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test public void test14() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(map); assertTrue(Arrays.equals(o, coffees)); }
Example #21
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test12() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseTypeName(); }
Example #22
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test11() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseType(); }
Example #23
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test10() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1); }
Example #24
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test08() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(map); }
Example #25
Source File: SerialArrayTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test05() throws Exception { SerialArray sa = new SerialArray(a); sa.getResultSet(1, 1); }
Example #26
Source File: SerialArrayTests.java From hottub with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test11() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getBaseType(); }
Example #27
Source File: SerialArrayTests.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
@Test public void test15() throws Exception { SerialArray sa = new SerialArray(a); Object[] o = (Object[]) sa.getArray(1, 2); assertTrue(Arrays.equals(o, Arrays.copyOfRange(coffees, 1, 3))); }
Example #28
Source File: SerialArrayTests.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test04() throws Exception { SerialArray sa = new SerialArray(a); sa.getResultSet(null); }
Example #29
Source File: SerialArrayTests.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test04() throws Exception { SerialArray sa = new SerialArray(a); sa.getResultSet(null); }
Example #30
Source File: SerialArrayTests.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
@Test(expectedExceptions = SerialException.class) public void test09() throws Exception { SerialArray sa = new SerialArray(a); sa.free(); sa.getArray(1, 1, map); }