Package org.gdbms.engine.data.driver

Examples of org.gdbms.engine.data.driver.DriverException


     */
    public int getFieldCount() throws DriverException {
        try {
            return resultSet.getMetaData().getColumnCount();
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here


     */
    public String getFieldName(int fieldId) throws DriverException {
        try {
            return resultSet.getMetaData().getColumnName(fieldId + 1);
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

     */
    public int getFieldType(int i) throws DriverException {
        try {
            return resultSet.getMetaData().getColumnType(i + 1);
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

                pks.add(rs.getString("COLUMN_NAME"));
            }
           
            ret.setPrimaryKey(pks.toArray(new String[0]));
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

                            .getFieldType(i), driverMetadata.getFieldParams(i));
        }

        String[] pks = driverMetadata.getPrimaryKeys();
        if (pks.length == 0) {
            throw new DriverException("No primary key specified");
        } else {
            sql += ", PRIMARY KEY(" + pks[0];
            for (int i = 1; i < pks.length; i++) {
                sql += ", " + pks[i];
            }
            sql += ")";
        }
       
        sql += ")";

        try {
            Statement st = c.createStatement();
            st.execute(sql);
            st.close();
        } catch (SQLException e) {
            throw new DriverException(e.getMessage() + ":" + sql, e);
        }
    }
View Full Code Here

    public boolean isReadOnly(int fieldId) throws DriverException {
        try {
            return resultSet.getMetaData().isReadOnly(fieldId + 1);
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

     */
    public void open(Connection con, String tableName, String orderFieldName) throws DriverException {
        try {
            jdbcSupport = JDBCSupport.newJDBCSupport(con, tableName, orderFieldName);
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

     */
    public void close() throws DriverException {
        try {
            jdbcSupport.close();
        } catch (SQLException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

    public void redo() throws DriverException {
        try {
            dataSource.setFieldValue(index, fieldIndex, newValue);
        } catch (DriverException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

    public void undo() throws DriverException {
        try {
            dataSource.undoSet(index, fieldIndex, oldValue);
        } catch (DriverException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.gdbms.engine.data.driver.DriverException

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.