Package com.hardcode.driverManager

Examples of com.hardcode.driverManager.Driver


  }

  @Override
  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {

        Driver d = getDataSourceFactory().getDriverManager().getDriver(driverName);
        ((GDBMSDriver)d).setDataSourceFactory(getDataSourceFactory());

        DBSpatialDataSourceAdapter adapter = new DBSpatialDataSourceAdapter(tableName, tableAlias,
                (DBSpatialSource) def, (SpatialDBDriver) d);
        adapter.setDataSourceFactory(getDataSourceFactory());
View Full Code Here


    super(file);
  }

  @Override
  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {
        Driver d = getDataSourceFactory().getDriverManager().getDriver(driverName);
        ((GDBMSDriver)d).setDataSourceFactory(getDataSourceFactory());
       
        SpatialFileDataSourceAdapter ds = new SpatialFileDataSourceAdapter(tableName, tableAlias,
                    file, (SpatialFileDriver) d);
        return ds;
View Full Code Here

 
  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {
    if (!file.exists()) {
      throw new DataSourceCreationException(file + " does not exists");
    }
        Driver d = getDataSourceFactory().getDriverManager().getDriver(driverName);
        ((GDBMSDriver)d).setDataSourceFactory(getDataSourceFactory());
       
        AlphanumericFileDataSourceAdapter ds = new AlphanumericFileDataSourceAdapter(tableName, tableAlias,
                    file, (AlphanumericFileDriver) d);
        return ds;
View Full Code Here

    this.file = file;
    this.driverMetadata = dmd;
  }

  public void create() throws DriverException {
    Driver d = getDataSourceFactory().getDriverManager().getDriver(
        getDataSourceFactory().getDriverName(file));

    if (!file.exists()) {
      if (d instanceof AlphanumericFileDriver) {
        ((AlphanumericFileDriver) d).createSource(file
View Full Code Here

    this.sql = sql;
  }

  public DataSource createDataSource(String tableName, String tableAlias, String driverName) throws DataSourceCreationException {
    this.driverName = driverName;
        Driver d = getDataSourceFactory().getDriverManager().getDriver(driverName);
        ((GDBMSDriver)d).setDataSourceFactory(getDataSourceFactory());

        try {
      return getDataSourceByQuery(getDataSourceFactory(), tableName, tableAlias);
    } catch (SQLException e) {
View Full Code Here

        this.source = source;
        this.driverMetadata = dmd;
    }

    public void create() throws DriverException {
        Driver d = getDataSourceFactory().getDriverManager().getDriver(getDataSourceFactory().getDriverName(source.getPrefix()));

        if (d instanceof AlphanumericDBDriver) {
            ((AlphanumericDBDriver)d).createSource(source, driverMetadata);
        } else if (d instanceof SpatialDBDriver) {
            ((SpatialDBDriver)d).createSource((DBSpatialSource) source, (SpatialDriverMetadata) driverMetadata);
View Full Code Here

  }

  public DataSource createDataSource(String tableName, String tableAlias,
      String driverName) throws DataSourceCreationException {

    Driver d = getDataSourceFactory().getDriverManager().getDriver(
        driverName);
    ((GDBMSDriver) d).setDataSourceFactory(getDataSourceFactory());

    DBTableDataSourceAdapter adapter = new DBTableDataSourceAdapter(
        tableName, tableAlias, def, (AlphanumericDBDriver) d);
View Full Code Here

  }

  public String getDriverName(String prefix) {
    String[] names = dm.getDriverNames();
    for (int i = 0; i < names.length; i++) {
      Driver driver = dm.getDriver(names[i]);
      if (driver instanceof DBDriver) {
        if (((DBDriver) driver).prefixAccepted(prefix)) {
          return names[i];
        }
      }
View Full Code Here

  }

  public String getDriverName(File file) {
    String[] names = dm.getDriverNames();
    for (int i = 0; i < names.length; i++) {
      Driver driver = dm.getDriver(names[i]);
      if (driver instanceof FileDriver) {
        if (((FileDriver) driver).fileAccepted(file)) {
          return names[i];
        }
      }
View Full Code Here

TOP

Related Classes of com.hardcode.driverManager.Driver

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.