Examples of DBDatabase


Examples of org.apache.empire.db.DBDatabase

    // log all options
    listOptions(config);
   
    // read the database model
    CodeGenParser parser = new CodeGenParser(config);
    DBDatabase db = parser.loadDbModel();
   
    // create the source-code for that database
    CodeGenWriter codeGen = new CodeGenWriter(config);
    codeGen.generateCodeFiles(db);
   
View Full Code Here

Examples of org.apache.empire.db.DBDatabase

    {
        CodeGenConfig config = new CodeGenConfig();
        config.init("testconfig.xml", true, false);
        CodeGenWriter codeGen = new CodeGenWriter(config);
       
        DBDatabase db = new DBDatabase()
        {
        };
       
        List<File> files = codeGen.generateCodeFiles(db);
        assertEquals(4, files.size());
View Full Code Here

Examples of org.apache.empire.db.DBDatabase

            return ((Record)base).getValue(index);
        }
        else if (base==null)
        {   // LookupDatabase
            String name = StringUtils.toString(property);
            DBDatabase db = DBDatabase.findById(name);
            if (db!=null)
                context.setPropertyResolved(true);
            // done
            return db;
        }
View Full Code Here

Examples of org.apache.empire.db.DBDatabase

            if (dbix<=0)
            {
                log.error("Invalid column expression '{}'!", name);
                return null; // not found
            }
            DBDatabase db = DBDatabase.findById(name.substring(0,dbix));
            if (db==null)
            {
                log.error("Database '{}' not found!", name.substring(0,dbix));
                return null; // not found
            }
            int co = name.lastIndexOf('.');
            int to = name.lastIndexOf('.', co - 1);
            String cn = name.substring(co + 1);
            String tn = name.substring(to + 1, co);
            DBRowSet rs = db.getRowSet(tn);
            if (rs == null)
            {
                log.error("Table/View '{}' not found in database!", tn);
                return null; // not found
            }
View Full Code Here

Examples of org.apache.empire.db.DBDatabase

    @Override
    protected void createTable(DBTable t, DBSQLScript script)
    {
        super.createTable(t, script);
        // Add Column comments (if any)
        DBDatabase db = t.getDatabase();
        createComment(db, "TABLE", t, t.getComment(), script);
        Iterator<DBColumn> columns = t.getColumns().iterator();
        while (columns.hasNext())
        {
            DBColumn c = columns.next();
View Full Code Here

Examples of org.apache.empire.db.DBDatabase

    @Override
    protected void createTable(DBTable t, DBSQLScript script)
    {
        super.createTable(t, script);
        // Add Column comments (if any)
        DBDatabase db = t.getDatabase();
        createComment(db, "TABLE", t, t.getComment(), script);
        Iterator<DBColumn> columns = t.getColumns().iterator();
        while (columns.hasNext())
        {
            DBColumn c = columns.next();
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.