Package org.hsqldb.lib

Examples of org.hsqldb.lib.OrderedHashSet


            if (callProcedure == null && usedRoutines.size() == 0) {
                return Routine.emptyArray;
            }

            OrderedHashSet set = new OrderedHashSet();

            for (int i = 0; i < usedRoutines.size(); i++) {
                FunctionSQLInvoked function =
                    (FunctionSQLInvoked) usedRoutines.get(i);

                set.add(function.routine);
            }

            if (callProcedure != null) {
                set.add(callProcedure);
            }

            Routine[] array = new Routine[set.size()];

            set.toArray(array);

            return array;
        }
View Full Code Here


            parameters.clear();
        }

        public OrderedHashSet getSchemaObjectNames() {

            OrderedHashSet set = new OrderedHashSet();

            for (int i = 0; i < usedSequences.size(); i++) {
                SchemaObject object = (SchemaObject) usedSequences.get(i);

                set.add(object.getName());
            }

            for (int i = 0; i < usedObjects.size(); i++) {
                SchemaObject object = (SchemaObject) usedObjects.get(i);

                set.add(object.getName());
            }

            for (int i = 0; i < rangeVariables.size(); i++) {
                RangeVariable range = (RangeVariable) rangeVariables.get(i);
                HsqlName      name  = range.rangeTable.getName();

                if (name.schema != SqlInvariants.SYSTEM_SCHEMA_HSQLNAME) {
                    set.add(range.rangeTable.getName());
                    set.addAll(range.getColumnNames());
                } else if (name.type == SchemaObject.TRANSITION) {
                    set.addAll(range.getColumnNames());
                }
            }

            Routine[] routines = getRoutines();

            for (int i = 0; i < routines.length; i++) {
                set.add(routines[i].getSpecificName());
            }

            return set;
        }
View Full Code Here

    public Grantee getOwner() {
        return SqlInvariants.INFORMATION_SCHEMA_HSQLNAME.owner;
    }

    public OrderedHashSet getReferences() {
        return new OrderedHashSet();
    }
View Full Code Here

    public Grantee getOwner() {
        return name.schema.owner;
    }

    public OrderedHashSet getReferences() {
        return new OrderedHashSet();
    }
View Full Code Here

        this.sessionUser            = user;
        this.zoneString             = zoneString;
        this.sessionTimeZoneSeconds = timeZoneSeconds;
        this.timeZoneSeconds        = timeZoneSeconds;
        rowActionList               = new HsqlArrayList(true);
        waitedSessions              = new OrderedHashSet();
        waitingSessions             = new OrderedHashSet();
        tempSet                     = new OrderedHashSet();
        isolationLevelDefault       = database.getDefaultIsolationLevel();
        isolationLevel              = isolationLevelDefault;
        sessionContext              = new SessionContext(this);
        sessionContext.isAutoCommit = ValuePool.getBoolean(autocommit);
        sessionContext.isReadOnly   = ValuePool.getBoolean(readonly);
View Full Code Here

    }

    // SEQUENCE current values
    void logSequences() {

        OrderedHashSet set = sessionData.sequenceUpdateSet;

        if (set == null || set.isEmpty()) {
            return;
        }

        for (int i = 0, size = set.size(); i < size; i++) {
            NumberSequence sequence = (NumberSequence) set.get(i);

            database.logger.writeSequenceStatement(this, sequence);
        }

        sessionData.sequenceUpdateSet.clear();
View Full Code Here

    }

    public OrderedHashSet getColumnNames() {

        if (columnNames == null) {
            columnNames = new OrderedHashSet();

            rangeTable.getColumnNames(this.usedColumns, columnNames);
        }

        return columnNames;
View Full Code Here

        return columnNames;
    }

    public OrderedHashSet getUniqueColumnNameSet() {

        OrderedHashSet set = new OrderedHashSet();

        if (columnAliases != null) {
            set.addAll(columnAliases);

            return set;
        }

        for (int i = 0; i < rangeTable.columnList.size(); i++) {
            String  name  = rangeTable.getColumn(i).getName().name;
            boolean added = set.add(name);

            if (!added) {
                throw Error.error(ErrorCode.X_42578, name);
            }
        }
View Full Code Here

            new RangeVariableConditions(this, false) };
    }

    OrderedHashSet getSubqueries() {

        OrderedHashSet set = null;

        if (joinCondition != null) {
            set = joinCondition.collectAllSubqueries(set);
        }

        if (rangeTable instanceof TableDerived) {
            QueryExpression baseQueryExpression =
                ((TableDerived) rangeTable).getQueryExpression();

            if (((TableDerived) rangeTable).view != null) {
                if (set == null) {
                    set = new OrderedHashSet();
                }

                set.addAll(((TableDerived) rangeTable).view.getSubqueries());
            } else if (baseQueryExpression == null) {
                set = OrderedHashSet.add(set, rangeTable.getSubQuery());
            } else {
                OrderedHashSet temp = baseQueryExpression.getSubqueries();

                set = OrderedHashSet.addAll(set, temp);
                set = OrderedHashSet.add(set, rangeTable.getSubQuery());
            }
        }
View Full Code Here

    }

    HsqlName[] getReferenceArray(HsqlName objectName, boolean cascade) {

        if (cascade) {
            OrderedHashSet names = new OrderedHashSet();

            database.schemaManager.getCascadingReferencingObjectNames(
                objectName, names);

            Iterator it = names.iterator();

            while (it.hasNext()) {
                HsqlName name = (HsqlName) it.next();

                if (name.type != SchemaObject.TABLE) {
                    it.remove();
                }
            }

            names.add(objectName);

            HsqlName[] array = new HsqlName[names.size()];

            names.toArray(array);

            return array;
        } else {
            return new HsqlName[]{ objectName };
        }
View Full Code Here

TOP

Related Classes of org.hsqldb.lib.OrderedHashSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.