Coverage Report - org.kuali.student.enrollment.class1.lpr.model.AbstractResultValueGroupEntity
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractResultValueGroupEntity
0%
0/20
N/A
1
 
 1  
 /**
 2  
  * Copyright 2012 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the the Educational Community License, Version 1.0
 5  
  * (the "License"); you may not use this file except in compliance
 6  
  * with the License.  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.enrollment.class1.lpr.model;
 17  
 
 18  
 import javax.persistence.Column;
 19  
 import javax.persistence.Id;
 20  
 import javax.persistence.MappedSuperclass;
 21  
 import javax.persistence.PrePersist;
 22  
 
 23  
 import org.kuali.student.common.util.UUIDHelper;
 24  
 
 25  
 /**
 26  
  * 
 27  
  * A base class for tiny entities that refer the the ResultValueGroup class from lrc.
 28  
  * 
 29  
  * Foreign keys are not used because it crosses the service boundaries.
 30  
  * 
 31  
  * @author ocleirig
 32  
  *
 33  
  */
 34  
 @MappedSuperclass
 35  
 public abstract class AbstractResultValueGroupEntity {
 36  
 
 37  
         @Id
 38  
         @Column(name = "ID")
 39  
         private String id;
 40  
 
 41  
         @Column (name="RESULT_VAL_GRP_ID", nullable=false)
 42  
         private String resultValueGroupId;
 43  
         
 44  
         @PrePersist
 45  
         public void prePersist() {
 46  0
                 this.id = UUIDHelper.genStringUUID();
 47  0
         }
 48  
         
 49  0
         public AbstractResultValueGroupEntity() {
 50  0
         }
 51  
         
 52  
         public AbstractResultValueGroupEntity(String resultValueGroupId) {
 53  0
                 this();
 54  
                 
 55  0
                 setResultValueGroupId(resultValueGroupId);
 56  0
         }
 57  
 
 58  
         public String getId() {
 59  0
                 return id;
 60  
         }
 61  
 
 62  
         public void setId(String id) {
 63  0
                 this.id = id;
 64  0
         }
 65  
 
 66  
         public String getResultValueGroupId() {
 67  0
                 return resultValueGroupId;
 68  
         }
 69  
 
 70  
         public void setResultValueGroupId(String resultValueGroupId) {
 71  0
                 this.resultValueGroupId = resultValueGroupId;
 72  0
         }
 73  
 
 74  
         @Override
 75  
         public String toString() {
 76  0
                 StringBuilder builder = new StringBuilder();
 77  0
                 builder.append("AbstractResultValueGroupEntity [id=");
 78  0
                 builder.append(id);
 79  0
                 builder.append(", resultValueGroupId=");
 80  0
                 builder.append(resultValueGroupId);
 81  0
                 builder.append("]");
 82  0
                 return builder.toString();
 83  
         }
 84  
         
 85  
         
 86  
 
 87  
 }