@Test public void testSchemaExists() throws Exception { schema.init(emireCfg); Connection c = emireCfg.getConnection(); try { boolean result = ProarcDatabase.schemaExists(schema, c) > 0; assertTrue(result); } finally { c.close(); } }
static int schemaExists(ProarcDatabase db, Connection c) { try { DBCommand cmd = db.createCommand(); cmd.select(db.tableProarcVersion.schemaVersion); int version = db.querySingleInt(cmd, -1, c); return version; } catch (QueryFailedException ex) { return -1; } }
ProarcDatabase extends DBDatabase { static int schemaExists(ProarcDatabase db, Connection c) { try { DBCommand cmd = db.createCommand(); cmd.select(db.tableProarcVersion.schemaVersion); int version = db.querySingleInt(cmd, -1, c); return version; } catch (QueryFailedException ex) { return -1; } } }
ProarcDatabase extends DBDatabase { static int schemaExists(ProarcDatabase db, Connection c) { try { DBCommand cmd = db.createCommand(); cmd.select(db.tableProarcVersion.schemaVersion); int version = db.querySingleInt(cmd, -1, c); return version; } catch (QueryFailedException ex) { return -1; } } ProarcDatabase(); }
ProarcDatabase extends DBDatabase { static int schemaExists(ProarcDatabase db, Connection c) { try { DBCommand cmd = db.createCommand(); cmd.select(db.tableProarcVersion.schemaVersion); int version = db.querySingleInt(cmd, -1, c); return version; } catch (QueryFailedException ex) { return -1; } } ProarcDatabase();  }
ProarcDatabase extends DBDatabase { static int schemaExists(ProarcDatabase db, Connection c) { try { DBCommand cmd = db.createCommand(); cmd.select(db.tableProarcVersion.schemaVersion); int version = db.querySingleInt(cmd, -1, c); return version; } catch (QueryFailedException ex) { return -1; } } ProarcDatabase();  static final int VERSION; final ProarcVersionTable tableProarcVersion; final BatchTable tableBatch; final BatchItemTable tableBatchItem; final UserTable tableUser; final UserGroupTable tableUserGroup; final GroupMemberTable tableGroupMember; final GroupPermissionTable tableGroupPermission; final WorkflowJobTable tableWorkflowJob; final WorkflowTaskTable tableWorkflowTask; final WorkflowMaterialInTaskTable tableWorkflowMaterialInTask; final WorkflowParameterTable tableWorkflowParameter; final WorkflowMaterialTable tableWorkflowMaterial; final WorkflowFolderTable tableWorkflowFolder; final WorkflowDigObjTable tableWorkflowDigObj; final WorkflowPhysicalDocTable tableWorkflowPhysicalDoc; final DBRelation relationWorkflowJob_ParentId_Fk; final DBRelation relationWorkflowMaterialInTask_MaterialId_Fk; final DBRelation relationWorkflowMaterialInTask_TaskId_Fk; }