javax.sql.RowSetMetaData Java Examples

The following examples show how to use javax.sql.RowSetMetaData. 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: RowSetMetaDataTests.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #2
Source File: RowSetMetaDataTests.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #3
Source File: RowSetMetaDataTests.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #4
Source File: RowSetMetaDataTests.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #5
Source File: RowSetMetaDataTests.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #6
Source File: RowSetMetaDataTests.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #7
Source File: RowSetMetaDataTests.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #8
Source File: RowSetMetaDataTests.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #9
Source File: RowSetMetaDataTests.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
@Test
public void test99() throws Exception {
    RowSetMetaData rsmd1 = rsmd;
    ResultSetMetaData rsmd2 = rsmd;
    Class clzz = rsmd.getClass();
    assertTrue(rsmd1.isWrapperFor(clzz));
    assertTrue(rsmd2.isWrapperFor(clzz));
    RowSetMetaDataImpl rsmdi = (RowSetMetaDataImpl) rsmd2.unwrap(clzz);

    // False should be returned
    assertFalse(rsmd1.isWrapperFor(this.getClass()));
    assertFalse(rsmd2.isWrapperFor(this.getClass()));
}
 
Example #10
Source File: StubWebRowSetImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #11
Source File: StubFilteredRowSetImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #12
Source File: StubCachedRowSetImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #13
Source File: StubJoinRowSetImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #14
Source File: StubWebRowSetImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #15
Source File: StubFilteredRowSetImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #16
Source File: StubCachedRowSetImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #17
Source File: StubJoinRowSetImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #18
Source File: StubWebRowSetImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #19
Source File: StubFilteredRowSetImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #20
Source File: StubCachedRowSetImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #21
Source File: StubJoinRowSetImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #22
Source File: StubWebRowSetImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #23
Source File: StubFilteredRowSetImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #24
Source File: StubCachedRowSetImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #25
Source File: StubJoinRowSetImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #26
Source File: CsvCachedRowSetImpl.java    From ReplicaDB with Apache License 2.0 4 votes vote down vote up
@Override
public void execute() throws SQLException {

    RowSetMetaData rsmd = new RowSetMetaDataImpl();
    rsmd.setColumnCount(this.columnsTypes.length);

    for (int i = 0; i <= this.columnsTypes.length - 1; i++) {
        switch (this.columnsTypes[i]) {
            case "VARCHAR":
                rsmd.setColumnType(i + 1, Types.VARCHAR);
                break;
            case "CHAR":
                rsmd.setColumnType(i + 1, Types.CHAR);
                break;
            case "LONGVARCHAR":
                rsmd.setColumnType(i + 1, Types.LONGVARCHAR);
                break;
            case "INTEGER":
                rsmd.setColumnType(i + 1, Types.INTEGER);
                break;
            case "BIGINT":
                rsmd.setColumnType(i + 1, Types.BIGINT);
                break;
            case "TINYINT":
                rsmd.setColumnType(i + 1, Types.TINYINT);
                break;
            case "SMALLINT":
                rsmd.setColumnType(i + 1, Types.SMALLINT);
                break;
            case "NUMERIC":
                rsmd.setColumnType(i + 1, Types.NUMERIC);
                break;
            case "DECIMAL":
                rsmd.setColumnType(i + 1, Types.DECIMAL);
                break;
            case "DOUBLE":
                rsmd.setColumnType(i + 1, Types.DOUBLE);
                break;
            case "FLOAT":
                rsmd.setColumnType(i + 1, Types.FLOAT);
                break;
            case "DATE":
                rsmd.setColumnType(i + 1, Types.DATE);
                break;
            case "TIMESTAMP":
                rsmd.setColumnType(i + 1, Types.TIMESTAMP);
                break;
            case "TIME":
                rsmd.setColumnType(i + 1, Types.TIME);
                break;
            case "BOOLEAN":
                rsmd.setColumnType(i + 1, Types.BOOLEAN);
                break;
            default:
                rsmd.setColumnType(i + 1, Types.VARCHAR);
                break;
        }
    }

    setMetaData(rsmd);

    BufferedReader reader = null;
    try {
        reader = Files.newBufferedReader(sourceFile.toPath());
        this.records = csvFormat.parse(reader);
    } catch (IOException e) {
        throw new SQLException(e);
    }

}
 
Example #27
Source File: StubWebRowSetImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #28
Source File: StubFilteredRowSetImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #29
Source File: StubCachedRowSetImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #30
Source File: StubJoinRowSetImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}