Examples of DatabaseMap


Examples of org.jdbf.engine.mapping.DatabaseMap

       
    Iterator iter = conf.getConfigurations("database");
    ArrayList dbs = new ArrayList();
    while(iter.hasNext()){
        conf = (ConfigurationImpl)iter.next();
        DatabaseMap dbMap = new DatabaseMap();
        ConfigurationImpl child = (ConfigurationImpl)conf.getConfiguration("name");
            logger.log(Level.FINEST,"name " + child.getValue());
        dbMap.setName(child.getValue());
        child = (ConfigurationImpl)conf.getConfiguration("vendor");
            logger.log(Level.FINEST,"vendor " + child.getValue());
        dbMap.setVendor(child.getValue());
        child = (ConfigurationImpl)conf.getConfiguration("dbDriver");
            logger.log(Level.FINEST,"dbDriver " + child.getValue());
        String dbDriver = child.getValue();
        if(dbDriver == null){       
              logger.throwing(CLASS_NAME,"createConnection()",
                            new MappingException("mapping.missingDriver")
                           );
            throw new MappingException(Messages.message("mapping.missingDriver"));
        }
        else
        dbMap.setDbDriver(dbDriver);
     
        child = (ConfigurationImpl)conf.getConfiguration("dbServer");
            logger.log(Level.FINEST,"dbServer " + child.getValue());
        dbMap.setDbServer(child.getValue());
        child = (ConfigurationImpl)conf.getConfiguration("dbLogin");
            logger.log(Level.FINEST,"dbLogin " + child.getValue());
        dbMap.setDbLogin(child.getValue());
        child = (ConfigurationImpl)conf.getConfiguration("dbPassword");
            logger.log(Level.FINEST,"dbPassword " + child.getValue());
        dbMap.setDbPassword(child.getValue());
     
        dbs.add(dbMap);
    }
    createConnection(dbs);
    }
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.