001/*
002 * Copyright 2011 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 1.0 (the
005 * "License"); you may not use this file except in compliance with the
006 * License.  You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl1.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
013 * implied.  See the License for the specific language governing
014 * permissions and limitations under the License.
015 */
016package org.kuali.student.enrollment.batchjobresults.dto;
017
018import java.util.List;
019
020import javax.xml.bind.annotation.XmlAccessType;
021import javax.xml.bind.annotation.XmlAccessorType;
022import javax.xml.bind.annotation.XmlAnyElement;
023import javax.xml.bind.annotation.XmlElement;
024import javax.xml.bind.annotation.XmlType;
025
026import org.kuali.student.enrollment.batchjobresults.infc.BatchJobResultItem;
027import org.kuali.student.r2.common.dto.IdNamelessEntityInfo;
028import org.kuali.student.r2.common.dto.RichTextInfo;
029import org.w3c.dom.Element;
030
031
032@XmlAccessorType(XmlAccessType.FIELD)
033@XmlType(name = "SocInfo", propOrder = {"id",
034    "typeKey",
035    "stateKey",
036    "batchJobResultId",
037    "sourceId",
038    "targetId",
039    "message",
040    "meta",
041    "attributes",
042    "_futureElements"})
043public class BatchJobResultItemInfo
044        extends IdNamelessEntityInfo
045        implements BatchJobResultItem {
046
047    private static final long serialVersionUID = 1L;
048    @XmlElement
049    private String batchJobResultId;
050    @XmlElement
051    private String sourceId;
052    @XmlElement
053    private String targetId;
054    @XmlElement
055    private RichTextInfo message;
056    @XmlAnyElement
057    private List<Element> _futureElements;
058
059   
060    public BatchJobResultItemInfo() {
061    }
062
063    
064    public BatchJobResultItemInfo(BatchJobResultItem orig) {
065
066        super(orig);
067
068        if (orig == null) {
069            return;
070        }
071
072        this.batchJobResultId = orig.getBatchJobResultId();
073        this.targetId = orig.getTargetId();
074        this.sourceId = orig.getSourceId();
075        if (orig.getMessage() != null) {
076            this.message = new RichTextInfo (orig.getMessage());
077        }
078    }
079
080    @Override
081    public RichTextInfo getMessage() {
082        return message;
083    }
084
085    public void setMessage(RichTextInfo message) {
086        this.message = message;
087    }
088
089    @Override
090    public String getSourceId() {
091        return sourceId;
092    }
093
094    public void setSourceId(String sourceId) {
095        this.sourceId = sourceId;
096    }
097
098    @Override
099    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}