Package com.dci.intellij.dbn.connection

Examples of com.dci.intellij.dbn.connection.ConnectionHandler


    public List<DBObjectRelationList> getObjectRelationLists() {
        return objectRelationLists;
    }

    private boolean isSupported(DBObjectRelationType objectRelationType) {
        ConnectionHandler connectionHandler = owner.getConnectionHandler();
        DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(connectionHandler);
        return connectionHandler == null ||
                (compatibilityInterface.supportsObjectType(objectRelationType.getSourceType().getTypeId()) &&
                 compatibilityInterface.supportsObjectType(objectRelationType.getTargetType().getTypeId()));
    }
View Full Code Here


        }
        return null;
    }

    private boolean isSupported(DBObjectType objectType) {
        ConnectionHandler connectionHandler = owner.getConnectionHandler();
        return connectionHandler == null ||
                DatabaseCompatibilityInterface.getInstance(connectionHandler).supportsObjectType(objectType.getTypeId());
    }
View Full Code Here

    public List<T> getObjectRelations() {
        return getElements();
    }

    public Filter getFilter() {
        ConnectionHandler connectionHandler = getConnectionHandler();
        if (connectionHandler != null) {
            ObjectNameFilterSettings nameFilterSettings = connectionHandler.getSettings().getFilterSettings().getObjectNameFilterSettings();
            return nameFilterSettings.getFilter(objectRelationType);
        }
        return null;
    }
View Full Code Here

        isHidden = hidden;
    }

    @Override
    public Filter getFilter() {
        ConnectionHandler connectionHandler = getConnectionHandler();
        return connectionHandler == null ? null :
                connectionHandler.getSettings().getFilterSettings().getObjectNameFilterSettings().getFilter(objectType);
    }
View Full Code Here

    public String getContentDescription() {
        if (getTreeParent() instanceof DBObject) {
            DBObject object = (DBObject) getTreeParent();
            return getName() + " of " + object.getQualifiedNameWithType();
        }
        ConnectionHandler connectionHandler = getConnectionHandler();
        return connectionHandler == null ?
                getName() :
                getName() + " from " + connectionHandler.getName() ;
    }
View Full Code Here

    public DatabaseEditableObjectFile getVirtualFile() {
        return DatabaseFileSystem.getInstance().findDatabaseFile(this);
    }

    public void executeUpdateDDL(DBContentType contentType, String oldCode, String newCode) throws SQLException {
        ConnectionHandler connectionHandler = getConnectionHandler();
        Connection connection = connectionHandler.getPoolConnection(getSchema());
        try {
            DatabaseDDLInterface ddlInterface = connectionHandler.getInterfaceProvider().getDDLInterface();
            ddlInterface.updateObject(getName(), getObjectType().getName(), oldCode,  newCode, connection);
        } finally {
            connectionHandler.freePoolConnection(connection);
        }
    }
View Full Code Here

            throw new RuntimeConfigurationError(
                    "Method " + executionInput.getMethodRef().getQualifiedMethodName() + " could not be resolved. " +
                    "The database connection is down or method has been dropped.");
        }

        ConnectionHandler connectionHandler = getMethod().getConnectionHandler();
        DatabaseCompatibilityInterface compatibilityInterface = connectionHandler.getInterfaceProvider().getCompatibilityInterface();
        if (!compatibilityInterface.supportsFeature(DatabaseFeature.DEBUGGING)){
            throw new RuntimeConfigurationError(
                    "Debugging is not supported for " + connectionHandler.getDatabaseType().getDisplayName() +" databases.");
        }
    }
View Full Code Here

            final MethodExecutionInput executionInput,
            final Executor executor,
            final ExecutionEnvironment environment,
            final Callback callback) {
        final DBProgramRunConfiguration runProfile = (DBProgramRunConfiguration) environment.getRunProfile();
        final ConnectionHandler connectionHandler = runProfile.getMethod().getConnectionHandler();
        Project project = connectionHandler.getProject();

        DatabaseDebuggerManager debuggerManager = DatabaseDebuggerManager.getInstance(project);
        final List<String> missingPrivileges = debuggerManager.getMissingDebugPrivileges(connectionHandler);
        if (missingPrivileges.size() > 0) {
            new SimpleLaterInvocator() {
                public void execute() {
                    StringBuilder buffer = new StringBuilder();
                    buffer.append("The current user (").append(connectionHandler.getUserName()).append(") does not have sufficient privileges to perform debug operations on this database.\n");
                    buffer.append("Please contact your administrator to grant the required privileges. ");
                    buffer.append("Missing privileges:\n");
                    for (String missingPrivilege : missingPrivileges) {
                        buffer.append(" - ").append(missingPrivilege).append("\n");
                    }
View Full Code Here

            final Executor executor,
            final ExecutionEnvironment environment,
            final Callback callback) {
        final DBProgramRunConfiguration runProfile = (DBProgramRunConfiguration) environment.getRunProfile();
        if (runProfile.isCompileDependencies()) {
            final ConnectionHandler connectionHandler = runProfile.getMethod().getConnectionHandler();
            final Project project = connectionHandler.getProject();


            new BackgroundTask(project, "Initializing debug environment", false, true) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    DatabaseDebuggerManager debuggerManager = DatabaseDebuggerManager.getInstance(project);
View Full Code Here

            final Executor executor,
            final ExecutionEnvironment environment,
            final Callback callback) {
        new SimpleLaterInvocator() {
            public void execute() {
                final ConnectionHandler connectionHandler = executionInput.getConnectionHandler();
                final Project project = connectionHandler.getProject();

                MethodExecutionManager executionManager = MethodExecutionManager.getInstance(project);
                boolean continueExecution = executionManager.promptExecutionDialog(executionInput, true);

                if (continueExecution) {
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.connection.ConnectionHandler

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.