Package org.apache.cayenne.merge

Examples of org.apache.cayenne.merge.MergerToken


        final String lineEnd = (batchTerminator != null) ? "\n"
                + batchTerminator
                + "\n\n" : "\n\n";
       
        while (it.hasNext()) {
            MergerToken token = it.next();

            if (token instanceof AbstractToDbToken) {
                AbstractToDbToken tdb = (AbstractToDbToken) token;
                for (String sql : tdb.createSql(adapter)) {
                    buf.append(sql);
View Full Code Here


        final String lineEnd = (batchTerminator != null) ? "\n"
                + batchTerminator
                + "\n\n" : "\n\n";

        while (it.hasNext()) {
            MergerToken token = it.next();

            if (token instanceof AbstractToDbToken) {
                AbstractToDbToken tdb = (AbstractToDbToken) token;
                for (String sql : tdb.createSql(adapter)) {
                    buf.append(sql);
View Full Code Here

    public void setDirection(MergerToken token, MergeDirection direction) {
        if (token.getDirection().equals(direction)) {
            return;
        }
        int i = selectableTokensList.indexOf(token);
        MergerToken reverse = token.createReverse(mergerFactory);
        selectableTokensList.set(i, reverse);
        if (excludedTokens.remove(token)) {
            excludedTokens.add(reverse);
        }
       
View Full Code Here

    }

    public void reverseAllAction() {
       
        for (int i = 0; i < selectableTokensList.size(); i++) {
            MergerToken token = selectableTokensList.get(i);
            MergerToken reverse = token.createReverse(mergerFactory);
            selectableTokensList.set(i, reverse);
            if (excludedTokens.remove(token)) {
                excludedTokens.add(reverse);
            }
        }
View Full Code Here

    public MergerToken getToken(int rowIndex) {
        return tokens.get(rowIndex);
    }

    public Object getValueAt(int rowIndex, int columnIndex) {
        MergerToken token = getToken(rowIndex);
        switch (columnIndex) {
            case COL_SELECT:
                return Boolean.valueOf(getController().isSelected(token));
            case COL_NAME:
                return token.getTokenName();
            case COL_DIRECTION:
                return token.getDirection();
            case COL_VALUE:
                return token.getTokenValue();
        }
        return null;
    }
View Full Code Here

        }
        return false;
    }

    public void setValueAt(Object value, int rowIndex, int columnIndex) {
        MergerToken token = getToken(rowIndex);
        switch (columnIndex) {
            case COL_SELECT:
                Boolean val = (Boolean) value;
                getController().select(token, val.booleanValue());
                break;
View Full Code Here

    public void setDirection(MergerToken token, MergeDirection direction) {
        if (token.getDirection().equals(direction)) {
            return;
        }
        int i = selectableTokensList.indexOf(token);
        MergerToken reverse = token.createReverse(mergerFactory);
        selectableTokensList.set(i, reverse);
        if (excludedTokens.remove(token)) {
            excludedTokens.add(reverse);
        }
       
View Full Code Here

    }

    public void reverseAllAction() {
       
        for (int i = 0; i < selectableTokensList.size(); i++) {
            MergerToken token = selectableTokensList.get(i);
            MergerToken reverse = token.createReverse(mergerFactory);
            selectableTokensList.set(i, reverse);
            if (excludedTokens.remove(token)) {
                excludedTokens.add(reverse);
            }
        }
View Full Code Here

        final String lineEnd = (batchTerminator != null) ? "\n"
                + batchTerminator
                + "\n\n" : "\n\n";

        while (it.hasNext()) {
            MergerToken token = it.next();

            if (token instanceof AbstractToDbToken) {
                AbstractToDbToken tdb = (AbstractToDbToken) token;
                for (String sql : tdb.createSql(adapter)) {
                    buf.append(sql);
View Full Code Here

TOP

Related Classes of org.apache.cayenne.merge.MergerToken

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.