Coverage Report - org.kuali.rice.krad.datadictionary.validation.constraint.CaseConstraint
 
Classes in this File Line Coverage Branch Coverage Complexity
CaseConstraint
69%
9/13
N/A
1
 
 1  
 package org.kuali.rice.krad.datadictionary.validation.constraint;
 2  
 
 3  
 import javax.xml.bind.annotation.XmlAccessType;
 4  
 import javax.xml.bind.annotation.XmlAccessorType;
 5  
 import javax.xml.bind.annotation.XmlElement;
 6  
 import java.util.List;
 7  
 
 8  
 /**
 9  
  * A case constraint is a constraint that is imposed only when a certain condition is met, for example, if the country attribute value is "USA",
 10  
  * then a prerequisite constraint may be imposed that the 'State' attribute is non-null. 
 11  
  * 
 12  
  * This class is a direct copy of one that was in Kuali Student. 
 13  
  * 
 14  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 15  
  * @since 1.1
 16  
  */
 17  
 @XmlAccessorType(XmlAccessType.FIELD)
 18  5
 public class CaseConstraint extends BaseConstraint {
 19  
         @XmlElement
 20  
     protected List<WhenConstraint> whenConstraint;
 21  
         @XmlElement
 22  
         protected String fieldPath;
 23  
         @XmlElement
 24  
         protected String operator;
 25  
         @XmlElement
 26  
         protected boolean caseSensitive;
 27  
 
 28  
         public List<WhenConstraint> getWhenConstraint() {
 29  2
                 return whenConstraint;
 30  
         }
 31  
 
 32  
         public void setWhenConstraint(List<WhenConstraint> whenConstraint) {
 33  5
                 this.whenConstraint = whenConstraint;
 34  5
         }
 35  
 
 36  
         public String getFieldPath() {
 37  2
                 return fieldPath;
 38  
         }
 39  
 
 40  
         public void setFieldPath(String fieldPath) {
 41  0
                 this.fieldPath = fieldPath;
 42  0
         }
 43  
 
 44  
         public String getOperator() {
 45  2
                 return operator;
 46  
         }
 47  
 
 48  
         public void setOperator(String operator) {
 49  0
                 this.operator = operator;
 50  0
         }
 51  
 
 52  
     public boolean isCaseSensitive() {
 53  2
         return caseSensitive;
 54  
     }
 55  
 
 56  
     public void setCaseSensitive(boolean caseSensitive) {
 57  5
         this.caseSensitive = caseSensitive;
 58  5
     }
 59  
 }