001/*
002 * Copyright 2007 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 1.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * 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 implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.student.enrollment.lpr.dto;
017
018import java.io.Serializable;
019import java.util.ArrayList;
020import java.util.List;
021
022import javax.xml.bind.annotation.XmlAccessType;
023import javax.xml.bind.annotation.XmlAccessorType;
024import javax.xml.bind.annotation.XmlAnyElement;
025import javax.xml.bind.annotation.XmlElement;
026import javax.xml.bind.annotation.XmlType;
027
028import org.kuali.student.enrollment.lpr.infc.LprTransactionItemResult;
029import org.w3c.dom.Element;
030
031
032/**
033 * 
034 * @author Kuali Student Team (sambitpatnaik)
035 *
036 */
037@XmlAccessorType(XmlAccessType.FIELD)
038@XmlType(name = "LprTransactionItemResultInfo", propOrder = {"resultingLprId", "message", "status", "_futureElements"})
039public class LprTransactionItemResultInfo implements LprTransactionItemResult, Serializable {
040
041    private static final long serialVersionUID = 1L;
042
043    @XmlElement
044    private String resultingLprId;
045
046    @XmlElement
047    private String message;
048    
049    @XmlElement    
050    private Boolean status;
051    
052    @XmlAnyElement
053    private List<Element> _futureElements;
054
055
056    public LprTransactionItemResultInfo() {
057    }
058    
059    
060    public LprTransactionItemResultInfo(LprTransactionItemResult result) {
061
062        if(null == result) return;
063        
064        this.resultingLprId = result.getResultingLprId();
065        this.status = result.getStatus();
066        this.message = result.getMessage();
067    }
068    
069    public void setResultingLprId(String resultingLprId) {
070        this.resultingLprId = resultingLprId;
071    }
072    
073    public void setStatus(Boolean status) {
074        this.status = status;
075    }
076    
077    @Override
078    public String getResultingLprId() {
079        return resultingLprId;
080    }
081
082
083    @Override
084    public Boolean getStatus() {
085        return status;
086    }
087
088
089    @Override
090        public String getMessage() {
091                return message;
092        }
093
094
095        public void setMessage(String message) {
096                this.message = message;
097        }
098
099
100        @Override
101        public String toString() {
102                StringBuilder builder = new StringBuilder();
103                builder.append("LprTransactionItemResultInfo [resultingLprId=");
104                builder.append(resultingLprId);
105                builder.append(", message=");
106                builder.append(message);
107                builder.append(", status=");
108                builder.append(status);
109                builder.append("]");
110                return builder.toString();
111        }
112        
113        
114
115}