/** * Creates a temporary bag table for the given QueryClassBag. * * @param c a Connection * @param qcb a QueryClassBag * @param log true to log this action * @param text extra data to place in the log * @return a BagTableToRemove object * @throws SQLException if an error occurs */ protected BagTableToRemove createTempBagTable(Connection c, QueryClassBag qcb, boolean log, String text) throws SQLException { String tableName = "Integer_bag_" + getUniqueInteger(c); if (log) { LOG.info("Creating temporary table " + tableName + " of size " + qcb.getIds().size() + " for " + text); } DatabaseUtil.createBagTable(db, c, tableName, qcb.getIds(), Integer.class); bagConstraintTables.put(qcb, tableName); BagTableToRemove bagTableToRemove = new BagTableToRemove(tableName, bagTablesToRemove); bagTablesInDatabase.add(bagTableToRemove); return bagTableToRemove; }
BagTableToRemove bagTableToRemove = new BagTableToRemove(tableName, bagTablesToRemove); bagTablesInDatabase.add(bagTableToRemove);
BagTableToRemove bagTableToRemove = new BagTableToRemove(tableName, bagTablesToRemove); bagTablesInDatabase.add(bagTableToRemove);
/** * Creates a temporary bag table for the given QueryClassBag. * * @param c a Connection * @param qcb a QueryClassBag * @param log true to log this action * @param text extra data to place in the log * @return a BagTableToRemove object * @throws SQLException if an error occurs */ protected BagTableToRemove createTempBagTable(Connection c, QueryClassBag qcb, boolean log, String text) throws SQLException { String tableName = "Integer_bag_" + getUniqueInteger(c); if (log) { LOG.info("Creating temporary table " + tableName + " of size " + qcb.getIds().size() + " for " + text); } DatabaseUtil.createBagTable(db, c, tableName, qcb.getIds(), Integer.class); bagConstraintTables.put(qcb, tableName); BagTableToRemove bagTableToRemove = new BagTableToRemove(tableName, bagTablesToRemove); bagTablesInDatabase.add(bagTableToRemove); return bagTableToRemove; }