Coverage Report - org.kuali.rice.core.api.criteria.OrExpression
 
Classes in this File Line Coverage Branch Coverage Complexity
OrExpression
100%
5/5
N/A
1
OrExpression$Constants
0%
0/1
N/A
1
 
 1  
 /*
 2  
  * Copyright 2011 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.rice.core.api.criteria;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.xml.bind.annotation.XmlAccessType;
 21  
 import javax.xml.bind.annotation.XmlAccessorType;
 22  
 import javax.xml.bind.annotation.XmlRootElement;
 23  
 import javax.xml.bind.annotation.XmlType;
 24  
 
 25  
 /**
 26  
  * An immutable composite expression which implements "or-ing" of multiple
 27  
  * expressions together. 
 28  
  * 
 29  
  * <p>Constructed as part of a {@link Criteria} when built using a
 30  
  * {@link CriteriaBuilder}.
 31  
  * 
 32  
  * @see Criteria
 33  
  * @see CriteriaBuilder
 34  
  * 
 35  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 36  
  */
 37  16
 @XmlRootElement(name = OrExpression.Constants.ROOT_ELEMENT_NAME)
 38  
 @XmlAccessorType(XmlAccessType.NONE)
 39  
 @XmlType(name = OrExpression.Constants.TYPE_NAME)
 40  
 public final class OrExpression extends AbstractCompositeExpression {
 41  
         
 42  
         private static final long serialVersionUID = -6575256900578172242L;
 43  
 
 44  
         /**
 45  
          * Used only by JAXB for construction.
 46  
          */
 47  
         @SuppressWarnings("unused")
 48  
         private OrExpression() {
 49  8
                 super();
 50  8
         }
 51  
         
 52  
         /**
 53  
          * Construct an "Or" expression from the given list of expressions.  The given list
 54  
          * of expressions can be null or empty.  If the list is null then it will be
 55  
          * translated internally to an empty list.
 56  
          * 
 57  
          * @param expressions the List of expressions to set on the And expression
 58  
          */
 59  
         OrExpression(List<Expression> expressions) {
 60  10
             super(expressions);
 61  10
         }
 62  
         
 63  
         /**
 64  
      * Defines some internal constants used on this class.
 65  
      */
 66  0
     static class Constants {
 67  
         final static String ROOT_ELEMENT_NAME = "or";
 68  
         final static String TYPE_NAME = "OrType";
 69  
     }
 70  
 
 71  
 }