Package org.drools.ide.common.client.modeldriven.brl

Examples of org.drools.ide.common.client.modeldriven.brl.ActionFieldValue


        assertEquals( "f2=f2val",
                      dd.valuePairs[1] );

        //and now for the RHS
        ActionFieldValue[] vals = new ActionFieldValue[2];
        vals[0] = new ActionFieldValue( "f1",
                                        "f1val",
                                        "blah" );
        vals[1] = new ActionFieldValue( "f2",
                                        "f2val",
                                        "blah" );
        dd = sce.getEnums( "Fact",
                "value", vals
        );
View Full Code Here


            if ( action == null ) {
                throw new NullPointerException( "action cannot be null" );
            }
            this.action = action;
            this.factType = action.getFactType();
            ActionFieldValue afv = new ActionFieldValue();
            afv.field = action.getFactField();
            afv.nature = BaseSingleFieldConstraint.TYPE_LITERAL;
            afv.type = action.getType();
            super.addFieldValue( afv );
        }
View Full Code Here

            if ( action == null ) {
                throw new NullPointerException( "action cannot be null" );
            }
            this.action = action;
            this.factType = action.getFactType();
            ActionFieldValue afv = new ActionFieldValue();
            afv.field = action.getFactField();
            afv.nature = BaseSingleFieldConstraint.TYPE_LITERAL;
            afv.type = action.getType();
            super.addFieldValue( afv );
        }
View Full Code Here

        link.setToolTipText( "Add another field to this so you can set its value" );
    }

    private void createConstraintRows(Composite constraintComposite) {
        for ( int row = 0; row < fact.fieldValues.length; row++ ) {
            ActionFieldValue val = fact.fieldValues[row];
            toolkit.createLabel( constraintComposite,
                                 val.field );
            valueEditor( constraintComposite,
                         val );
            addRemoveFieldAction( constraintComposite,
View Full Code Here

        GridLayout constraintLayout = new GridLayout();
        constraintLayout.numColumns = 3;
        constraintComposite.setLayout(constraintLayout);

        for (int i = 0; i < set.fieldValues.length; i++) {
            ActionFieldValue val = set.fieldValues[i];
            toolkit.createLabel(constraintComposite, val.field);
            valueEditor(constraintComposite, val);
            addRemoveFieldAction(constraintComposite, i);
        }
View Full Code Here

                if ( isDSLEnhanced ) {
                    buf.append( ">" );
                }
                buf.append( variableName );

                ActionFieldValue fieldValue = fieldValues[i];
                if ( fieldValue instanceof ActionFieldFunction ) {
                    buf.append( "." );
                    buf.append( fieldValue.field );
                } else {
                    buf.append( ".set" );
View Full Code Here

                a.action = ins;
            }
            actions.add( a );
        }
        ActionInsertFact ins = (ActionInsertFact) a.action;
        ActionFieldValue val = new ActionFieldValue( ac.getFactField(),
                                                     cell,
                                                     ac.getType() );
        ins.addFieldValue( val );
    }
View Full Code Here

            ActionUpdateField update = new ActionUpdateField( sf.getBoundName() );
            update.fieldValues = old.fieldValues;
            a.action = update;
        }
        ActionSetField asf = (ActionSetField) a.action;
        ActionFieldValue val = new ActionFieldValue( sf.getFactField(),
                                                     cell,
                                                     sf.getType() );
        asf.addFieldValue( val );
    }
View Full Code Here

    private ActionInsertFact visitActionFieldList(ActionInsertFact afl) {
        ActionInsertFact clone = new ActionInsertFact();
        clone.factType = afl.factType;
        clone.setBoundName( afl.getBoundName() );
        for ( ActionFieldValue afv : afl.fieldValues ) {
            ActionFieldValue afvClone = new ActionFieldValue();
            afvClone.setField( afv.getField() );
            afvClone.setNature( afv.getNature() );
            afvClone.setType( afv.getType() );
            afvClone.setValue( afv.getValue() );
            clone.addFieldValue( afvClone );
        }
        return clone;
    }
View Full Code Here

    private ActionSetField visitActionFieldList(ActionSetField afl) {
        ActionSetField clone = new ActionSetField();
        clone.variable = afl.variable;
        for ( ActionFieldValue afv : afl.fieldValues ) {
            ActionFieldValue afvClone = new ActionFieldValue();
            afvClone.setField( afv.getField() );
            afvClone.setNature( afv.getNature() );
            afvClone.setType( afv.getType() );
            afvClone.setValue( afv.getValue() );
            clone.addFieldValue( afvClone );
        }
        return clone;
    }
View Full Code Here

TOP

Related Classes of org.drools.ide.common.client.modeldriven.brl.ActionFieldValue

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.