com.epam.fix.validation.engine.validators.condition.operators
Class ANDValidateOperator

java.lang.Object
  extended by com.epam.fix.validation.engine.validators.condition.AbstractCondition
      extended by com.epam.fix.validation.engine.validators.condition.operators.ANDValidateOperator
All Implemented Interfaces:
ICondition

public class ANDValidateOperator
extends AbstractCondition

The logical AND operator.


Field Summary
 
Fields inherited from class com.epam.fix.validation.engine.validators.condition.AbstractCondition
isGroupTag
 
Constructor Summary
ANDValidateOperator(ICondition operand1, ICondition operand2, boolean isGroup)
          Creates the ANDValidateOperator .
 
Method Summary
 ICondition getOperand1()
          Gets the first operand.
 ICondition getOperand2()
          Gets the second operand.
 List<Integer> getTags()
          Gets tags from operands.
 boolean isGroupTags()
          Returns true, if one of all operand is group.
 boolean isRequired(FIXFieldList msgFieldList)
          Returns true, if both operands are required.
 void setGroupTags(boolean isGroup)
          Sets group flag.
 boolean validateCondition(Integer validateTag, FIXFieldList msgFieldList, String msgType, Map<Integer,ICondition> tagsMap, boolean inversion)
          Returns true, if both operators returns true.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ANDValidateOperator

public ANDValidateOperator(ICondition operand1,
                           ICondition operand2,
                           boolean isGroup)
Creates the ANDValidateOperator .

Parameters:
operand1 - the first operand
operand2 - the second operand
isGroup - the group tag
Method Detail

validateCondition

public boolean validateCondition(Integer validateTag,
                                 FIXFieldList msgFieldList,
                                 String msgType,
                                 Map<Integer,ICondition> tagsMap,
                                 boolean inversion)
Returns true, if both operators returns true.
The example of use: existtags(T$1) AND existtags(T$2).

Parameters:
validateTag - the validate tag
msgFieldList - the message
msgType - the message type
tagsMap - All tags with conditional for current part of FIXMessage.
inversion - Inversion: if true all validations are doing in invert order.
Returns:
true if condition valid in other case false.

isRequired

public boolean isRequired(FIXFieldList msgFieldList)
Returns true, if both operands are required.

Parameters:
msgFieldList - the message

isGroupTags

public boolean isGroupTags()
Returns true, if one of all operand is group.


setGroupTags

public void setGroupTags(boolean isGroup)
Sets group flag.

Parameters:
isGroup - the group flag

getTags

public List<Integer> getTags()
Gets tags from operands.


getOperand1

public ICondition getOperand1()
Gets the first operand.


getOperand2

public ICondition getOperand2()
Gets the second operand.



Copyright © 2000-2011 EPAM Systems. All Rights Reserved.