View Javadoc

1   /*
2    * Copyright 2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 1.0 (the
5    * "License"); you may not use this file except in compliance with the
6    * 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
13   * implied.  See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  package org.kuali.student.enrollment.batchjobresults.dto;
17  
18  import java.util.List;
19  
20  import javax.xml.bind.annotation.XmlAccessType;
21  import javax.xml.bind.annotation.XmlAccessorType;
22  import javax.xml.bind.annotation.XmlAnyElement;
23  import javax.xml.bind.annotation.XmlElement;
24  import javax.xml.bind.annotation.XmlType;
25  
26  import org.kuali.student.enrollment.batchjobresults.infc.BatchJobResultItem;
27  import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
28  import org.kuali.student.r2.common.dto.RichTextInfo;
29  import org.w3c.dom.Element;
30  
31  
32  @XmlAccessorType(XmlAccessType.FIELD)
33  @XmlType(name = "SocInfo", propOrder = {"id",
34      "typeKey",
35      "stateKey",
36      "batchJobResultId",
37      "sourceId",
38      "targetId",
39      "message",
40      "meta",
41      "attributes",
42      "_futureElements"})
43  public class BatchJobResultItemInfo
44          extends IdNamelessEntityInfo
45          implements BatchJobResultItem {
46  
47      private static final long serialVersionUID = 1L;
48      @XmlElement
49      private String batchJobResultId;
50      @XmlElement
51      private String sourceId;
52      @XmlElement
53      private String targetId;
54      @XmlElement
55      private RichTextInfo message;
56      @XmlAnyElement
57      private List<Element> _futureElements;
58  
59     
60      public BatchJobResultItemInfo() {
61      }
62  
63      
64      public BatchJobResultItemInfo(BatchJobResultItem orig) {
65  
66          super(orig);
67  
68          if (orig == null) {
69              return;
70          }
71  
72          this.batchJobResultId = orig.getBatchJobResultId();
73          this.targetId = orig.getTargetId();
74          this.sourceId = orig.getSourceId();
75          if (orig.getMessage() != null) {
76              this.message = new RichTextInfo (orig.getMessage());
77          }
78      }
79  
80      @Override
81      public RichTextInfo getMessage() {
82          return message;
83      }
84  
85      public void setMessage(RichTextInfo message) {
86          this.message = message;
87      }
88  
89      @Override
90      public String getSourceId() {
91          return sourceId;
92      }
93  
94      public void setSourceId(String sourceId) {
95          this.sourceId = sourceId;
96      }
97  
98      @Override
99      public String getTargetId() {
100         return targetId;
101     }
102 
103     public void setTargetId(String targetId) {
104         this.targetId = targetId;
105     }
106 
107     @Override
108     public String getBatchJobResultId() {
109         return batchJobResultId;
110     }
111 
112     public void setBatchJobResultId(String batchJobResultId) {
113         this.batchJobResultId = batchJobResultId;
114     }
115 
116     
117     
118 }