org.hsqldb.lib.Iterator.hasNext() - java examples

Here are the examples of the java api org.hsqldb.lib.Iterator.hasNext() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

109 Examples 7

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright Apache License 2.0
Author : SERG-Delft
synchronized public void clearRoutineTables() {
    if (rowStoreMapRoutine.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapRoutine.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
    rowStoreMapRoutine.clear();
}

19 View Complete Implementation : GranteeManager.java
Copyright Apache License 2.0
Author : SERG-Delft
private void updateAddColumn(HsqlName table) {
    // roles
    Iterator it = getRoles().iterator();
    while (it.hasNext()) {
        Grantee grantee = (Grantee) it.next();
        grantee.updateRightsForNewColumn(table);
    }
    // users
    it = getGrantees().iterator();
    for (; it.hasNext(); ) {
        Grantee grantee = (Grantee) it.next();
        grantee.updateRightsForNewColumn(table);
    }
}

19 View Complete Implementation : SessionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public synchronized void removeSchemaReference(Schema schema) {
    Iterator it = sessionMap.values().iterator();
    for (int i = 0; it.hasNext(); i++) {
        Session session = (Session) it.next();
        if (session.currentSchema == schema.name) {
            session.resetSchema();
        }
    }
}

19 View Complete Implementation : PersistentStoreCollectionDatabase.java
Copyright Apache License 2.0
Author : SERG-Delft
public void release() {
    if (rowStoreMap.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMap.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
    rowStoreMap.clear();
}

19 View Complete Implementation : TransactionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Convert row ID's for cached table rows in transactions
 */
public void convertTransactionIDs(DoubleIntIndex lookup) {
    writeLock.lock();
    try {
        RowAction[] list = new RowAction[rowActionMap.size()];
        Iterator it = this.rowActionMap.values().iterator();
        for (int i = 0; it.hasNext(); i++) {
            list[i] = (RowAction) it.next();
        }
        rowActionMap.clear();
        for (int i = 0; i < list.length; i++) {
            int pos = lookup.lookupFirstEqual(list[i].getPos());
            list[i].setPos(pos);
            rowActionMap.put(pos, list[i]);
        }
    } finally {
        writeLock.unlock();
    }
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
boolean hreplacedchemas(Grantee grantee) {
    Iterator it = schemaMap.values().iterator();
    while (it.hasNext()) {
        Schema schema = (Schema) it.next();
        if (grantee.equals(schema.owner)) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : Grantee.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Revokes the specified rights on the specified database object. <p>
 *
 * If, after removing the specified rights, no rights remain on the
 * database object, then the key/value pair for that object is removed
 * from the rights map
 */
void revoke(SchemaObject object, Right right, Grantee grantor, boolean grantOption) {
    HsqlName name = object.getName();
    if (object instanceof Routine) {
        name = ((Routine) object).getSpecificName();
    }
    Iterator it = directRightsMap.get(name);
    Right existing = null;
    while (it.hasNext()) {
        existing = (Right) it.next();
        if (existing.grantor == grantor) {
            break;
        }
    }
    if (existing == null) {
        return;
    }
    if (existing.grantableRights != null) {
        existing.grantableRights.remove(object, right);
    }
    if (grantOption) {
        return;
    }
    if (right.isFull) {
        directRightsMap.remove(name, existing);
        grantor.grantedRightsMap.remove(name, existing);
        updateAllRights();
        return;
    }
    existing.remove(object, right);
    if (existing.isEmpty()) {
        directRightsMap.remove(name, existing);
        grantor.grantedRightsMap.remove(name, existing);
    }
    updateAllRights();
}

19 View Complete Implementation : Grantee.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Revokes the specified rights on the specified database object. <p>
 *
 * If, after removing the specified rights, no rights remain on the
 * database object, then the key/value pair for that object is removed
 * from the rights map
 */
void revoke(SchemaObject object, Right right, Grantee grantor, boolean grantOption) {
    final HsqlName name = object.getName();
    Iterator it = directRightsMap.get(name);
    Right existing = null;
    while (it.hasNext()) {
        existing = (Right) it.next();
        if (existing.grantor == grantor) {
            break;
        }
    }
    if (existing == null) {
        return;
    }
    if (existing.grantableRights != null) {
        existing.grantableRights.remove(object, right);
    }
    if (grantOption) {
        return;
    }
    if (right.isFull) {
        directRightsMap.remove(name, existing);
        grantor.grantedRightsMap.remove(name, existing);
        updateAllRights();
        return;
    }
    existing.remove(object, right);
    if (existing.isEmpty()) {
        directRightsMap.remove(name, existing);
        grantor.grantedRightsMap.remove(object, existing);
    }
    updateAllRights();
    return;
}

19 View Complete Implementation : SessionManager.java
Copyright Apache License 2.0
Author : SERG-Delft
public synchronized boolean isUserActive(String userName) {
    Iterator it = sessionMap.values().iterator();
    for (int i = 0; it.hasNext(); i++) {
        Session session = (Session) it.next();
        if (!session.isClosed() && userName.equals(session.getUser().getName().getNameString())) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : Schema.java
Copyright GNU General Public License v3.0
Author : apavlo
public String[] getTriggerSQL() {
    HsqlArrayList list = new HsqlArrayList();
    Iterator it = tableLookup.map.values().iterator();
    while (it.hasNext()) {
        Table table = (Table) it.next();
        String[] ddl = table.getTriggerSQL();
        list.addAll(ddl);
    }
    String[] array = new String[list.size()];
    list.toArray(array);
    return array;
}

19 View Complete Implementation : DataFileCacheSession.java
Copyright Apache License 2.0
Author : SERG-Delft
protected void clear() {
    Iterator it = cache.gereplacederator();
    while (it.hasNext()) {
        CachedObject row = (CachedObject) it.next();
        row.setInMemory(false);
        row.destroy();
    }
    cache.clear();
    fileStartFreePosition = fileFreePosition = initialFreePos;
    initBuffers();
}

19 View Complete Implementation : TransactionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Return a lookup of all row ids for cached tables in transactions.
 * For auto-defrag, as currently there will be no RowAction entries
 * at the time of defrag.
 */
public DoubleIntIndex getTransactionIDList() {
    writeLock.lock();
    try {
        DoubleIntIndex lookup = new DoubleIntIndex(10, false);
        lookup.setKeysSearchTarget();
        Iterator it = this.rowActionMap.keySet().iterator();
        for (; it.hasNext(); ) {
            lookup.addUnique(it.nextInt(), 0);
        }
        return lookup;
    } finally {
        writeLock.unlock();
    }
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
void clearStructures() {
    Iterator it = schemaMap.values().iterator();
    while (it.hasNext()) {
        Schema schema = (Schema) it.next();
        schema.clearStructures();
    }
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright Apache License 2.0
Author : SERG-Delft
synchronized public void clearStatementTables() {
    if (rowStoreMapStatement.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapStatement.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
    rowStoreMapStatement.clear();
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright GNU General Public License v3.0
Author : apavlo
public void clearSessionTables() {
    if (rowStoreMapSession.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapSession.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
}

19 View Complete Implementation : TextTableStorageManager.java
Copyright Apache License 2.0
Author : SERG-Delft
public void closeAllTextCaches(boolean delete) {
    Iterator it = textCacheList.values().iterator();
    while (it.hasNext()) {
        TextCache textCache = ((TextCache) it.next());
        // use textCache.table to cover both cache and table readonly
        if (delete && !textCache.table.isDataReadOnly()) {
            textCache.purge();
        } else {
            textCache.close();
        }
    }
}

19 View Complete Implementation : SessionData.java
Copyright GNU General Public License v3.0
Author : apavlo
// LOBs
// if rolled back, delete created lobs and ignore all changes
// if committed,
// delete created lobs that have no usage count (due to constraint violation or savepoint rollback)
// update LobManager user counts, delete lobs that have no usage
public void updateLobUsage(boolean commit) {
    if (!hasLobOps) {
        return;
    }
    hasLobOps = false;
    if (commit) {
        for (int i = 0; i < createdLobs.size(); i++) {
            long lobID = createdLobs.get(i);
            int delta = lobUsageCount.get(lobID, 0);
            if (delta == 1) {
                lobUsageCount.remove(lobID);
                createdLobs.remove(i);
                i--;
            } else if (!session.isBatch) {
                database.lobManager.adjustUsageCount(lobID, delta - 1);
                lobUsageCount.remove(lobID);
                createdLobs.remove(i);
                i--;
            }
        }
        if (!lobUsageCount.isEmpty()) {
            Iterator it = lobUsageCount.keySet().iterator();
            while (it.hasNext()) {
                long lobID = it.nextLong();
                int delta = lobUsageCount.get(lobID);
                database.lobManager.adjustUsageCount(lobID, delta - 1);
            }
            lobUsageCount.clear();
        }
        return;
    } else {
        for (int i = 0; i < createdLobs.size(); i++) {
            long lobID = createdLobs.get(i);
            database.lobManager.deleteLob(lobID);
        }
        createdLobs.clear();
        lobUsageCount.clear();
        return;
    }
}

19 View Complete Implementation : GranteeManager.java
Copyright Apache License 2.0
Author : SERG-Delft
public String[] getRightsSQL() {
    HsqlArrayList list = new HsqlArrayList();
    Iterator grantees = getGrantees().iterator();
    while (grantees.hasNext()) {
        Grantee grantee = (Grantee) grantees.next();
        String name = grantee.getName().getNameString();
        // _SYSTEM user, DBA Role grants not persisted
        if (GranteeManager.isImmutable(name)) {
            continue;
        }
        if (grantee instanceof User && ((User) grantee).isExternalOnly) {
            continue;
        }
        HsqlArrayList subList = grantee.getRightsSQL();
        list.addAll(subList);
    }
    String[] array = new String[list.size()];
    list.toArray(array);
    return array;
}

19 View Complete Implementation : Log.java
Copyright GNU General Public License v3.0
Author : apavlo
private void closeAllTextCaches(boolean compact) {
    Iterator it = textCacheList.values().iterator();
    while (it.hasNext()) {
        if (compact) {
            ((TextCache) it.next()).purge();
        } else {
            ((TextCache) it.next()).close(true);
        }
    }
}

19 View Complete Implementation : SchemaObjectSet.java
Copyright Apache License 2.0
Author : SERG-Delft
void removeParent(HsqlName parent) {
    Iterator it = map.values().iterator();
    while (it.hasNext()) {
        if (type == SchemaObject.TRIGGER || type == SchemaObject.SPECIFIC_ROUTINE) {
            SchemaObject object = (SchemaObject) it.next();
            if (object.getName().parent == parent) {
                it.remove();
            }
        } else {
            HsqlName name = (HsqlName) it.next();
            if (name.parent == parent) {
                it.remove();
            }
        }
    }
}

19 View Complete Implementation : SessionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public synchronized void resetLoggedSchemas() {
    Iterator it = sessionMap.values().iterator();
    for (int i = 0; it.hasNext(); i++) {
        Session session = (Session) it.next();
        session.resetSchema();
    }
    sysLobSession.resetSchema();
}

19 View Complete Implementation : StatementManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Used after a DDL change that could impact the compiled statements.
 * Clears references to CompiledStatement objects while keeping the counts
 * and references to the sql strings.
 */
synchronized void resetStatements() {
    Iterator it = csidMap.values().iterator();
    while (it.hasNext()) {
        Statement cs = (Statement) it.next();
        cs.clearVariables();
    }
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright GNU General Public License v3.0
Author : apavlo
public void clearStatementTables() {
    if (rowStoreMapStatement.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapStatement.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
}

19 View Complete Implementation : TransactionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
void unlockTablesTPL(Session session) {
    Iterator it = tableWriteLocks.values().iterator();
    while (it.hasNext()) {
        Session s = (Session) it.next();
        if (s == session) {
            it.setValue(null);
        }
    }
    it = tableReadLocks.values().iterator();
    while (it.hasNext()) {
        Session s = (Session) it.next();
        if (s == session) {
            it.remove();
        }
    }
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * drop all schemas with the given authorisation
 */
void dropSchemas(Grantee grantee, boolean cascade) {
    HsqlArrayList list = getSchemas(grantee);
    Iterator it = list.iterator();
    while (it.hasNext()) {
        Schema schema = (Schema) it.next();
        dropSchema(schema.name.name, cascade);
    }
}

19 View Complete Implementation : DatabaseManager.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Returns a vector containing the URI (type + path) for all the databases.
 */
public static Vector getDatabaseURIs() {
    Vector v = new Vector();
    synchronized (databaseIDMap) {
        Iterator it = databaseIDMap.values().iterator();
        while (it.hasNext()) {
            Database db = (Database) it.next();
            v.addElement(db.getURI());
        }
    }
    return v;
}

19 View Complete Implementation : TransactionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
boolean setWaitedSessionsTPL(Session session, Statement cs) {
    session.tempSet.clear();
    if (cs == null || session.abortTransaction) {
        return true;
    }
    HsqlName[] nameList = cs.getTableNamesForWrite();
    for (int i = 0; i < nameList.length; i++) {
        HsqlName name = nameList[i];
        if (name.schema == SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) {
            continue;
        }
        Session holder = (Session) tableWriteLocks.get(name);
        if (holder != null && holder != session) {
            session.tempSet.add(holder);
        }
        Iterator it = tableReadLocks.get(name);
        while (it.hasNext()) {
            holder = (Session) it.next();
            if (holder != session) {
                session.tempSet.add(holder);
            }
        }
    }
    nameList = cs.getTableNamesForRead();
    for (int i = 0; i < nameList.length; i++) {
        HsqlName name = nameList[i];
        if (name.schema == SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) {
            continue;
        }
        Session holder = (Session) tableWriteLocks.get(name);
        if (holder != null && holder != session) {
            session.tempSet.add(holder);
        }
    }
    for (int i = 0; i < session.waitingSessions.size(); i++) {
        Session current = (Session) session.waitingSessions.get(i);
        if (session.tempSet.contains(current)) {
            session.tempSet.clear();
            return false;
        }
    }
    return true;
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public Iterator databaseObjecreplacederator(int type) {
    Iterator it = schemaMap.values().iterator();
    Iterator objects = new WrapperIterator();
    while (it.hasNext()) {
        Schema temp = (Schema) it.next();
        objects = new WrapperIterator(objects, temp.schemaObjecreplacederator(type));
    }
    return objects;
}

19 View Complete Implementation : HsqlDatabaseProperties.java
Copyright Apache License 2.0
Author : SERG-Delft
public Set getUserDefinedPropertyData() {
    Set set = new HashSet();
    Iterator it = dbMeta.values().iterator();
    while (it.hasNext()) {
        Object[] row = (Object[]) it.next();
        if (((Integer) row[HsqlProperties.indexType]).intValue() == SQL_PROPERTY) {
            set.add(row);
        }
    }
    return set;
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright GNU General Public License v3.0
Author : apavlo
public void clearTransactionTables() {
    if (rowStoreMapTransaction.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapTransaction.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright Apache License 2.0
Author : SERG-Delft
synchronized public void clearTransactionTables() {
    if (rowStoreMapTransaction.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapTransaction.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
    rowStoreMapTransaction.clear();
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 *  Returns an HsqlArrayList containing references to all non-system
 *  tables and views. This includes all tables and views registered with
 *  this Database.
 */
public HsqlArrayList getAllTables() {
    Iterator schemas = allSchemaNameIterator();
    HsqlArrayList alltables = new HsqlArrayList();
    while (schemas.hasNext()) {
        String name = (String) schemas.next();
        HashMappedList current = getTables(name);
        alltables.addAll(current.values());
    }
    return alltables;
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright Apache License 2.0
Author : SERG-Delft
synchronized public void clearSessionTables() {
    if (rowStoreMapSession.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapSession.values().iterator();
    while (it.hasNext()) {
        PersistentStore store = (PersistentStore) it.next();
        store.release();
    }
    rowStoreMapSession.clear();
}

19 View Complete Implementation : Log.java
Copyright GNU General Public License v3.0
Author : apavlo
private boolean isAnyTextCacheModified() {
    Iterator it = textCacheList.values().iterator();
    while (it.hasNext()) {
        if (((TextCache) it.next()).isFileModified()) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : TextTableStorageManager.java
Copyright Apache License 2.0
Author : SERG-Delft
public boolean isAnyTextCacheModified() {
    Iterator it = textCacheList.values().iterator();
    while (it.hasNext()) {
        if (((TextCache) it.next()).isModified()) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : SchemaObjectSet.java
Copyright GNU General Public License v3.0
Author : apavlo
void removeParent(HsqlName parent) {
    Iterator it = map.values().iterator();
    while (it.hasNext()) {
        if (type == SchemaObject.TRIGGER) {
            SchemaObject trigger = (SchemaObject) it.next();
            if (trigger.getName().parent == parent) {
                it.remove();
            }
        } else {
            HsqlName name = (HsqlName) it.next();
            if (name.parent == parent) {
                it.remove();
            }
        }
    }
}

19 View Complete Implementation : Grantee.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Update own table column set rights to include a newly created column.<p?
 */
void updateRightsForNewColumn(HsqlName tableName, HsqlName columnName) {
    Iterator it = directRightsMap.get(tableName);
    Right existing = null;
    while (it.hasNext()) {
        existing = (Right) it.next();
    }
    if (existing == null) {
        return;
    }
    existing.addNewColumn(columnName);
    updateAllRights();
}

19 View Complete Implementation : Grantee.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Iteration of all visible grantees, including self. <p>
 *
 * For grantees with admin, this is all grantees.
 * For regular grantees, this is self plus all roles granted directly
 * or indirectly
 */
public Set visibleGrantees() {
    HashSet grantees = new HashSet();
    GranteeManager gm = granteeManager;
    if (isAdmin()) {
        grantees.addAll(gm.getGrantees());
    } else {
        grantees.add(this);
        Iterator it = getAllRoles().iterator();
        while (it.hasNext()) {
            grantees.add(it.next());
        }
    }
    return grantees;
}

19 View Complete Implementation : Grantee.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Update granted rights to include a newly created column.<p?
 */
void updateRightsForNewColumn(HsqlName tableName) {
    Iterator it = grantedRightsMap.get(tableName);
    Right existing = null;
    while (it.hasNext()) {
        existing = (Right) it.next();
    }
    if (existing == null) {
        return;
    }
    updateAllRights();
}

19 View Complete Implementation : SessionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public synchronized boolean isUserActive(String userName) {
    Iterator it = sessionMap.values().iterator();
    for (int i = 0; it.hasNext(); i++) {
        Session session = (Session) it.next();
        if (userName.equals(session.getGrantee().getNameString())) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : GranteeManager.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Updates all the talbe level rights on a table after the addition of a
 * column.<p>
 */
public void updateAddColumn(HsqlName table, HsqlName column) {
    // roles
    Iterator it = getRoles().iterator();
    while (it.hasNext()) {
        Grantee grantee = (Grantee) it.next();
        grantee.updateRightsForNewColumn(table, column);
    }
    // users
    it = getGrantees().iterator();
    for (; it.hasNext(); ) {
        Grantee grantee = (Grantee) it.next();
        grantee.updateRightsForNewColumn(table, column);
    }
    updateAddColumn(table);
}

19 View Complete Implementation : HsqlDatabaseProperties.java
Copyright GNU General Public License v3.0
Author : apavlo
public Set getUserDefinedPropertyData() {
    Set set = new HashSet();
    Iterator it = meta.values().iterator();
    while (it.hasNext()) {
        Object[] row = (Object[]) it.next();
        if (((Integer) row[indexType]).intValue() == SET_PROPERTY) {
            set.add(row);
        }
    }
    return set;
}

19 View Complete Implementation : Schema.java
Copyright Apache License 2.0
Author : SERG-Delft
public HsqlArrayList getTriggerSQL() {
    HsqlArrayList list = new HsqlArrayList();
    Iterator it = tableLookup.map.values().iterator();
    while (it.hasNext()) {
        Table table = (Table) it.next();
        String[] ddl = table.getTriggerSQL();
        list.addAll(ddl);
    }
    return list;
}

19 View Complete Implementation : SessionManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public synchronized Session[] getAllSessions() {
    Session[] sessions = new Session[sessionMap.size()];
    Iterator it = sessionMap.values().iterator();
    for (int i = 0; it.hasNext(); i++) {
        sessions[i] = (Session) it.next();
    }
    return sessions;
}

19 View Complete Implementation : GranteeManager.java
Copyright GNU General Public License v3.0
Author : apavlo
public String[] getRightstSQL() {
    HsqlArrayList list = new HsqlArrayList();
    Iterator grantees = getGrantees().iterator();
    while (grantees.hasNext()) {
        Grantee grantee = (Grantee) grantees.next();
        String name = grantee.getNameString();
        // _SYSTEM user, DBA Role grants not persisted
        if (GranteeManager.isImmutable(name)) {
            continue;
        }
        HsqlArrayList subList = grantee.getRightsSQL();
        list.addAll(subList);
    }
    String[] array = new String[list.size()];
    list.toArray(array);
    return array;
}

19 View Complete Implementation : Cache.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * Writes out all modified cached Rows.
 */
synchronized void saveAll() {
    Iterator it = new BaseHareplacederator();
    int savecount = 0;
    for (; it.hasNext(); ) {
        CachedObject r = (CachedObject) it.next();
        if (r.hasChanged()) {
            rowTable[savecount++] = r;
        }
    }
    saveRows(savecount);
    Error.printSystemOut(saveAllTimer.elapsedTimeToMessage("Cache.saveRow() total row save time"));
    Error.printSystemOut("Cache.saveRow() total row save count = " + saveRowCount);
    Error.printSystemOut(makeRowTimer.elapsedTimeToMessage("Cache.makeRow() total row load time"));
    Error.printSystemOut("Cache.makeRow() total row load count = " + makeRowCount);
    Error.printSystemOut(sortTimer.elapsedTimeToMessage("Cache.sort() total time"));
}

19 View Complete Implementation : Log.java
Copyright GNU General Public License v3.0
Author : apavlo
private void reopenAllTextCaches() {
    Iterator it = textCacheList.values().iterator();
    while (it.hasNext()) {
        ((TextCache) it.next()).reopen();
    }
}

19 View Complete Implementation : PersistentStoreCollectionSession.java
Copyright GNU General Public License v3.0
Author : apavlo
public void clearResultTables(long actionTimestamp) {
    if (rowStoreMapSession.isEmpty()) {
        return;
    }
    Iterator it = rowStoreMapSession.values().iterator();
    while (it.hasNext()) {
        RowStoreAVL store = (RowStoreAVL) it.next();
        if (store.timestamp == actionTimestamp) {
            store.release();
        }
    }
}

19 View Complete Implementation : SchemaManager.java
Copyright GNU General Public License v3.0
Author : apavlo
/**
 * is a grantee the authorization of any schema
 */
boolean isSchemaAuthorisation(Grantee grantee) {
    Iterator schemas = allSchemaNameIterator();
    while (schemas.hasNext()) {
        String schemaName = (String) schemas.next();
        if (grantee.equals(toSchemaOwner(schemaName))) {
            return true;
        }
    }
    return false;
}

19 View Complete Implementation : DatabaseManager.java
Copyright Apache License 2.0
Author : SERG-Delft
/**
 * Closes all the databases using the given mode.<p>
 *
 * CLOSEMODE_IMMEDIATELY = 1;
 * CLOSEMODE_NORMAL      = 2;
 * CLOSEMODE_COMPACT     = 3;
 * CLOSEMODE_SCRIPT      = 4;
 */
public static void closeDatabases(int mode) {
    synchronized (databaseIDMap) {
        Iterator it = databaseIDMap.values().iterator();
        while (it.hasNext()) {
            Database db = (Database) it.next();
            try {
                db.close(mode);
            } catch (HsqlException e) {
            }
        }
    }
}