| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
|
| 17 | |
package org.kuali.student.r2.common.dto; |
| 18 | |
|
| 19 | |
import java.io.Serializable; |
| 20 | |
import java.util.ArrayList; |
| 21 | |
import java.util.List; |
| 22 | |
|
| 23 | |
import javax.xml.bind.annotation.XmlElement; |
| 24 | |
import javax.xml.bind.annotation.XmlTransient; |
| 25 | |
|
| 26 | |
import org.kuali.student.r2.common.infc.Attribute; |
| 27 | |
import org.kuali.student.r2.common.infc.HasAttributes; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
@SuppressWarnings("serial") |
| 36 | |
@XmlTransient |
| 37 | |
public abstract class HasAttributesInfo |
| 38 | |
implements HasAttributes, Serializable { |
| 39 | |
|
| 40 | |
@XmlElement |
| 41 | |
private List<AttributeInfo> attributes; |
| 42 | |
|
| 43 | |
|
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | 0 | public HasAttributesInfo() { |
| 48 | 0 | } |
| 49 | |
|
| 50 | |
|
| 51 | |
|
| 52 | |
|
| 53 | |
|
| 54 | |
|
| 55 | 0 | public HasAttributesInfo(HasAttributes hasAttrs) { |
| 56 | 0 | if (null != hasAttrs) { |
| 57 | 0 | if (null != hasAttrs.getAttributes()) { |
| 58 | 0 | attributes = new ArrayList<AttributeInfo>(); |
| 59 | 0 | for (Attribute attr : hasAttrs.getAttributes()) { |
| 60 | 0 | attributes.add(new AttributeInfo(attr)); |
| 61 | |
} |
| 62 | |
} |
| 63 | |
} |
| 64 | 0 | } |
| 65 | |
|
| 66 | |
@Override |
| 67 | |
public List<AttributeInfo> getAttributes() { |
| 68 | 0 | if (attributes == null) { |
| 69 | 0 | attributes = new ArrayList<AttributeInfo>(); |
| 70 | |
} |
| 71 | 0 | return attributes; |
| 72 | |
} |
| 73 | |
|
| 74 | |
public void setAttributes(List<AttributeInfo> attributes) { |
| 75 | 0 | this.attributes = attributes; |
| 76 | 0 | } |
| 77 | |
} |