Package org.drools.workbench.models.datamodel.rule

Examples of org.drools.workbench.models.datamodel.rule.ActionSetField


                }
            }
        }

        for ( Map.Entry<String, List<String>> entry : setStatements.entrySet() ) {
            ActionSetField action = new ActionSetField( entry.getKey() );
            addSettersToAction( entry.getValue(),
                                action,
                                boundParams,
                                dmo,
                                m.getImports(),
View Full Code Here


                               position );
    }

    private void addActionSetField( String itemText,
                                    int position ) {
        this.model.addRhsItem( new ActionSetField( itemText ),
                               position );
    }
View Full Code Here

            //Reconcile ActionSetField and ActionUpdateField calls
            final List<IAction> actions = new ArrayList<IAction>();
            for ( IAction action : model.rhs ) {
                if ( action instanceof ActionSetField ) {
                    final ActionSetField asf = (ActionSetField) action;
                    final ActionSetFieldWrapper afw = findExistingAction( asf,
                                                                          actions );
                    if ( afw == null ) {
                        actions.add( new ActionSetFieldWrapper( asf,
                                                                ( asf instanceof ActionUpdateField ) ) );
                    } else {
                        final List<ActionFieldValue> existingActionFieldValue = new ArrayList<ActionFieldValue>( Arrays.asList( afw.getAction().getFieldValues() ) );
                        for ( ActionFieldValue afv : asf.getFieldValues() ) {
                            existingActionFieldValue.add( afv );
                        }
                        final ActionFieldValue[] temp = new ActionFieldValue[ existingActionFieldValue.size() ];
                        afw.getAction().setFieldValues( existingActionFieldValue.toArray( temp ) );
                    }
View Full Code Here

                }
            }
        }

        for ( Map.Entry<String, List<String>> entry : setStatements.entrySet() ) {
            ActionSetField action = new ActionSetField( entry.getKey() );
            addSettersToAction( entry.getValue(),
                                action,
                                boundParams,
                                dmo,
                                m.getImports(),
View Full Code Here

                clone.setMethodName( acm.getMethodName() );
                clone.setFieldValues( acm.getFieldValues() );
                return clone;

            } else if ( action instanceof ActionSetField ) {
                final ActionSetField clone = new ActionSetField( action.getVariable() );
                clone.setFieldValues( action.getFieldValues() );
                return clone;

            } else {
                return action;
            }
View Full Code Here

        //Add Types and Fields used by RHS
        if ( model.rhs != null ) {
            for ( int i = 0; i < model.rhs.length; i++ ) {
                IAction action = model.rhs[ i ];
                if ( action instanceof ActionSetField ) {
                    final ActionSetField asf = (ActionSetField) action;
                    final String typeName = getTypeNameForBinding( asf.getVariable() );
                    if ( typeName != null ) {
                        final String fullyQualifiedClassName = getFullyQualifiedClassName( typeName );
                        visitActionFieldList( fullyQualifiedClassName,
                                              asf );
                    }
View Full Code Here

                }
            }
        }

        for ( Map.Entry<String, List<String>> entry : setStatements.entrySet() ) {
            ActionSetField action = new ActionSetField( entry.getKey() );
            addSettersToAction( entry.getValue(),
                                action,
                                boundParams,
                                dmo,
                                m.getImports(),
View Full Code Here

                clone.setMethodName( acm.getMethodName() );
                clone.setFieldValues( acm.getFieldValues() );
                return clone;

            } else if ( action instanceof ActionSetField ) {
                final ActionSetField clone = new ActionSetField( action.getVariable() );
                clone.setFieldValues( action.getFieldValues() );
                return clone;

            } else {
                return action;
            }
View Full Code Here

            //Reconcile ActionSetField and ActionUpdateField calls
            final List<IAction> actions = new ArrayList<IAction>();
            for ( IAction action : model.rhs ) {
                if ( action instanceof ActionSetField ) {
                    final ActionSetField asf = (ActionSetField) action;
                    final ActionSetFieldWrapper afw = findExistingAction( asf,
                                                                          actions );
                    if ( afw == null ) {
                        actions.add( new ActionSetFieldWrapper( asf,
                                                                ( asf instanceof ActionUpdateField ) ) );
                    } else {
                        final List<ActionFieldValue> existingActionFieldValue = new ArrayList<ActionFieldValue>( Arrays.asList( afw.getAction().getFieldValues() ) );
                        for ( ActionFieldValue afv : asf.getFieldValues() ) {
                            existingActionFieldValue.add( afv );
                        }
                        final ActionFieldValue[] temp = new ActionFieldValue[ existingActionFieldValue.size() ];
                        afw.getAction().setFieldValues( existingActionFieldValue.toArray( temp ) );
                    }
View Full Code Here

                }
            }
        }

        for ( Map.Entry<String, List<String>> entry : setStatements.entrySet() ) {
            ActionSetField action = new ActionSetField( entry.getKey() );
            addSettersToAction( entry.getValue(),
                                action,
                                boundParams,
                                dmo,
                                m.getImports(),
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.datamodel.rule.ActionSetField

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.