コード例 #1
0
 protected Table createTable(
     final String vdbName, final String vdbPath, final String modelName, final String tableName)
     throws Exception {
   final WorkspaceManager mgr = WorkspaceManager.getInstance(_repo);
   final Vdb vdb = mgr.createVdb(this.uow, null, vdbName, vdbPath);
   final Model model = vdb.addModel(this.uow, modelName);
   return model.addTable(this.uow, tableName);
 }
コード例 #2
0
  protected Model createModel(final String vdbName, final String vdbPath, final String modelName)
      throws Exception {
    final WorkspaceManager mgr = WorkspaceManager.getInstance(_repo);
    final Vdb vdb = mgr.createVdb(this.uow, null, vdbName, vdbPath);
    final Model model = vdb.addModel(this.uow, modelName);

    assertThat(model.getPrimaryType(this.uow).getName(), is(VdbLexicon.Vdb.DECLARATIVE_MODEL));
    assertThat(model.getName(this.uow), is(modelName));
    return model;
  }
コード例 #3
0
  protected Vdb createVdb(
      final String vdbName, final KomodoObject parent, final String originalFilePath)
      throws Exception {
    final WorkspaceManager mgr = WorkspaceManager.getInstance(_repo);
    final Vdb vdb = mgr.createVdb(this.uow, parent, vdbName, originalFilePath);

    assertThat(vdb.getPrimaryType(this.uow).getName(), is(VdbLexicon.Vdb.VIRTUAL_DATABASE));
    assertThat(vdb.getName(this.uow), is(vdbName));
    assertThat(vdb.getOriginalFilePath(this.uow), is(originalFilePath));
    return vdb;
  }