Package javax.sql.rowset

Examples of javax.sql.rowset.RowSetMetaDataImpl


    /**
     * @tests serialization/deserialization.
     */
    public void test_serialization_self() throws Exception {
        RowSetMetaDataImpl impl = new RowSetMetaDataImpl();
        impl.setColumnCount(1);
        impl.setColumnType(1, Types.CHAR);
        SerializationTest.verifySelf(impl, ROWSET_METADATA_COMPARATOR);
    }
View Full Code Here


    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void test_serialization_compatibility() throws Exception {
        RowSetMetaDataImpl impl = new RowSetMetaDataImpl();
        impl.setColumnCount(2);
        impl.setColumnType(1, Types.ARRAY);
        impl.setColumnType(2, Types.BIGINT);
        SerializationTest.verifyGolden(this, impl, ROWSET_METADATA_COMPARATOR);
    }
View Full Code Here

    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        metaDataImpl = new RowSetMetaDataImpl();
    }
View Full Code Here

        dataBaseURL = rs.getStatement().getConnection().getMetaData().getURL();
    }

    private void composeMetaData(ResultSetMetaData metaData)
            throws SQLException {
        RowSetMetaDataImpl rowSetMetaData = new RowSetMetaDataImpl();
        rowSetMetaData.setColumnCount(metaData.getColumnCount());
        for (int i = 1; i <= metaData.getColumnCount(); i++) {
            rowSetMetaData.setColumnName(i, metaData.getColumnName(i));
        }
        // TODO set other meta info when necessary
        this.meta = rowSetMetaData;
    }
View Full Code Here

    }

    // deep copy of ResultSetMetaData
    protected RowSetMetaData copyMetaData(ResultSetMetaData metaData)
            throws SQLException {
        RowSetMetaDataImpl rowSetMetaData = new RowSetMetaDataImpl();
        rowSetMetaData.setColumnCount(metaData.getColumnCount());
        for (int columnIndex = 1; columnIndex <= metaData.getColumnCount(); columnIndex++) {
            rowSetMetaData.setAutoIncrement(columnIndex, metaData
                    .isAutoIncrement(columnIndex));
            doCopyMetaData(rowSetMetaData, columnIndex, metaData, columnIndex);
        }
        return rowSetMetaData;
    }
View Full Code Here

        }
    }

    public void testGetConflictValue() throws Exception {

        RowSetMetaData metadata = new RowSetMetaDataImpl();
        metadata.setColumnCount(DEFAULT_COLUMN_COUNT);

        SyncResolverImpl resolver = new SyncResolverImpl(metadata);
        resolver.addConflictRow(
                new CachedRow(new Object[DEFAULT_COLUMN_COUNT]), 1,
                SyncResolver.INSERT_ROW_CONFLICT);
View Full Code Here

    }

    public void testNextPreviousConflict() throws Exception {

        RowSetMetaData metadata = new RowSetMetaDataImpl();
        metadata.setColumnCount(DEFAULT_COLUMN_COUNT);

        SyncResolverImpl resolver = new SyncResolverImpl(metadata);
        resolver.addConflictRow(
                new CachedRow(new Object[DEFAULT_COLUMN_COUNT]), 1,
                SyncResolver.INSERT_ROW_CONFLICT);
View Full Code Here

        assertFalse(resolver.previousConflict());
    }

    public void testGetStatus() throws Exception {

        RowSetMetaData metadata = new RowSetMetaDataImpl();
        metadata.setColumnCount(DEFAULT_COLUMN_COUNT);

        SyncResolverImpl resolver = new SyncResolverImpl(metadata);
        resolver.addConflictRow(
                new CachedRow(new Object[DEFAULT_COLUMN_COUNT]), 1,
                SyncResolver.INSERT_ROW_CONFLICT);
View Full Code Here

    /**
     * @tests serialization/deserialization.
     */
    public void test_serialization_self() throws Exception {
        RowSetMetaDataImpl impl = new RowSetMetaDataImpl();
        impl.setColumnCount(1);
        impl.setColumnType(1, Types.CHAR);
        SerializationTest.verifySelf(impl, ROWSET_METADATA_COMPARATOR);
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void test_serialization_compatibility() throws Exception {
        RowSetMetaDataImpl impl = new RowSetMetaDataImpl();
        impl.setColumnCount(2);
        impl.setColumnType(1, Types.ARRAY);
        impl.setColumnType(2, Types.BIGINT);
        SerializationTest.verifyGolden(this, impl, ROWSET_METADATA_COMPARATOR);
    }
View Full Code Here

TOP

Related Classes of javax.sql.rowset.RowSetMetaDataImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.