Examples of TableView


Examples of org.lealone.dbobject.table.TableView

            // everybody has access to the metadata information
            return true;
        }
        String tableType = table.getTableType();
        if (Table.VIEW.equals(tableType)) {
            TableView v = (TableView) table;
            if (v.getOwner() == this) {
                // the owner of a view has access:
                // SELECT * FROM (SELECT * FROM ...)
                return true;
            }
        } else if (tableType == null) {
View Full Code Here

Examples of org.lealone.dbobject.table.TableView

    }

    public int update() {
        session.commit(true);
        Database db = session.getDatabase();
        TableView view = null;
        Table old = getSchema().findTableOrView(session, viewName);
        if (old != null) {
            if (ifNotExists) {
                return 0;
            }
            if (!orReplace || !Table.VIEW.equals(old.getTableType())) {
                throw DbException.get(ErrorCode.VIEW_ALREADY_EXISTS_1, viewName);
            }
            view = (TableView) old;
        }
        int id = getObjectId();
        String querySQL;
        if (select == null) {
            querySQL = selectSQL;
        } else {
            ArrayList<Parameter> params = select.getParameters();
            if (params != null && params.size() > 0) {
                throw DbException.get(ErrorCode.FEATURE_NOT_SUPPORTED_1, "parameters in views");
            }
            querySQL = select.getPlanSQL();
        }
        Session sysSession = db.getSystemSession();
        try {
            if (view == null) {
                Schema schema = session.getDatabase().getSchema(session.getCurrentSchemaName());
                sysSession.setCurrentSchema(schema);
                view = new TableView(getSchema(), id, viewName, querySQL, null, columnNames, sysSession, false);
            } else {
                view.replace(querySQL, columnNames, sysSession, false, force);
            }
        } finally {
            sysSession.setCurrentSchema(db.getSchema(Constants.SCHEMA_MAIN));
        }
        if (comment != null) {
            view.setComment(comment);
        }
        if (old == null) {
            db.addSchemaObject(session, view);
        } else {
            db.update(session, view);
View Full Code Here

Examples of org.pentaho.di.ui.core.widget.TableView

        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.ScopeVariable"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.ScopeVariableValue"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
    };
    colinf[1].setUsingVariables(true);

    wScopeVariables = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, nrRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
View Full Code Here

Examples of org.pentaho.di.ui.core.widget.TableView

        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.Fieldname"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.Type"), ColumnInfo.COLUMN_TYPE_CCOMBO, ValueMeta.getTypes()), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.UpdateExisting"), ColumnInfo.COLUMN_TYPE_CCOMBO, NO_YES) //$NON-NLS-1$
    };

    wFields = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, fieldsRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
View Full Code Here

Examples of org.pentaho.di.ui.core.widget.TableView

    ColumnInfo[] colinf = new ColumnInfo[] {
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.InfoStepTag"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.InfoStepName"), ColumnInfo.COLUMN_TYPE_CCOMBO, prevStepNames), //$NON-NLS-1$
    };

    wInfoSteps = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, nrRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
View Full Code Here

Examples of org.pentaho.di.ui.core.widget.TableView

    ColumnInfo[] colinf = new ColumnInfo[] {
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.TargetStepTag"), ColumnInfo.COLUMN_TYPE_TEXT, false), //$NON-NLS-1$
        new ColumnInfo(BaseMessages.getString(PKG, "RubyStepDialog.ColumnInfo.TargetStepName"), ColumnInfo.COLUMN_TYPE_CCOMBO, nextStepNames), //$NON-NLS-1$
    };

    wTargetSteps = new TableView(transMeta, wPanel, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI, colinf, nrRows, lsMod, props);

    FormData fdFields = new FormData();
    fdFields.left = new FormAttachment(0, 0);
    fdFields.top = new FormAttachment(0, 0);
    fdFields.right = new FormAttachment(100, 0);
View Full Code Here

Examples of pivot.wtk.TableView

        // Load the main app window
        serializer = new WTKXSerializer();
        window = (Window)serializer.readObject("pivot/tools/net/application.wtkx");
        window.open(display);

        TableView tableView = (TableView)serializer.getObjectByID("log.tableView");
        tableView.getComponentMouseButtonListeners().add(new ComponentMouseButtonListener.Adapter() {
            public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
                boolean consumed = false;

                if (button == Mouse.Button.LEFT && count == 2) {
                    consumed = true;

                    if (detailsFrame == null) {
                        final WTKXSerializer frameSerializer = new WTKXSerializer();

                        try {
                            detailsFrame = (Frame)frameSerializer.readObject
                                ("pivot/tools/net/detailsFrame.wtkx");
                        } catch (Exception ex) {
                            throw new RuntimeException(ex);
                        }
                    }

                    detailsFrame.open(window);
                }

                return consumed;
            }
        });

        PushButton submitButton = (PushButton)serializer.getObjectByID("request.submit");
        submitButton.getButtonPressListeners().add(new ButtonPressListener() {
            public void buttonPressed(final Button button) {
                button.setEnabled(false);

                Request httpRequest = getRequest();
                httpRequest.execute(new TaskAdapter<Response>(new TaskListener<Response>() {
                    public void taskExecuted(Task<Response> task) {
                        button.setEnabled(true);
                        Response httpResponse = task.getResult();
                        Transaction transaction = new Transaction((Request)task, httpResponse);

                        TableView tableView = (TableView)serializer.getObjectByID("log.tableView");
                        List<Transaction> tableData = (List<Transaction>)tableView.getTableData();
                        tableData.add(transaction);
                    }

                    public void executeFailed(Task<Response> task) {
                        button.setEnabled(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.