Examples of DBMethod


Examples of com.antlersoft.ilanalyze.db.DBMethod

   
  /* (non-Javadoc)
   * @see com.antlersoft.query.Transform#transformObject(com.antlersoft.query.DataSource, java.lang.Object)
   */
  public Enumeration transformObject(DataSource source, Object to_transform) {
        final DBMethod soughtMethod=(DBMethod)to_transform;
     try
    {
          DBClass c=soughtMethod.getDBClass();
          Enumeration fromBase=new RealMethodFilter(
              ( new TransformSet( new RecursiveBaseClasses(),
                  new SingleClass( c))).evaluate( _db), _db, soughtMethod);
          Enumeration fromDerived=new  RealMethodFilter(
                  ( new TransformSet( new RecursiveDerivedClasses(),
View Full Code Here

Examples of com.antlersoft.ilanalyze.db.DBMethod

        protected Object filterObject( Object base)
        {
            DBClass filterc=(DBClass)base;
            try
            {
                DBMethod m=filterc.findMethod( soughtMethod.getName(), soughtMethod.getSignatureKey());
                return m;
            }
            catch ( Exception e)
            {
                throw new NoSuchElementException(
View Full Code Here

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

    private void updateArgumentValueTables() {
        List<ArgumentValue> inputArgumentValues = executionResult.getExecutionInput().getArgumentValues();
        List<ArgumentValue> outputArgumentValues = executionResult.getArgumentValues();

        DBMethod method = executionResult.getMethod();
        ArgumentValuesTreeModel treeModel = new ArgumentValuesTreeModel(method, inputArgumentValues, outputArgumentValues);
        argumentValuesTree.setModel(treeModel);
        TreeUtil.expand(argumentValuesTree, 2);
    }
View Full Code Here

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

            if (executionInput.getMethodRef().equals(methodRef)) {
                return executionInput;
            }
        }

        DBMethod method = methodRef.get();
        if (method != null) {
            MethodExecutionInput executionInput = new MethodExecutionInput(method);
            executionInputs.add(executionInput);
            return executionInput;
        }
View Full Code Here

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

        return promptExecutionDialog(executionInput, debug);
    }

    public boolean promptExecutionDialog(MethodExecutionInput executionInput, boolean debug) {
        if (executionInput.getConnectionHandler().isValid(true)) {
            DBMethod method = executionInput.getMethod();
            if (method == null) {
                String message =
                        "Can not execute method " +
                         executionInput.getMethodRef().getPath() + ".\nMethod not found!";
                MessageUtil.showErrorDialog(message);
View Full Code Here

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

        execute(executionInput);
    }

    public void execute(final MethodExecutionInput executionInput) {
        executionInput.setExecuting(true);
        final DBMethod method = executionInput.getMethod();
        if (method == null) {
            DBMethodRef methodRef = executionInput.getMethodRef();
            MessageUtil.showErrorDialog("Could not resolve " + methodRef.getMethodObjectType().getName() + " \"" + methodRef.getSchemaName() + "." + methodRef.getQualifiedMethodName() + "\".");
        } else {
            final Project project = method.getProject();
            DatabaseExecutionInterface executionInterface = method.getConnectionHandler().getInterfaceProvider().getDatabaseExecutionInterface();
            final MethodExecutionProcessor executionProcessor = executionInterface.createExecutionProcessor(method);

            new BackgroundTask(project, "Executing method", false) {
                public void execute(@NotNull ProgressIndicator progressIndicator) {
                    try {
                        initProgressIndicator(progressIndicator, true, "Executing " + method.getQualifiedNameWithType());
                        executionInput.initExecutionResult(false);
                        executionProcessor.execute(executionInput);
                        if (!executionInput.isExecutionCancelled()) {
                            new SimpleLaterInvocator() {
                                public void execute() {
                                    ExecutionManager executionManager = ExecutionManager.getInstance(project);
                                    executionManager.showExecutionConsole(executionInput.getExecutionResult());
                                    executionInput.setExecuting(false);
                                }
                            }.start();
                        }

                        executionInput.setExecutionCancelled(false);
                    } catch (final SQLException e) {
                        executionInput.setExecuting(false);
                        if (!executionInput.isExecutionCancelled()) {
                            new SimpleLaterInvocator() {
                                public void execute() {
                                    MessageUtil.showErrorDialog("Could not execute " + method.getTypeName() + ".", e);
                                    if (promptExecutionDialog(executionInput, false)) {
                                        MethodExecutionManager.this.execute(executionInput);
                                    }
                                }
                            }.start();
View Full Code Here

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

            }.start();
        }
    }

    public boolean debugExecute(final MethodExecutionInput executionInput, final Connection connection) {
        final DBMethod method = executionInput.getMethod();
        DatabaseExecutionInterface executionInterface = method.getConnectionHandler().getInterfaceProvider().getDatabaseExecutionInterface();
        final MethodExecutionProcessor executionProcessor = executionInterface.createDebugExecutionProcessor(method);
        try {
            executionInput.initExecutionResult(true);
            executionProcessor.execute(executionInput, connection);
            if (!executionInput.isExecutionCancelled()) {
                new SimpleLaterInvocator() {
                    public void execute() {
                        ExecutionManager executionManager = ExecutionManager.getInstance(method.getProject());
                        executionManager.showExecutionConsole(executionInput.getExecutionResult());
                    }
                }.start();
            }
            executionInput.setExecutionCancelled(false);
            return true;
        } catch (final SQLException e) {
            if (!executionInput.isExecutionCancelled()) {
                new SimpleLaterInvocator() {
                    public void execute() {
                        MessageUtil.showErrorDialog("Could not execute " + method.getTypeName() + ".", e);
                    }
                }.start();
            }
            return false;
        }
View Full Code Here

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

    private boolean debug;

    public MethodExecutionForm(MethodExecutionInput executionInput, boolean showHeader, boolean debug) {
        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);
        }
        connectionLabel.setText(connectionHandler.getPresentableText());
        connectionLabel.setIcon(connectionHandler.getIcon());
        autoCommitLabel.setConnectionHandler(connectionHandler);

        //objectPanel.add(new ObjectDetailsPanel(method).getComponent(), BorderLayout.NORTH);

        if (showHeader) {
            String headerTitle = method.getQualifiedName();
            Icon headerIcon = method.getIcon();
            Color headerBackground = UIUtil.getPanelBackground();
            if (getEnvironmentSettings(method.getProject()).getVisibilitySettings().getDialogHeaders().value()) {
                headerBackground = method.getEnvironmentType().getColor();
            }
            DBNHeaderForm headerForm = new DBNHeaderForm(
                    headerTitle,
                    headerIcon,
                    headerBackground);
            headerPanel.add(headerForm.getComponent(), BorderLayout.CENTER);
        }
        headerPanel.setVisible(showHeader);

        argumentsPanel.setLayout(new BoxLayout(argumentsPanel, BoxLayout.Y_AXIS));
        int[] metrics = new int[]{0, 0};

        //topSeparator.setVisible(false);
        spacer.setVisible(false);
        List<DBArgument> arguments = new ArrayList(method.getArguments());
        noArgumentsLabel.setVisible(arguments.size() == 0);
        for (DBArgument argument: arguments) {
            if (argument.isInput()) {
                spacer.setVisible(true);
                metrics = addArgumentPanel(argument, metrics);
View Full Code Here

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

        @Override
        public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
            ArgumentValuesTreeNode treeNode = (ArgumentValuesTreeNode) value;
            Object userValue = treeNode.getUserValue();
            if (userValue instanceof DBMethod) {
                DBMethod method = (DBMethod) userValue;
                setIcon(method.getIcon());
                append(method.getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
            }

            if (userValue instanceof String) {
                append((String) userValue, treeNode.isLeaf() ?
                        SimpleTextAttributes.REGULAR_ATTRIBUTES :
View Full Code Here

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

        }
        return null;
    }

    public DBMethod getMethod(String name, int overload) {
        DBMethod method = getProcedure(name, overload);
        if (method == null) method = getFunction(name, overload);
        return method;
    }
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.