Clover Coverage Report - KS Enroll API 1.3.0-SNAPSHOT
Coverage timestamp: Tue Apr 19 2011 12:34:23 EST
../../../../img/srcFileCovDistChart0.png 45% of files have more coverage
22   58   3   22
4   33   0.14   1
1     3  
1    
 
  Student2RiceAttributeDefinitionConverter       Line # 26 22 0% 3 27 0% 0.0
 
No Tests
 
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.student.datadictionary;
17   
18    import org.kuali.rice.kns.datadictionary.AttributeDefinition;
19    import org.kuali.student.datadictionary.dto.AttributeDefinitionInfo;
20    import org.kuali.student.datadictionary.infc.AttributeDefinitionInfc;
21   
22    /**
23    *
24    * @author nwright
25    */
 
26    public class Student2RiceAttributeDefinitionConverter {
27   
28    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(Student2RiceAttributeDefinitionConverter.class);
29   
 
30  0 toggle public AttributeDefinition convert(AttributeDefinitionInfc student) {
31  0 AttributeDefinition rice = new AttributeDefinition();
32  0 rice.setName(student.getName());
33  0 rice.setChildEntryName(student.getChildEntryName());
34  0 rice.setDataType(student.getDataType());
35  0 rice.setRequired(student.isRequired());
36    // rice.setMinOccurs(student.getMinOccurs());
37    // rice.setMaxOccurs(student.getMaxOccurs());
38  0 rice.setMinLength(student.getMinLength());
39  0 rice.setMaxLength(student.getMaxLength());
40  0 rice.setForceUppercase(student.getForceUppercase());
41  0 rice.setShortLabel(student.getShortLabel());
42  0 rice.setSummary(student.getSummary());
43  0 rice.setLabel(student.getLabel());
44  0 rice.setDescription(student.getDescription());
45  0 rice.setExclusiveMin(student.getExclusiveMin());
46  0 rice.setInclusiveMax(student.getInclusiveMax());
47  0 rice.setDisplayLabelAttribute(student.getDisplayLabelAttribute());
48  0 rice.setUnique(student.isUnique());
49  0 rice.setCustomValidatorClass(student.getCustomValidatorClass());
50  0 if (student.getFormatterClass() != null) {
51  0 rice.setFormatterClass(student.getFormatterClass());
52    }
53  0 if (student.getValidCharactersConstraint() != null) {
54  0 rice.setValidCharactersConstraint(new Student2RiceValidCharactersConstraintConverter().convert(student.getValidCharactersConstraint()));
55    }
56  0 return rice;
57    }
58    }