Clover Coverage Report - KS Common 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 06:00:36 EDT
../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
8   42   5   2.67
4   26   0.62   3
3     1.67  
1    
 
  VersionEntity       Line # 17 8 0% 5 15 0% 0.0
 
No Tests
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the Educational Community License, Version 2.0 (the "License"); you may
3    * not use this file except in compliance with the License. You may obtain a copy of the License at
4    * http://www.osedu.org/licenses/ECL-2.0 Unless required by applicable law or agreed to in writing, software distributed
5    * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6    * implied. See the License for the specific language governing permissions and limitations under the License.
7    */
8   
9    package org.kuali.student.common.entity;
10   
11    import javax.persistence.Embedded;
12    import javax.persistence.MappedSuperclass;
13   
14    import org.kuali.student.common.util.UUIDHelper;
15   
16    @MappedSuperclass
 
17    public abstract class VersionEntity extends MetaEntity {
18   
19    @Embedded
20    private Version version;
21   
 
22  0 toggle @Override
23    protected void onPrePersist(){
24  0 super.onPrePersist();
25  0 if(version == null){
26  0 version = new Version();
27    }
28  0 if(version.getSequenceNumber()==null){
29  0 version.setSequenceNumber(Long.valueOf(1));
30    }
31  0 version.setVersionIndId(UUIDHelper.genStringUUID(version.getVersionIndId()));
32    }
33   
34   
 
35  0 toggle public Version getVersion() {
36  0 return version;
37    }
38   
 
39  0 toggle public void setVersion(Version version) {
40  0 this.version = version;
41    }
42    }