Package com.dci.intellij.dbn.object.common.list

Examples of com.dci.intellij.dbn.object.common.list.DBObjectRelationListContainer


    }

    @Override
    protected void initLists() {
        DBObjectListContainer ol = initChildObjects();
        DBObjectRelationListContainer orl = initChildObjectRelations();

        tables = ol.createObjectList(DBObjectType.TABLE, this, TABLES_LOADER, true, false);
        views = ol.createObjectList(DBObjectType.VIEW, this, VIEWS_LOADER, true, false);
        materializedViews = ol.createObjectList(DBObjectType.MATERIALIZED_VIEW, this, MATERIALIZED_VIEWS_LOADER, true, false);
        synonyms = ol.createObjectList(DBObjectType.SYNONYM, this, SYNONYMS_LOADER, true, false);
        sequences = ol.createObjectList(DBObjectType.SEQUENCE, this, SEQUENCES_LOADER, true, false);
        procedures = ol.createObjectList(DBObjectType.PROCEDURE, this, PROCEDURES_LOADER, true, false);
        functions = ol.createObjectList(DBObjectType.FUNCTION, this, FUNCTIONS_LOADER, true, false);
        packages = ol.createObjectList(DBObjectType.PACKAGE, this, PACKAGES_LOADER, true, false);
        types = ol.createObjectList(DBObjectType.TYPE, this, TYPES_LOADER, true, false);
        dimensions = ol.createObjectList(DBObjectType.DIMENSION, this, DIMENSIONS_LOADER, true, false);
        clusters = ol.createObjectList(DBObjectType.CLUSTER, this, CLUSTERS_LOADER, true, false);
        databaseLinks = ol.createObjectList(DBObjectType.DBLINK, this, DATABASE_LINKS_LOADER, true, false);

        DBObjectList constraints = ol.createObjectList(DBObjectType.CONSTRAINT, this, CONSTRAINTS_LOADER, true, false);
        DBObjectList indexes = ol.createObjectList(DBObjectType.INDEX, this, INDEXES_LOADER, true, false);
        DBObjectList triggers = ol.createObjectList(DBObjectType.TRIGGER, this, TRIGGERS_LOADER, true, false);
        DBObjectList nestedTables = ol.createObjectList(DBObjectType.NESTED_TABLE, this, ALL_NESTED_TABLES_LOADER, true, false);
        DBObjectList columns = ol.createObjectList(DBObjectType.COLUMN, this, COLUMNS_LOADER, false, true);
        ol.createObjectList(DBObjectType.PACKAGE_FUNCTION, this, ALL_PACKAGE_FUNCTIONS_LOADER, false, true);
        ol.createObjectList(DBObjectType.PACKAGE_PROCEDURE, this, ALL_PACKAGE_PROCEDURES_LOADER, false, true);
        ol.createObjectList(DBObjectType.PACKAGE_TYPE, this, ALL_PACKAGE_TYPES_LOADER, false, true);
        ol.createObjectList(DBObjectType.TYPE_ATTRIBUTE, this, ALL_TYPE_ATTRIBUTES_LOADER, false, true);
        ol.createObjectList(DBObjectType.TYPE_FUNCTION, this, ALL_TYPE_FUNCTIONS_LOADER, false, true);
        ol.createObjectList(DBObjectType.TYPE_PROCEDURE, this, ALL_TYPE_PROCEDURES_LOADER, false, true);
        ol.createObjectList(DBObjectType.ARGUMENT, this, ALL_ARGUMENTS_LOADER, false, true);

        //ol.createHiddenObjectList(DBObjectType.TYPE_METHOD, this, TYPE_METHODS_LOADER);

        orl.createObjectRelationList(
                DBObjectRelationType.CONSTRAINT_COLUMN, this,
                "Constraint relations",
                CONSTRAINT_COLUMN_RELATION_LOADER,
                constraints,
                columns);

        orl.createObjectRelationList(
                DBObjectRelationType.INDEX_COLUMN, this,
                "Index relations",
                INDEX_COLUMN_RELATION_LOADER,
                indexes,
                columns);
View Full Code Here


        roles = objectLists.createObjectList(DBObjectType.ROLE, this, ROLES_LOADER, true, false);
        privileges = objectLists.createObjectList(DBObjectType.PRIVILEGE, this, PRIVILEGES_LOADER, true, false);
        charsets = objectLists.createObjectList(DBObjectType.CHARSET, this, CHARSETS_LOADER, true, false);
        allPossibleTreeChildren = DatabaseBrowserUtils.createList(schemas, users, roles, privileges, charsets);

        objectRelationLists = new DBObjectRelationListContainer(this);
        objectRelationLists.createObjectRelationList(
                DBObjectRelationType.USER_ROLE, this,
                "User role relations",
                USER_ROLE_RELATION_LOADER,
                users, roles);
View Full Code Here

    public List<DBConstraint> getConstraints() {
        return constraints.getObjects();
    }

    public int getConstraintPosition(DBConstraint constraint) {
        DBObjectRelationListContainer childObjectRelations = getDataset().getChildObjectRelations();
        if (childObjectRelations != null) {
            DBObjectRelationList<DBConstraintColumnRelation> constraintColumnRelations =
                    childObjectRelations.getObjectRelationList(DBObjectRelationType.CONSTRAINT_COLUMN);
            for (DBConstraintColumnRelation relation : constraintColumnRelations.getObjectRelations()) {
                if (relation.getColumn().equals(this) && relation.getConstraint().equals(constraint))
                    return relation.getPosition();
            }
        }
View Full Code Here

        }
        return 0;
    }

    public DBConstraint getConstraintForPosition(int position) {
        DBObjectRelationListContainer childObjectRelations = getDataset().getChildObjectRelations();
        if (childObjectRelations != null) {
            DBObjectRelationList<DBConstraintColumnRelation> constraintColumnRelations =
                    childObjectRelations.getObjectRelationList(DBObjectRelationType.CONSTRAINT_COLUMN);
            for (DBConstraintColumnRelation relation : constraintColumnRelations.getObjectRelations()) {
                if (relation.getColumn().equals(this) && relation.getPosition() == position) {
                    return relation.getConstraint();
                }
            }
View Full Code Here

    public List<DBColumn> getColumns() {
        return columns.getObjects();
    }

    public int getColumnPosition(DBColumn column) {
        DBObjectRelationListContainer childObjectRelations = getDataset().getChildObjectRelations();
        if (childObjectRelations != null) {
            DBObjectRelationList<DBConstraintColumnRelation> relations = childObjectRelations.getObjectRelationList(DBObjectRelationType.CONSTRAINT_COLUMN);
            for (DBConstraintColumnRelation relation : relations.getObjectRelations()) {
                if (relation.getConstraint().equals(this) && relation.getColumn().equals(column)) {
                    return relation.getPosition();
                }
            }
View Full Code Here

        }
        return 0;
    }

    public DBColumn getColumnForPosition(int position) {
        DBObjectRelationListContainer childObjectRelations = getDataset().getChildObjectRelations();
        if (childObjectRelations != null) {
            DBObjectRelationList<DBConstraintColumnRelation> relations = childObjectRelations.getObjectRelationList(DBObjectRelationType.CONSTRAINT_COLUMN);
            for (DBConstraintColumnRelation relation : relations.getObjectRelations()) {
                if (relation.getConstraint().equals(this) && relation.getPosition() == position)
                    return relation.getColumn();
            }
        }
View Full Code Here

        DBSchema schema = getSchema();
        DBObjectListContainer childObjects = initChildObjects();
        indexes = childObjects.createSubcontentObjectList(DBObjectType.INDEX, this, INDEXES_LOADER, schema, false);
        nestedTables = childObjects.createSubcontentObjectList(DBObjectType.NESTED_TABLE, this, NESTED_TABLES_LOADER, schema, false);

        DBObjectRelationListContainer childObjectRelations = initChildObjectRelations();
        childObjectRelations.createSubcontentObjectRelationList(DBObjectRelationType.INDEX_COLUMN, this, "Index column relations", INDEX_COLUMN_RELATION_LOADER, schema);
    }
View Full Code Here

        return childObjects;
    }

    public DBObjectRelationListContainer initChildObjectRelations() {
        if (childObjectRelations == null) {
            childObjectRelations = new DBObjectRelationListContainer(this);
        }
        return childObjectRelations;

    }
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.object.common.list.DBObjectRelationListContainer

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.