| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 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 |
| 25 |
|
|
|
|
|
| 0% |
Uncovered Elements: 27 (27) |
Complexity: 3 |
Complexity Density: 0.14 |
|
| 26 |
|
public class Student2RiceAttributeDefinitionConverter { |
| 27 |
|
|
| 28 |
|
private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(Student2RiceAttributeDefinitionConverter.class); |
| 29 |
|
|
|
|
|
| 0% |
Uncovered Elements: 26 (26) |
Complexity: 3 |
Complexity Density: 0.14 |
|
| 30 |
0
|
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 |
|
|
| 37 |
|
|
| 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 |
|
} |