Examples of DBObjectBundle


Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

    public boolean isLeafTreeElement() {
        return getConnectionHandlers().size() == 0;
    }

    public int getIndexOfTreeChild(BrowserTreeNode child) {
        DBObjectBundle objectBundle = (DBObjectBundle) child;
        return getConnectionHandlers().indexOf(objectBundle.getConnectionHandler());
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

        ConnectionHandler connectionHandler = sourceScope.getActiveConnection();
        Set<DBObject> parentObjects = null;
        Set<DBObjectType> parentTypes = objectType.getGenericParents();
        if (parentTypes.size() > 0) {
            if (objectType.isSchemaObject() && connectionHandler != null && !connectionHandler.isVirtual()) {
                DBObjectBundle objectBundle = connectionHandler.getObjectBundle();

                if (filter == null || filter.acceptsCurrentSchemaObject(objectType)) {
                    DBSchema currentSchema = sourceScope.getCurrentSchema();
                    parentObjects = addObjectToSet(parentObjects, currentSchema);
                }

                if (filter == null || filter.acceptsPublicSchemaObject(objectType)) {
                    DBSchema publicSchema = objectBundle.getPublicSchema();
                    parentObjects = addObjectToSet(parentObjects, publicSchema);
                }
            }

            Set<BasePsiElement> parentObjectPsiElements = null;
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

    private void loadElements(List<BrowserTreeNode> nodes, BrowserTreeNode browserTreeNode) {
        if (browserTreeNode.isTreeStructureLoaded()) {
            if (browserTreeNode instanceof ConnectionBundle) {
                ConnectionBundle connectionBundle = (ConnectionBundle) browserTreeNode;
                for (ConnectionHandler connectionHandler : connectionBundle.getConnectionHandlers()){
                    DBObjectBundle objectBundle = connectionHandler.getObjectBundle();
                    loadElements(nodes, objectBundle);
                }
            }
            else {
                for (BrowserTreeNode treeNode : browserTreeNode.getTreeChildren()) {
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

                        }
                    }.start();

                }
            } else if (lastPathEntity instanceof DBObjectBundle) {
                DBObjectBundle objectBundle = (DBObjectBundle) lastPathEntity;
                ConnectionHandler connectionHandler = objectBundle.getConnectionHandler();
                FileEditorManager fileEditorManager = FileEditorManager.getInstance(connectionHandler.getProject());
                fileEditorManager.openFile(connectionHandler.getSQLConsoleFile(), true);
            }
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

                            return;
                        }
                    }
                }

                DBObjectBundle objectBundle = activeConnection.getObjectBundle();
                PsiElement referencedElement = objectBundle.getObject(objectType, ref.getText().toString());
                if (isValidReference(referencedElement)) {
                    ref.setParent(null);
                    ref.setReferencedElement(referencedElement);
                    setElementType(substitutionCandidate);
                    return;
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

        scale = resultSet.getInt("DATA_SCALE");

        String typeOwner = resultSet.getString("DATA_TYPE_OWNER");
        String typePackage = resultSet.getString("DATA_TYPE_PACKAGE");
        String dataTypeName = resultSet.getString("DATA_TYPE_NAME");
        DBObjectBundle objectBundle = parent.getConnectionHandler().getObjectBundle();
        if (typeOwner != null) {
            DBSchema typeSchema = objectBundle.getSchema(typeOwner);
            if (typePackage != null) {
                DBPackage packagee = typeSchema.getPackage(typePackage);
                declaredType = packagee.getType(dataTypeName);
            } else {
                declaredType = typeSchema.getType(dataTypeName);
            }
            if (declaredType == null) typeName = dataTypeName;
        } else {
            nativeDataType = objectBundle.getNativeDataType(dataTypeName);
            if (nativeDataType == null) typeName = dataTypeName;
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

        DBObjectType objectType = identifierElementType.getObjectType();
        PsiElement sourceElement = context.getElementAtCaret();
        ConnectionHandler connectionHandler = context.getConnectionHandler();

        if (connectionHandler != null ) {
            DBObjectBundle objectBundle = connectionHandler.getObjectBundle();
            if (sourceElement.getParent() instanceof QualifiedIdentifierPsiElement && sourceElement.getParent().getFirstChild() != sourceElement) {
                QualifiedIdentifierPsiElement qualifiedIdentifierPsiElement = (QualifiedIdentifierPsiElement) sourceElement.getOriginalElement().getParent();
                DBObject parentObject = qualifiedIdentifierPsiElement.lookupParentObjectFor(identifierElementType);
                if (parentObject != null) {
                    DBSchema currentSchema = PsiUtil.getCurrentSchema(sourceScope);
                    objectBundle.lookupChildObjectsOfType(
                            consumer,
                            parentObject,
                            objectType,
                            filter,
                            currentSchema);

                }
            } else if (!identifierElementType.isLocalReference()){
                Set<DBObject> parentObjects = LeafPsiElement.identifyPotentialParentObjects(objectType, filter, sourceScope, null);
                if (parentObjects != null && parentObjects.size() > 0) {
                    for (DBObject parentObject : parentObjects) {
                        DBSchema currentSchema = PsiUtil.getCurrentSchema(sourceScope);
                        objectBundle.lookupChildObjectsOfType(
                                consumer,
                                parentObject.getUndisposedElement(),
                                objectType,
                                filter,
                                currentSchema);
                    }
                } else {
                    if (filter.acceptsRootObject(objectType)) {
                        objectBundle.lookupObjectsOfType(
                                consumer,
                                objectType);
                    }
                }
            }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

    }

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

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

        isSystemView = resultSet.getString("IS_SYSTEM_VIEW").equals("Y");
        if (isSystemView) setContentType(DBContentType.DATA);
        String typeOwner = resultSet.getString("VIEW_TYPE_OWNER");
        String typeName = resultSet.getString("VIEW_TYPE");
        if (typeOwner != null && typeName != null) {
            DBObjectBundle objectBundle = getConnectionHandler().getObjectBundle();
            DBSchema typeSchema = objectBundle.getSchema(typeOwner);
            type = typeSchema.getType(typeName);
        }
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.common.DBObjectBundle

    }

    @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
TOP
Copyright © 2018 www.massapi.com. 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.