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); }
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; }
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; }