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

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


            buf.append( action.getMethodName() );

            buf.append( "( " );
            boolean isFirst = true;
            for ( int i = 0; i < fieldValues.length; i++ ) {
                ActionFieldFunction valueFunction = (ActionFieldFunction) fieldValues[ i ];
                if ( isFirst == true ) {
                    isFirst = false;
                } else {
                    buf.append( ", " );
                }

                if ( valueFunction.isFormula() ) {
                    buf.append( valueFunction.getValue() );
                } else if ( valueFunction.getNature() == FieldNatureType.TYPE_VARIABLE ) {
                    buf.append( valueFunction.getValue() );
                } else {
                    buildDefaultFieldValue( valueFunction,
                                            buf );
                }
            }
View Full Code Here


            buf.append( action.getMethodName() );

            buf.append( "( " );
            boolean isFirst = true;
            for ( int i = 0; i < fieldValues.length; i++ ) {
                ActionFieldFunction valueFunction = (ActionFieldFunction) fieldValues[ i ];
                if ( isFirst == true ) {
                    isFirst = false;
                } else {
                    buf.append( ", " );
                }

                constraintValueBuilder.buildRHSFieldValue( buf,
                                                           valueFunction.getType(),
                                                           valueFunction.getValue() );
            }
            buf.append( " );\n" );

        }
View Full Code Here

                                param = param.trim();
                                if ( param.length() == 0 ) {
                                    continue;
                                }
                                String dataType = inferDataType( param, isJavaDialect );
                                acm.addFieldValue( new ActionFieldFunction( null, adjustParam( dataType, param, isJavaDialect ), dataType ) );
                            }
                        }
                        continue;
                    }
                }
View Full Code Here

        return adjustedParam;
    }

    private ActionFieldFunction getActionFieldFunction( String param,
                                                        String dataType ) {
        ActionFieldFunction actionFiled = new ActionFieldFunction( null,
                                                                   getAdjustedParameter( param,
                                                                                         dataType ),
                                                                   dataType );
        actionFiled.setNature( inferFieldNature( dataType,
                                                 param,
                                                 boundParams,
                                                 isJavaDialect ) );
        actionFiled.setField( methodName );
        return actionFiled;
    }
View Full Code Here

            buf.append( action.getMethodName() );

            buf.append( "( " );
            boolean isFirst = true;
            for ( int i = 0; i < fieldValues.length; i++ ) {
                ActionFieldFunction valueFunction = (ActionFieldFunction) fieldValues[ i ];
                if ( isFirst == true ) {
                    isFirst = false;
                } else {
                    buf.append( ", " );
                }

                if ( valueFunction.isFormula() ) {
                    buf.append( valueFunction.getValue() );
                } else if ( valueFunction.getNature() == FieldNatureType.TYPE_VARIABLE ) {
                    buf.append( valueFunction.getValue() );
                } else {
                    buildDefaultFieldValue( valueFunction,
                                            buf );
                }
            }
View Full Code Here

            buf.append( action.getMethodName() );

            buf.append( "( " );
            boolean isFirst = true;
            for ( int i = 0; i < fieldValues.length; i++ ) {
                ActionFieldFunction valueFunction = (ActionFieldFunction) fieldValues[ i ];
                if ( isFirst == true ) {
                    isFirst = false;
                } else {
                    buf.append( ", " );
                }

                if ( valueFunction.isFormula() ) {
                    buf.append( valueFunction.getValue() );
                } else if ( valueFunction.getNature() == FieldNatureType.TYPE_VARIABLE ) {
                    buf.append( valueFunction.getValue() );
                } else {
                    buildDefaultFieldValue( valueFunction,
                                            buf );
                }
            }
View Full Code Here

                paramValue = adjustParam( dataType,
                                          param,
                                          boundParams,
                                          isJavaDialect );
        }
        ActionFieldFunction actionField = new ActionFieldFunction( methodName,
                                                                   paramValue,
                                                                   dataType );
        actionField.setNature( fieldNature );
        return actionField;
    }
View Full Code Here

            buf.append( action.getMethodName() );

            buf.append( "( " );
            boolean isFirst = true;
            for ( int i = 0; i < fieldValues.length; i++ ) {
                ActionFieldFunction valueFunction = (ActionFieldFunction) fieldValues[ i ];
                if ( isFirst == true ) {
                    isFirst = false;
                } else {
                    buf.append( ", " );
                }

                if ( valueFunction.isFormula() ) {
                    buf.append( valueFunction.getValue() );
                } else if ( valueFunction.getNature() == FieldNatureType.TYPE_VARIABLE ) {
                    buf.append( valueFunction.getValue() );
                } else {
                    buildDefaultFieldValue( valueFunction,
                                            buf );
                }
            }
View Full Code Here

                                        continue;
                                    }
                                    String dataType = methodInfo == null ?
                                            inferDataType( param, isJavaDialect ) :
                                            methodInfo.getParams().get( i++ );
                                    ActionFieldFunction actionFiled = new ActionFieldFunction( null, adjustParam( dataType, param, isJavaDialect ), dataType );
                                    actionFiled.setNature( inferFieldNature( param, boundParams ) );
                                    acm.addFieldValue( actionFiled );
                                }
                            }
                            continue;
                        }
View Full Code Here

        layout.setWidget( 0,
                          0,
                          getSetterLabel() );
        DirtyableFlexTable inner = new DirtyableFlexTable();
        for ( int i = 0; i < model.getFieldValues().length; i++ ) {
            ActionFieldFunction val = model.getFieldValue( i );

            inner.setWidget( i,
                             0,
                             fieldSelector( val ) );
            inner.setWidget( i,
View Full Code Here

TOP

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

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.