Examples of DBSchema


Examples of com.dci.intellij.dbn.object.DBSchema

    public void execute(ProgressIndicator progressIndicator) {
        progressIndicator.setText("Executing " + getStatementName());
        long startTimeMillis = System.currentTimeMillis();
        resultName = null;
        ConnectionHandler activeConnection = getActiveConnection();
        DBSchema currentSchema = getCurrentSchema();
        String originalStatementText = executablePsiElement == null ? executableStatement : executablePsiElement.getText();
        String executeStatementText = executablePsiElement == null ? executableStatement : executablePsiElement.prepareStatementText();

        StatementExecutionInput executionInput = new StatementExecutionInput(originalStatementText, executeStatementText, this);
        boolean continueExecution = true;
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        ConnectionManager connectionManager = ConnectionManager.getInstance(project);
        ConnectionHandler connectionHandler = connectionManager.getConnectionHandler(getConnectionId());
        if (connectionHandler != null) {
            int index = getDatasetName().lastIndexOf('.');
            String schemaName = getDatasetName().substring(0, index);
            DBSchema schema = connectionHandler.getObjectBundle().getSchema(schemaName);
            if (schema != null) {
                String datasetName = getDatasetName().substring(index + 1);
                return schema.getDataset(datasetName);
            }
        }
        return null;
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

    }

    @Override
    protected void initLists() {
        super.initLists();
        DBSchema schema = getSchema();
        DBObjectListContainer childObjects = initChildObjects();
        functions = childObjects.createSubcontentObjectList(DBObjectType.PACKAGE_FUNCTION, this, FUNCTIONS_LOADER, schema, false);
        procedures = childObjects.createSubcontentObjectList(DBObjectType.PACKAGE_PROCEDURE, this, PROCEDURES_LOADER, schema, false);
        types = childObjects.createSubcontentObjectList(DBObjectType.PACKAGE_TYPE, this, TYPES_LOADER, schema, true);
    }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

    protected void initLists() {
        super.initLists();
        if (!isCollection()) {
            DBObjectListContainer container = initChildObjects();
            DBSchema schema = getSchema();
            attributes = container.createSubcontentObjectList(DBObjectType.TYPE_ATTRIBUTE, this, ATTRIBUTES_LOADER, schema, true);
            procedures = container.createSubcontentObjectList(DBObjectType.TYPE_PROCEDURE, this, PROCEDURES_LOADER, schema, false);
            functions = container.createSubcontentObjectList(DBObjectType.TYPE_FUNCTION, this, FUNCTIONS_LOADER, schema, false);
            subTypes = container.createSubcontentObjectList(DBObjectType.TYPE, this, SUB_TYPES_LOADER, schema, true);
        }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        for (DBObject object : executable.getReferencedObjects()) {
            if (object instanceof DBSchemaObject && object != executable) {
                if (!progressIndicator.isCanceled()) {
                    DBSchemaObject schemaObject = (DBSchemaObject) object;
                    DBSchema schema = schemaObject.getSchema();
                    if (!schema.isPublicSchema() && !schema.isSystemSchema() && schemaObject.getStatus().has(DBObjectStatus.DEBUG)) {
                        if (!schemaObject.getStatus().is(DBObjectStatus.DEBUG)) {
                            compileList.add(schemaObject);
                            progressIndicator.setText("Loading dependencies of " + schemaObject.getQualifiedNameWithType());
                            schemaObject.getReferencedObjects();
                        }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

    public void lookupChildObjectsOfType(LookupConsumer consumer, DBObject parentObject, DBObjectType objectType, ObjectTypeFilter filter, DBSchema currentSchema) throws ConsumerStoppedException {
        if (getConnectionObjectTypeFilter().accepts(objectType)) {
            if (parentObject != null && currentSchema != null) {
                if (parentObject instanceof DBSchema) {
                    DBSchema schema = (DBSchema) parentObject;
                    if (objectType.isGeneric()) {
                        Set<DBObjectType> concreteTypes = objectType.getInheritingTypes();
                        for (DBObjectType concreteType : concreteTypes) {
                            consumer.check();
                            if (filter.acceptsObject(schema, currentSchema, concreteType)) {
                                consumer.consume(schema.getChildObjects(concreteType));
                            }
                        }
                    } else {
                        if (filter.acceptsObject(schema, currentSchema, objectType)) {
                            consumer.consume(schema.getChildObjects(objectType));
                        }
                    }

                    boolean synonymsSupported = DatabaseCompatibilityInterface.getInstance(parentObject).supportsObjectType(DBObjectType.SYNONYM.getTypeId());
                    if (synonymsSupported && filter.acceptsObject(schema, currentSchema, DBObjectType.SYNONYM)) {
                        for (DBSynonym synonym : schema.getSynonyms()) {
                            consumer.check();
                            DBObject underlyingObject = synonym.getUnderlyingObject();
                            if (underlyingObject != null && underlyingObject.isOfType(objectType)) {
                                consumer.consume(synonym);
                            }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        if (DatabaseCompatibilityInterface.getInstance(getConnectionHandler()).supportsFeature(DatabaseFeature.OBJECT_INVALIDATION)) {
            new BackgroundTask(getProject(), "Updating objects status", true) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    List<DBSchema> schemas = getSchemas();
                    for (int i=0; i<schemas.size(); i++) {
                        DBSchema schema = schemas.get(i);
                        progressIndicator.setText("Updating object status in schema " + schema.getName() + "... ");
                        progressIndicator.setFraction(CommonUtil.getProgressPercentage(i, schemas.size()));
                        schema.refreshObjectsStatus();
                    }
                }

            }.start();
        }
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        super(parent, contentType, resultSet);
    }

    protected void initLists() {
        super.initLists();
        DBSchema schema = getSchema();
        DBObjectListContainer childObjects = initChildObjects();
        columns = childObjects.createSubcontentObjectList(DBObjectType.COLUMN, this, COLUMNS_LOADER, schema, true);
        constraints = childObjects.createSubcontentObjectList(DBObjectType.CONSTRAINT, this, CONSTRAINTS_LOADER, schema, true);
        triggers = childObjects.createSubcontentObjectList(DBObjectType.TRIGGER, this, TRIGGERS_LOADER, schema, true);
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

            MessageUtil.showErrorDialog(buffer.toString());
            return false;
        }
        if (factoryInput instanceof MethodFactoryInput) {
            MethodFactoryInput methodFactoryInput = (MethodFactoryInput) factoryInput;
            DBSchema schema = methodFactoryInput.getSchema();
            try {
                ConnectionHandler connectionHandler = schema.getConnectionHandler();
                Connection connection = connectionHandler.getStandaloneConnection(schema);
                connectionHandler.getInterfaceProvider().getDDLInterface().createMethod(methodFactoryInput, connection);
                DBObjectList<DBMethod> methods = (DBObjectList<DBMethod>) schema.getChildObjects(methodFactoryInput.isFunction() ? DBObjectType.FUNCTION : DBObjectType.PROCEDURE);
                methods.reload();
                DBMethod method = methods.getObject(factoryInput.getObjectName());
                DatabaseFileSystem.getInstance().openEditor(method);
                notifyFactoryEvent(new ObjectFactoryEvent(method, ObjectFactoryEvent.EVENT_TYPE_CREATE));
            } catch (SQLException e) {
View Full Code Here

Examples of com.dci.intellij.dbn.object.DBSchema

        DBSchemaObject schemaObject = getDatabaseObject(runtimeInfo);
        return schemaObject.getVirtualFile();
    }

    public DBSchemaObject getDatabaseObject(DebuggerRuntimeInfo runtimeInfo) {
        DBSchema schema = connectionHandler.getObjectBundle().getSchema(runtimeInfo.getOwnerName());
        DBSchemaObject schemaObject = schema.getProgram(runtimeInfo.getProgramName());
        if (schemaObject == null) schemaObject = schema.getMethod(runtimeInfo.getProgramName(), 0); // overload 0 is assuming debug is only supported in oracle (no schema method overloading)
        return schemaObject;
    }
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.