Package org.drools.workbench.models.guided.dtable.shared.model

Examples of org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactFieldsPattern


    @Override
    public void makeResult( final GuidedDecisionTable52 model ) {
        //Copy actions to decision table model
        int fi = 1;
        for ( Map.Entry<ActionInsertFactFieldsPattern, List<ActionInsertFactCol52>> ps : patternToActionsMap.entrySet() ) {
            final ActionInsertFactFieldsPattern p = ps.getKey();
            if ( !getValidator().isPatternValid( p ) ) {
                String binding = NEW_FACT_PREFIX + ( fi++ );
                p.setBoundName( binding );
                while ( !getValidator().isPatternBindingUnique( p ) ) {
                    binding = NEW_FACT_PREFIX + ( fi++ );
                    p.setBoundName( binding );
                }
            }

            final String factType = p.getFactType();
            final String boundName = p.getBoundName();
            final boolean isLogicalInsert = p.isInsertedLogically();

            for ( ActionInsertFactCol52 aif : ps.getValue() ) {
                aif.setFactType( factType );
                aif.setBoundName( boundName );
                aif.setInsertLogical( isLogicalInsert );
View Full Code Here


        //Existing ActionInsertFactCols (should be empty for a new Decision Table)
        for ( ActionCol52 a : model.getActionCols() ) {
            if ( a instanceof ActionInsertFactCol52 ) {
                final ActionInsertFactCol52 aif = (ActionInsertFactCol52) a;
                final ActionInsertFactFieldsPattern p = lookupExistingInsertFactPattern( aif.getBoundName() );
                final List<ActionInsertFactCol52> actions = patternToActionsMap.get( p );
                getValidator().addActionPattern( p );
                actions.add( aif );
            }
        }
View Full Code Here

        for ( ActionInsertFactFieldsPattern p : patternToActionsMap.keySet() ) {
            if ( p.getBoundName().equals( boundName ) ) {
                return p;
            }
        }
        final ActionInsertFactFieldsPattern p = new ActionInsertFactFieldsPattern();
        patternToActionsMap.put( p,
                                 new ArrayList<ActionInsertFactCol52>() );
        return p;
    }
View Full Code Here

    @Override
    public void makeResult( final GuidedDecisionTable52 model ) {
        //Copy actions to decision table model
        int fi = 1;
        for ( Map.Entry<ActionInsertFactFieldsPattern, List<ActionInsertFactCol52>> ps : patternToActionsMap.entrySet() ) {
            final ActionInsertFactFieldsPattern p = ps.getKey();
            if ( !getValidator().isPatternValid( p ) ) {
                String binding = NEW_FACT_PREFIX + ( fi++ );
                p.setBoundName( binding );
                while ( !getValidator().isPatternBindingUnique( p ) ) {
                    binding = NEW_FACT_PREFIX + ( fi++ );
                    p.setBoundName( binding );
                }
            }

            final String factType = p.getFactType();
            final String boundName = p.getBoundName();
            final boolean isLogicalInsert = p.isInsertedLogically();

            for ( ActionInsertFactCol52 aif : ps.getValue() ) {
                aif.setFactType( factType );
                aif.setBoundName( boundName );
                aif.setInsertLogical( isLogicalInsert );
View Full Code Here

        //Existing ActionInsertFactCols (should be empty for a new Decision Table)
        for ( ActionCol52 a : model.getActionCols() ) {
            if ( a instanceof ActionInsertFactCol52 ) {
                final ActionInsertFactCol52 aif = (ActionInsertFactCol52) a;
                final ActionInsertFactFieldsPattern p = lookupExistingInsertFactPattern( aif.getBoundName() );
                final List<ActionInsertFactCol52> actions = patternToActionsMap.get( p );
                getValidator().addActionPattern( p );
                actions.add( aif );
            }
        }
View Full Code Here

        for ( ActionInsertFactFieldsPattern p : patternToActionsMap.keySet() ) {
            if ( p.getBoundName().equals( boundName ) ) {
                return p;
            }
        }
        final ActionInsertFactFieldsPattern p = new ActionInsertFactFieldsPattern();
        patternToActionsMap.put( p,
                                 new ArrayList<ActionInsertFactCol52>() );
        return p;
    }
View Full Code Here

    @Override
    public void makeResult( final GuidedDecisionTable52 model ) {
        //Copy actions to decision table model
        int fi = 1;
        for ( Map.Entry<ActionInsertFactFieldsPattern, List<ActionInsertFactCol52>> ps : patternToActionsMap.entrySet() ) {
            final ActionInsertFactFieldsPattern p = ps.getKey();
            if ( !getValidator().isPatternValid( p ) ) {
                String binding = NEW_FACT_PREFIX + ( fi++ );
                p.setBoundName( binding );
                while ( !getValidator().isPatternBindingUnique( p ) ) {
                    binding = NEW_FACT_PREFIX + ( fi++ );
                    p.setBoundName( binding );
                }
            }

            final String factType = p.getFactType();
            final String boundName = p.getBoundName();
            final boolean isLogicalInsert = p.isInsertedLogically();

            for ( ActionInsertFactCol52 aif : ps.getValue() ) {
                aif.setFactType( factType );
                aif.setBoundName( boundName );
                aif.setInsertLogical( isLogicalInsert );
View Full Code Here

TOP

Related Classes of org.drools.workbench.models.guided.dtable.shared.model.ActionInsertFactFieldsPattern

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.