Examples of DBDriver


Examples of de.mhus.lib.cao.db.DbDriver

    b1.setName("sub2");
    b1.setParent(b.getId());
    b1.create(manager);
   
    // create cao
    DbDriver driver = new DbDriver();
    driver.initialize("db", new HashConfig(), MSingleton.instance().getActivator());
    CaoForm dbconf = driver.createConfiguration();
    dbconf.setConfig(config);
    CaoConnection con = driver.createConnection(dbconf);
    CaoApplication app = con.getApplication("content");
    CaoElement r = app.queryElement("root");
    printOut(2,r);
  }
View Full Code Here

Examples of de.mhus.lib.cao.db.DbDriver

    b1.setName("sub2");
    b1.setParent(b.getId());
    b1.create(manager);
   
    // create cao
    DbDriver driver = new DbDriver();
    driver.initialize("db", new HashConfig(), MSingleton.instance().getActivator());
    CaoForm dbconf = driver.createConfiguration();
    dbconf.setConfig(config);
    CaoConnection con = driver.createConnection(dbconf);
    CaoApplication app = con.getApplication("content");
    CaoElement r = app.queryElement("root");
    printOut(2,r);
  }
View Full Code Here

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

    }
   
    public void testDriverTypes() throws Exception {
        DriverManager dm = ds.getDriverManager();
        FileDriver fd = (FileDriver) dm.getDriver("csv string");
        DBDriver dd = (DBDriver) dm.getDriver("GDBMS HSQLDB driver");
       
        String[] types = fd.getAvailableTypes();
        String[] params = fd.getParameters(types[0]);
        assertTrue(types.length == 1);
        assertTrue(types[0].equals("STRING"));
        assertTrue(params.length == 0);
       
        types = dd.getAvailableTypes();
        params = dd.getParameters("CHAR");
        assertTrue(types.length > 0);
        for (int i = 0; i < types.length; i++) {
            if (types[i].equals("CHAR")) {
                params = dd.getParameters(types[i]);
                assertTrue(params[0].equals("LENGTH"));
                assertTrue(params.length == 1);
            } else if (types[i].equals("DECIMAL")) {
                params = dd.getParameters(types[i]);
                assertTrue(params[0].equals("PRECISION"));
                assertTrue(params[1].equals("SCALE"));
                assertTrue(params.length == 2);
            }
        }
View Full Code Here

Examples of org.jresearch.gossip.dao.drivers.DbDriver

        throws InstantiationException, IllegalAccessException,
            InvocationTargetException, NoSuchMethodException, SQLException {
        Set keys = mapping.keySet();
        this.records = new ArrayList();

        DbDriver dvDriver = DbDriver.getInstance();

        while (rs.next()) {
            Object item = klass.newInstance();
            Iterator it = keys.iterator();

            while (it.hasNext()) {
                String key = (String) it.next();
                PropertyUtils.setProperty(item, key,
                    dvDriver.mapObjectType(rs.getObject(
                            (String) mapping.get(key))));
            }

            this.records.add(item);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.