Java Code Examples for javax.sql.RowSetMetaData

The following examples show how to use javax.sql.RowSetMetaData. These examples are extracted from open source projects. 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
@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
@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 Project: jdk8u60   Source File: RowSetMetaDataTests.java    License: 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
@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
@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
@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
@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 Project: hottub   Source File: RowSetMetaDataTests.java    License: 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
@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
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 11
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 12
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 13
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 14
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 15
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 16
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 17
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 18
Source Project: jdk8u60   Source File: StubWebRowSetImpl.java    License: 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
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 20
Source Project: jdk8u60   Source File: StubCachedRowSetImpl.java    License: 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 Project: jdk8u60   Source File: StubJoinRowSetImpl.java    License: 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
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 23
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 24
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 25
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 26
Source Project: ReplicaDB   Source File: CsvCachedRowSetImpl.java    License: 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
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 28
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 29
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example 30
@Override
public void setMetaData(RowSetMetaData md) throws SQLException {
    throw new UnsupportedOperationException("Not supported yet.");
}