Examples of DBSchema


Examples of com.healthmarketscience.sqlbuilder.dbspec.basic.DbSchema

  }

  protected DbTable createSqlTable(SqlMapping mapping) {
    // create default schema
    DbSpec spec = new DbSpec();
    DbSchema schema = spec.addDefaultSchema();

    DbTable table = schema.addTable(mapping.getTableName());

    addColumn(table, primaryColumn);
    for(Map.Entry<String, Column> entry : mapping.getFields().entrySet()) {
      addColumn(table, entry.getValue());
    }
View Full Code Here

Examples of de.mhus.lib.adb.DbSchema

    return manager;
  }
 
  public void initApplication() throws Exception {
   
    DbSchema schema = (DbSchema) getConnection().getActivator().createObject(getConfig().getExtracted("schema"));
    schema.doInit(getConfig());
    manager = new DbManager(((DbCaoConnection)getConnection()).getPool(), schema, getConnection().getActivator());
    for ( Entry<String, CaoMetadata> caoMap : manager.getCaoMetadata().getBundle().entrySet()) {
      mIndex.put(caoMap.getKey(), new DbMetadata(caoMap.getValue()));
    }
    schema.doPostInit(manager);
  }
View Full Code Here

Examples of de.mhus.lib.adb.DbSchema

    schema.doPostInit(manager);
  }

  @Override
  public void fillWithActions(CaoElement element, CaoList targetList, CaoActionList actionList,Object...initConfig) {
    DbSchema schema = manager.getSchema();
    if (schema instanceof CaoAdbSchema)
      ((CaoAdbSchema)schema).fillWithActions(element, targetList, actionList, initConfig);
    super.fillWithActions(element, targetList, actionList, initConfig);
  }
View Full Code Here

Examples of org.databene.jdbacl.model.DBSchema

  @Before
  public void prepareDB() {
    this.db = new Database(null, null, false);
    this.catalog = new DBCatalog("catalog", this.db);
    this.schema = new DBSchema("schema", this.catalog);
  }
View Full Code Here

Examples of org.databene.jdbacl.model.DBSchema

  @Test
  public void testUnchanged() {
    // given two identical table versions
    Database db1 = new Database("db1", "hsql", "1.5.8", null);
    DBCatalog cat1 = new DBCatalog("cat1", db1);
    DBSchema schema1 = new DBSchema("public", cat1);
    DBTable table1 = createTableWithColumns("tbl", 3);
    schema1.addTable(table1);

    Database db2 = new Database("db1", "hsql", "1.5.8", null);
    DBCatalog cat2 = new DBCatalog("cat2", db2);
    DBSchema schema2 = new DBSchema("public", cat2);
    DBTable table2 = createTableWithColumns("tbl", 3);
    schema2.addTable(table2);
   
    // when comparing the tables
    SchemaChange schemaChange = new SchemaComparator(config).compare(db1, db2);
   
    // then the result must be empty
View Full Code Here

Examples of org.molgenis.model.elements.DBSchema

          tree.setReadOnly(Boolean.parseBoolean(readonly));
        }

        // ENTITY
        // TODO: whould have expected this in the constructor!
        DBSchema entity = model.getDatabase().getChild(element.getAttribute("entity"));
        if (entity == null)
        {
          throw new MolgenisModelException("Could not find the specified entity '"
              + element.getAttribute("entity") + "'");
        }
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.