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

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


    @Override
    protected void initLists() {
        DBObjectProperties properties = getProperties();
        if (properties.is(DBObjectProperty.REFERENCEABLE)) {
            DBObjectListContainer childObjects = initChildObjects();
            referencedObjects = childObjects.createObjectList(DBObjectType.ANY, this, REFERENCED_OBJECTS_LOADER, false, true);
            referencingObjects = childObjects.createObjectList(DBObjectType.ANY, this, REFERENCING_OBJECTS_LOADER, false, true);
        }
    }
View Full Code Here


    @Override
    protected void initLists() {
        super.initLists();
        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

        name = resultSet.getString("ROLE_NAME");
    }

    @Override
    protected void initLists() {
        DBObjectListContainer ol = initChildObjects();
        DBObjectBundle sourceContentHolder = getConnectionHandler().getObjectBundle();
        privileges = ol.createSubcontentObjectList(DBObjectType.GRANTED_PRIVILEGE, this, PRIVILEGES_LOADER, sourceContentHolder, DBObjectRelationType.ROLE_PRIVILEGE, true);
        grantedRoles = ol.createSubcontentObjectList(DBObjectType.GRANTED_ROLE, this, ROLES_LOADER, sourceContentHolder, DBObjectRelationType.ROLE_ROLE, true);
    }
View Full Code Here

        return childObjectRelations;
    }

    public DBObjectListContainer initChildObjects() {
        if (childObjects == null) {
            childObjects = new DBObjectListContainer(this);
        }
        return childObjects;
    }
View Full Code Here

    public BrowserTreeNode getTreeParent() {
        if (parentObject != null){
            DBObject object = parentObject.get();
            if (object != null) {
                DBObjectListContainer childObjects = object.getChildObjects();
                if (childObjects != null) {
                    return childObjects.getObjectList(getObjectType());
                }
            }
        } else if (objectBundle != null) {
            return objectBundle.getObjectListContainer().getObjectList(getObjectType());
        }
View Full Code Here

        objectStatus.set(DBObjectStatus.DEBUG, isDebug);
    }

    protected void initLists() {
        super.initLists();
        DBObjectListContainer container = initChildObjects();
        arguments = container.createSubcontentObjectList(DBObjectType.ARGUMENT, this, ARGUMENTS_LOADER, getSchema(), true);
    }
View Full Code Here

        new BackgroundTask(project, "Opening editor", false, true) {
            @Override
            public void execute(@NotNull ProgressIndicator progressIndicator) {
                initProgressIndicator(progressIndicator, true);
                if (object.getProperties().is(DBObjectProperty.SCHEMA_OBJECT)) {
                    DBObjectListContainer childObjects = object.getChildObjects();
                    if (childObjects != null) childObjects.load();
                    openSchemaObject((DBSchemaObject) object, progressIndicator, scroll);

                } else if (object.getParentObject().getProperties().is(DBObjectProperty.SCHEMA_OBJECT)) {
                    DBObjectListContainer childObjects = object.getParentObject().getChildObjects();
                    if (childObjects != null) childObjects.load();
                    openChildObject(object, progressIndicator, scroll);
                }

            }
        }.start();
View Full Code Here

    @NotNull
    public PsiElement[] getChildren() {
        DBObject object = getObject();
        if (object != null) {
            List<PsiElement> children = new ArrayList<PsiElement>();
            DBObjectListContainer childObjects = object.getChildObjects();
            if (childObjects != null) {
                Collection<DBObjectList<DBObject>> objectLists = childObjects.getObjectLists();
                if (objectLists != null) {
                    for (DBObjectList objectList : objectLists) {
                        children.add(NavigationPsiCache.getPsiDirectory(objectList));
                    }
                    return children.toArray(new PsiElement[children.size()]);
View Full Code Here

    public void visitObjectList(DBObjectList<DBObject> objectList) {
        List<DBObject> objects = objectList.getObjects();

        if (!objectList.getDependencyAdapter().isSubContent()) {
            for (DBObject object : objects) {
                DBObjectListContainer childObjects = object.getChildObjects();
                if (childObjects != null) {
                    childObjects.visitLists(this, false);
                }
            }
        }
    }
View Full Code Here

        if (selectedConnection == null || selectedConnection instanceof VirtualConnectionHandler) {
            ConnectionManager connectionManager = ConnectionManager.getInstance(project);
            Set<ConnectionHandler> connectionHandlers = connectionManager.getConnectionHandlers();
            for (ConnectionHandler connectionHandler : connectionHandlers) {
                if (breakLoad()) break;
                DBObjectListContainer objectListContainer = connectionHandler.getObjectBundle().getObjectListContainer();
                objectListContainer.visitLists(visitor, false);
            }
        } else {
            DBSchema schema = DBObjectRef.get(selectedSchema);
            DBObjectListContainer objectListContainer =
                    schema == null ?
                            selectedConnection.getObjectBundle().getObjectListContainer() :
                            schema.getChildObjects();
            if (objectListContainer != null) {
                objectListContainer.visitLists(visitor, false);
            }
        }
    }
View Full Code Here

TOP

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

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.