/** * Get the name of the sequence that will be used in the given circumstances * * @param isDistinct is a distinct table * @param isMap is a map table * @return the name of the sequence */ public String getSequenceName(boolean isDistinct, boolean isMap) { if (isDistinct || isMap) { return BrowseIndex.getSequenceName(number, isDistinct, isMap); } return BrowseIndex.getSequenceName(tableBaseName, isDistinct, isMap); }
/** * Get the name of the sequence that will be used in the given circumstances * * @param number the index configuration number * @param isDistinct is a distinct table * @param isMap is a map table * @return the name of the sequence */ public static String getSequenceName(int number, boolean isDistinct, boolean isMap) { return BrowseIndex.getSequenceName(makeTableBaseName(number), isDistinct, isMap); }
/** * drop the tables and related database entries for the internal * 'item' tables * * @param connection Database Connection * @param bix BrowseIndex * @throws BrowseException */ private void dropItemTables(Connection connection, BrowseIndex bix) throws BrowseException { if (DatabaseUtils.tableExists(connection, bix.getTableName())) { String tableName = bix.getTableName(); String sequence = bix.getSequenceName(false, false); // Drop table dropTable(connection, tableName); // Drop sequence dropSequence(connection, sequence); // These views are no longer used, but as we are cleaning the database, // they may exist and need to be removed String colViewName = bix.getTableName(false, true, false, false); String comViewName = bix.getTableName(true, false, false, false); // Drop Collection View dropView(connection, colViewName); // Drop Community View dropView(connection, comViewName); } }
String distinctTableName = BrowseIndex.getTableName(i, false, false, true, false); String distinctMapName = BrowseIndex.getTableName(i, false, false, false, true); String sequence = BrowseIndex.getSequenceName(i, false, false); String mapSequence = BrowseIndex.getSequenceName(i, false, true); String distinctSequence = BrowseIndex.getSequenceName(i, true, false);