private void visitSingleFieldConstraint(final SingleFieldConstraintEBLeftSide sfexp) { if ( sfexp.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_TEMPLATE ) { this.peerVariables.add( new ValueHolder( sfexp.getFieldName(), sfexp.getValue(), ValueHolder.Type.TEMPLATE_KEY ) ); } else { this.peerVariables.add( new ValueHolder( sfexp.getFieldName(), sfexp.getValue(), ValueHolder.Type.VALUE ) ); } }
private void visitSingleFieldConstraint(final SingleFieldConstraintEBLeftSide sfexp) { if ( sfexp.getConstraintValueType() == BaseSingleFieldConstraint.TYPE_TEMPLATE ) { this.peerVariables.add( new ValueHolder( sfexp.getFieldName(), sfexp.getValue(), ValueHolder.Type.TEMPLATE_KEY ) ); } else { this.peerVariables.add( new ValueHolder( sfexp.getFieldName(), sfexp.getValue(), ValueHolder.Type.VALUE ) ); } }
private void visitSingleFieldConstraint(SingleFieldConstraintEBLeftSide sfexp) { String genericType = sfexp.getExpressionLeftSide().getGenericType(); String factType = sfexp.getExpressionLeftSide().getPreviousClassType(); if ( factType == null ) { factType = sfexp.getExpressionLeftSide().getClassType(); } InterpolationVariable var = new InterpolationVariable( sfexp.getValue(), genericType, factType, sfexp.getFieldName() ); if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == sfexp.getConstraintValueType() && !vars.containsKey( var ) ) { vars.put( var, vars.size() ); } //Visit Connection constraints if ( sfexp.connectives != null ) { for ( int i = 0; i < sfexp.connectives.length; i++ ) { final ConnectiveConstraint cc = sfexp.connectives[i]; InterpolationVariable ccVar = new InterpolationVariable( cc.getValue(), genericType, factType, cc.getFieldName() ); if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.containsKey( ccVar ) ) { vars.put( ccVar, vars.size() ); } } } }
private void visitSingleFieldConstraint(SingleFieldConstraintEBLeftSide sfexp) { String genericType = sfexp.getExpressionLeftSide().getGenericType(); String factType = sfexp.getExpressionLeftSide().getPreviousClassType(); if ( factType == null ) { factType = sfexp.getExpressionLeftSide().getClassType(); } InterpolationVariable var = new InterpolationVariable( sfexp.getValue(), genericType, factType, sfexp.getFieldName() ); if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == sfexp.getConstraintValueType() && !vars.containsKey( var ) ) { vars.put( var, vars.size() ); } //Visit Connection constraints if ( sfexp.connectives != null ) { for ( int i = 0; i < sfexp.connectives.length; i++ ) { final ConnectiveConstraint cc = sfexp.connectives[i]; InterpolationVariable ccVar = new InterpolationVariable( cc.getValue(), genericType, factType, cc.getFieldName() ); if ( BaseSingleFieldConstraint.TYPE_TEMPLATE == cc.getConstraintValueType() && !vars.containsKey( ccVar ) ) { vars.put( ccVar, vars.size() ); } } } }
private SingleFieldConstraintEBLeftSide visitSingleFieldConstraint(SingleFieldConstraintEBLeftSide sfexp) { SingleFieldConstraintEBLeftSide clone = new SingleFieldConstraintEBLeftSide(); clone.setConstraintValueType( sfexp.getConstraintValueType() ); clone.setExpressionLeftSide( (ExpressionFormLine) visit( sfexp.getExpressionLeftSide() ) ); clone.setExpressionValue( (ExpressionFormLine) visit( sfexp.getExpressionValue() ) ); clone.setFieldBinding( sfexp.getFieldBinding() ); clone.setFactType( sfexp.getFactType() ); clone.setFieldName( sfexp.getFieldName() ); clone.setFieldType( sfexp.getFieldType() ); clone.setOperator( sfexp.getOperator() ); for ( Map.Entry<String, String> entry : sfexp.getParameters().entrySet() ) { clone.setParameter( entry.getKey(), entry.getValue() ); } clone.setParent( sfexp.getParent() ); clone.setValue( sfexp.getValue() ); if ( sfexp.connectives != null ) { clone.connectives = new ConnectiveConstraint[sfexp.connectives.length]; for ( int i = 0; i < sfexp.connectives.length; i++ ) { clone.connectives[i] = (ConnectiveConstraint) visit( sfexp.connectives[i] ); } } return clone; }
private SingleFieldConstraintEBLeftSide visitSingleFieldConstraint(SingleFieldConstraintEBLeftSide sfexp) { SingleFieldConstraintEBLeftSide clone = new SingleFieldConstraintEBLeftSide(); clone.setConstraintValueType( sfexp.getConstraintValueType() ); clone.setExpressionLeftSide( (ExpressionFormLine) visit( sfexp.getExpressionLeftSide() ) ); clone.setExpressionValue( (ExpressionFormLine) visit( sfexp.getExpressionValue() ) ); clone.setFieldBinding( sfexp.getFieldBinding() ); clone.setFactType( sfexp.getFactType() ); clone.setFieldName( sfexp.getFieldName() ); clone.setFieldType( sfexp.getFieldType() ); clone.setOperator( sfexp.getOperator() ); for ( Map.Entry<String, String> entry : sfexp.getParameters().entrySet() ) { clone.setParameter( entry.getKey(), entry.getValue() ); } clone.setParent( sfexp.getParent() ); clone.setValue( sfexp.getValue() ); if ( sfexp.connectives != null ) { clone.connectives = new ConnectiveConstraint[sfexp.connectives.length]; for ( int i = 0; i < sfexp.connectives.length; i++ ) { clone.connectives[i] = (ConnectiveConstraint) visit( sfexp.connectives[i] ); } } return clone; }