Coverage Report - org.kuali.rice.kew.useroptions.UserOptions
 
Classes in this File Line Coverage Branch Coverage Complexity
UserOptions
0%
0/16
0%
0/2
1.222
 
 1  
 /*
 2  
  * Copyright 2005-2007 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.kew.useroptions;
 18  
 
 19  
 import javax.persistence.Column;
 20  
 import javax.persistence.Entity;
 21  
 import javax.persistence.Id;
 22  
 import javax.persistence.IdClass;
 23  
 import javax.persistence.NamedQueries;
 24  
 import javax.persistence.NamedQuery;
 25  
 import javax.persistence.Table;
 26  
 import javax.persistence.Version;
 27  
 
 28  
 import org.kuali.rice.kew.preferences.Preferences;
 29  
 
 30  
 
 31  
 /**
 32  
  * An option defined for a user.  These are used to store user {@link Preferences}.
 33  
  *
 34  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 35  
  */
 36  
 @IdClass(org.kuali.rice.kew.useroptions.UserOptionsId.class)
 37  
 @Entity
 38  
 @Table(name="KREW_USR_OPTN_T")
 39  
 @NamedQueries({
 40  
   @NamedQuery(name="UserOptions.FindByUserQualified", query="select uo from UserOptions uo where uo.workflowId = :workflowId and uo.optionId like :optionId"), 
 41  
   @NamedQuery(name="UserOptions.FindByWorkflowId",  query="select uo from UserOptions uo where uo.workflowId = :workflowId"),
 42  
   @NamedQuery(name="UserOptions.FindByOptionValue", query="select uo from UserOptions uo where uo.optionId = :optionId and uo.optionVal = :optionValue"),
 43  
   @NamedQuery(name="UserOptions.FindByOptionId", query="select uo from UserOptions uo where uo.optionId = :optionId and uo.workflowId = :workflowId")
 44  
 })
 45  0
 public class UserOptions implements Comparable {
 46  
 
 47  
         @Id
 48  
         @Column(name="PRNCPL_ID")
 49  
         private String workflowId;
 50  
         @Id
 51  
         @Column(name="PRSN_OPTN_ID")
 52  
         private String optionId;
 53  
         @Column(name="VAL")
 54  
         private String optionVal;
 55  
         @Version
 56  
         @Column(name="VER_NBR")
 57  
         private Integer lockVerNbr;
 58  
 
 59  
         /**
 60  
          * @return
 61  
          */
 62  
         public Integer getLockVerNbr() {
 63  0
                 return lockVerNbr;
 64  
         }
 65  
 
 66  
         /**
 67  
          * @return
 68  
          */
 69  
         public String getOptionId() {
 70  0
                 return optionId;
 71  
         }
 72  
 
 73  
         /**
 74  
          * @return
 75  
          */
 76  
         public String getOptionVal() {
 77  0
                 return optionVal;
 78  
         }
 79  
 
 80  
         /**
 81  
          * @return
 82  
          */
 83  
         public String getWorkflowId() {
 84  0
                 return workflowId;
 85  
         }
 86  
 
 87  
         /**
 88  
          * @param integer
 89  
          */
 90  
         public void setLockVerNbr(Integer integer) {
 91  0
                 lockVerNbr = integer;
 92  0
         }
 93  
 
 94  
         /**
 95  
          * @param string
 96  
          */
 97  
         public void setOptionId(String string) {
 98  0
                 optionId = string;
 99  0
         }
 100  
 
 101  
         /**
 102  
          * @param string
 103  
          */
 104  
         public void setOptionVal(String string) {
 105  0
                 optionVal = string;
 106  0
         }
 107  
 
 108  
         /**
 109  
          * @param string
 110  
          */
 111  
         public void setWorkflowId(String string) {
 112  0
             workflowId = string;
 113  0
         }
 114  
 
 115  
         
 116  
     public int compareTo(Object o) {
 117  0
         if (o instanceof UserOptions) {
 118  0
             return this.getOptionId().compareTo(((UserOptions)o).getOptionId());
 119  
         }
 120  0
         return 0;
 121  
     }
 122  
 }
 123