Package com.dci.intellij.dbn.database

Examples of com.dci.intellij.dbn.database.DatabaseCompatibilityInterface


        if (object instanceof DBTable) {
            DBTable table = (DBTable) object;
            add(new GenerateInsertStatementAction(table));
        }

        DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(object);
        if (object instanceof DBSchemaObject &&
                object.getParentObject() instanceof DBSchema &&
                compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_DDL_EXTRACTION)) {
            if (getChildrenCount() > 1) {
                addSeparator();
            }
            add(new GenerateDDLStatementAction(object));
        }
View Full Code Here


        this.executionInput = executionInput;
        this.debug = debug;
        DBMethod method = executionInput.getMethod();

        ConnectionHandler connectionHandler = executionInput.getConnectionHandler();
        DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(connectionHandler);
        if (compatibilityInterface.supportsFeature(DatabaseFeature.AUTHID_METHOD_EXECUTION)) {
            //ActionToolbar actionToolbar = ActionUtil.createActionToolbar("", true, new SetExecutionSchemaComboBoxAction(executionInput));
            executionSchemaActionPanel.add(new SchemaSelector(), BorderLayout.CENTER);
        } else {
            executionSchemaActionPanel.setVisible(false);
            executionSchemaLabel.setVisible(false);
View Full Code Here

import java.util.List;

public class ObjectActionGroup extends DefaultActionGroup {

    public ObjectActionGroup(DBObject object) {
        DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(object);

        DBObjectProperties properties = object.getProperties();
        if(object instanceof DBSchemaObject) {
            DBSchemaObject schemaObject = (DBSchemaObject) object;

            if (properties.is(DBObjectProperty.EDITABLE)) {
                DBContentType contentType = schemaObject.getContentType();
                if (contentType == DBContentType.DATA || contentType == DBContentType.CODE_AND_DATA) {
                    add(new EditObjectDataAction(schemaObject));
                }

                if (contentType == DBContentType.CODE || contentType == DBContentType.CODE_AND_DATA || contentType == DBContentType.CODE_SPEC_AND_BODY) {
                    add(new EditObjectCodeAction(schemaObject));
                }
            }

            if (properties.is(DBObjectProperty.COMPILABLE) && compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_INVALIDATION)) {
                add(new CompileActionGroup(schemaObject));
            }

            if (properties.is(DBObjectProperty.DISABLEABLE) && compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_DISABLING)) {
                add(new EnableDisableAction(schemaObject));
            }
        }

        if (object instanceof DBMethod) {
            if (compatibilityInterface.supportsFeature(DatabaseFeature.DEBUGGING)) {
                add(new ExecuteActionGroup((DBSchemaObject) object));
            } else {
                add(new RunMethodAction((DBMethod) object));
            }
        }

        if (object instanceof DBProgram && properties.is(DBObjectProperty.SCHEMA_OBJECT)) {
            if (compatibilityInterface.supportsFeature(DatabaseFeature.DEBUGGING)) {
                add(new ExecuteActionGroup((DBSchemaObject) object));
            } else {
                add(new RunProgramMethodAction((DBProgram) object));
            }
        }

        if (properties.is(DBObjectProperty.SCHEMA_OBJECT)) {
            add(new DropObjectAction((DBSchemaObject) object));

            //add(new TestAction(object));
        }

        if(properties.is(DBObjectProperty.REFERENCEABLE) && compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_DEPENDENCIES)) {
            addSeparator();
            add (new DependenciesActionGroup((DBSchemaObject) object));
        }

        List<DBObjectNavigationList> navigationLists = object.getNavigationLists();
View Full Code Here

        for (DBGrantedPrivilege grantedPrivilege : getPrivileges()) {
            if (grantedPrivilege.getPrivilege().equals(privilege)) {
                return true;
            }
        }
        DatabaseCompatibilityInterface compatibilityInterface = getConnectionHandler().getInterfaceProvider().getCompatibilityInterface();
        if (compatibilityInterface.supportsObjectType(DBObjectType.GRANTED_ROLE.getTypeId())) {
            for (DBGrantedRole grantedRole : getRoles()) {
                if (grantedRole.getRole().hasPrivilege(privilege)) {
                    return true;
                }
            }
View Full Code Here

        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

    protected List<DBObjectNavigationList> createNavigationLists() {
        return new ArrayList<DBObjectNavigationList>();
    }

    public Timestamp loadChangeTimestamp(DBContentType contentType) throws SQLException {
        DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(this);
        if (compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_CHANGE_TRACING)) {
            return getTimestampLoader(contentType).load(this);
        }
        return null;
    }
View Full Code Here

                    "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

    public abstract boolean hasReturnArgument();

    private void createUIComponents() {
        ConnectionHandler connectionHandler = getConnectionHandler();
        DatabaseCompatibilityInterface compatibilityInterface = connectionHandler.getInterfaceProvider().getCompatibilityInterface();
        boolean enforceInArguments = hasReturnArgument() && !compatibilityInterface.supportsFeature(DatabaseFeature.FUNCTION_OUT_ARGUMENTS);
        argumentListPanel = new ArgumentFactoryInputListPanel(connectionHandler, enforceInArguments);
        argumentListComponent = argumentListPanel.getComponent();
        returnArgumentDataTypeEditor = new DataTypeEditor(getConnectionHandler());
    }
View Full Code Here

            presentation.setEnabled(false);
        } else {

            DBSchemaObject schemaObject = virtualFile.getObject();
            if (schemaObject != null) {
                DatabaseCompatibilityInterface compatibilityInterface = DatabaseCompatibilityInterface.getInstance(schemaObject);
                if (schemaObject.getProperties().is(DBObjectProperty.COMPILABLE) &&  compatibilityInterface.supportsFeature(DatabaseFeature.OBJECT_INVALIDATION)) {
                    CompilerSettings compilerSettings = getCompilerSettings(schemaObject.getProject());
                    CompileType compileType = compilerSettings.getCompileType();
                    DBObjectStatusHolder status = schemaObject.getStatus();
                    DBContentType contentType = virtualFile.getContentType();
View Full Code Here

TOP

Related Classes of com.dci.intellij.dbn.database.DatabaseCompatibilityInterface

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.