Coverage Report - org.kuali.student.common.infc.Comparison
 
Classes in this File Line Coverage Branch Coverage Complexity
Comparison
N/A
N/A
1
 
 1  
 /*
 2  
  * Copyright 2009 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 1.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl1.php
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.student.common.infc;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 /**
 21  
  * Criteria for a generic query
 22  
  */
 23  
 public interface Comparison  {
 24  
 
 25  
   
 26  
     /**
 27  
      * Name: Field Key
 28  
      *
 29  
      * Dot path notation to identity the name of field to be compared
 30  
      */
 31  
     public String getFieldKey();
 32  
 
 33  
     /**
 34  
      * Name: Operator
 35  
      * 
 36  
      * Operator to use to compare the field to the value. The valid values are:<ol>
 37  
      * <li>=
 38  
      * <li>in
 39  
      * <li><
 40  
      * <li>!=
 41  
      * <li>>=
 42  
      * <li><=
 43  
      * <li>like
 44  
      * <li>between
 45  
      * </ol>
 46  
      * The operators should work similar to their corresponding SQL operators.
 47  
      *
 48  
      * Complex objects can only be checked to see if they are null or not null.
 49  
      * "in" operator takes a list of values
 50  
      * "between" operator takes two values for from and thru inclusive
 51  
      * all others take a single value
 52  
      *
 53  
      * TODO: Decide for complex Lists can they be checked to see how many occurences they have?
 54  
      * TODO: Decide on other operators
 55  
      * TODO: Deicde on operators to search collections inside such as any
 56  
      * TODO: Decide how to search on dynamic attributes
 57  
      *
 58  
      */
 59  
     public String getOperator();
 60  
 
 61  
     /**
 62  
      * Name: Criteria Value(s)
 63  
      * 
 64  
      * Value to be compared
 65  
      */
 66  
     public List<String> getValues();
 67  
 
 68  
     /**
 69  
      * Name: Ignore Case?
 70  
      *
 71  
      * Check if should ignore case when doing the comparison
 72  
      * Default is false
 73  
      * If true then the case of both the specified comparison value(s) and the data value from the field should be ignored
 74  
      */
 75  
     public boolean isIgnoreCase ();
 76  
 }