Package org.gdbms.engine.data.driver

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


    public void undo() throws DriverException {
        try {
//            ((SpatialDataSource) dataSource).deleteRow(dataSource.getRowCount() - 1);
            dataSource.undoInsert(dataSource.getRowCount() - 1);
        } catch (DriverException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here


    public void redo() throws DriverException {
        try {
            deletedRow = dataSource.getRow(index);
            ((AlphanumericDataSource) dataSource).deleteRow(index);
        } catch (DriverException e) {
            throw new DriverException(e);
        }
    }
View Full Code Here

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

    VectorialFileAdapter adapter = new VectorialFileAdapter(file);
//TODO    adapter.setDriver(new DwgMemoryDriver());
        try {
            adapter.start();
        } catch (DriverIOException e) {
            throw new DriverException(e);
        }
    super.open(adapter);
  }
View Full Code Here

            try {
                con = getConnection();
                ((AlphanumericDBDriver) driver).open(con, def.getTableName(), null);

            } catch (SQLException e) {
                throw new DriverException(e);
            }
           
            return true;
        } else {
            return false;
View Full Code Here

            try {
                driver.close();
                con.close();
                con = null;
            } catch (SQLException e) {
                throw new DriverException(e);
            }
        }
    }
View Full Code Here

            Connection con;
            try {
                con = getConnection();
                ((DBTransactionalDriver) driver).beginTrans(con);
            } catch (SQLException e) {
                throw new DriverException(e);
            }
        }
       
        for (int i = 0; i < dataSource.getRowCount(); i++) {
            Value[] row = new Value[dataSource.getFieldNames().length];
            for (int j = 0; j < row.length; j++) {
                row[j] = dataSource.getFieldValue(i, j);
            }
           
            try {
                driver.execute(getConnection(), InnerDBUtils
                        .createInsertStatement(def.getTableName(), row, dataSource.getFieldNames(),
                                driver));
            } catch (SQLException e) {

                if (driver instanceof DBTransactionalDriver) {
                    try {
                        Connection con = getConnection();
                        ((DBTransactionalDriver) driver).rollBackTrans(con);
                    } catch (SQLException e1) {
                        throw new DriverException(e1);
                    }
                }

                throw new DriverException(e);
            }
        }

        if (driver instanceof DBTransactionalDriver) {
            try {
                Connection con = getConnection();
                ((DBTransactionalDriver) driver).commitTrans(con);
            } catch (SQLException e) {
                throw new DriverException(e);
            }
        }
       
        dataSource.stop();
    }
View Full Code Here

    VectorialFileAdapter adapter = new VectorialFileAdapter(file);
    adapter.setDriver(new DgnMemoryDriver());
        try {
            adapter.start();
        } catch (DriverIOException e) {
            throw new DriverException(e);
        }
    super.open(adapter);
  }
View Full Code Here

    VectorialFileAdapter adapter = new VectorialFileAdapter(file);
    adapter.setDriver(new DXFMemoryDriver());
        try {
            adapter.start();
        } catch (DriverIOException e) {
            throw new DriverException(e);
        }
    super.open(adapter);
  }
View Full Code Here

                return ValueFactory.createNullValue();
            } else {
                return value;
            }
        } catch (SQLException 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.