Coverage Report - org.kuali.student.r2.core.statement.dto.StatementInfo
 
Classes in this File Line Coverage Branch Coverage Complexity
StatementInfo
0%
0/22
0%
0/6
1.333
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.r2.core.statement.dto;
 17  
 
 18  
 import org.kuali.student.r2.common.dto.IdEntityInfo;
 19  
 import org.kuali.student.r2.core.statement.infc.Statement;
 20  
 import org.w3c.dom.Element;
 21  
 
 22  
 import javax.xml.bind.annotation.XmlAccessType;
 23  
 import javax.xml.bind.annotation.XmlAccessorType;
 24  
 import javax.xml.bind.annotation.XmlAnyElement;
 25  
 import javax.xml.bind.annotation.XmlElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 import java.io.Serializable;
 28  
 import java.util.ArrayList;
 29  
 import java.util.List;
 30  
 
 31  
 @XmlAccessorType(XmlAccessType.FIELD)
 32  
 @XmlType(name = "StatementInfo", propOrder = {"id", "typeKey", "stateKey",
 33  
         "name", "descr", "operator", "statementIds", "reqComponentIds", "meta", "attributes", "_futureElements"})
 34  
 public class StatementInfo extends IdEntityInfo implements Statement, Serializable {
 35  
 
 36  
     private static final long serialVersionUID = 1L;
 37  
 
 38  
     @XmlElement
 39  
     private StatementOperator operator;
 40  
     @XmlElement
 41  
     private List<String> statementIds;
 42  
     @XmlElement
 43  
     private List<String> reqComponentIds;
 44  
     @XmlAnyElement
 45  
     private List<Element> _futureElements;
 46  
 
 47  0
     public StatementInfo() {
 48  0
     }
 49  
 
 50  
     public StatementInfo(Statement statement) {
 51  0
         super(statement);
 52  0
         if (null != statement) {
 53  
             // shallow copy is fine here
 54  0
             this.operator = statement.getOperator();
 55  0
             this.statementIds = new ArrayList<String>(statement.getStatementIds());
 56  0
             this.reqComponentIds = new ArrayList<String>(statement.getReqComponentIds());
 57  
         }
 58  0
     }
 59  
 
 60  
     @Override
 61  
     public StatementOperator getOperator() {
 62  0
         return this.operator;
 63  
     }
 64  
 
 65  
     public void setOperator(StatementOperator operator) {
 66  0
         this.operator = operator;
 67  0
     }
 68  
 
 69  
     @Override
 70  
     public List<String> getStatementIds() {
 71  0
         if (this.statementIds == null) {
 72  0
             this.statementIds = new ArrayList<String>(0);
 73  
         }
 74  0
         return this.statementIds;
 75  
     }
 76  
 
 77  
     public void setStatementIds(List<String> statementIds) {
 78  0
         this.statementIds = statementIds;
 79  0
     }
 80  
 
 81  
     @Override
 82  
     public List<String> getReqComponentIds() {
 83  0
         if (this.reqComponentIds == null) {
 84  0
             this.reqComponentIds = new ArrayList<String>(0);
 85  
         }
 86  0
         return this.reqComponentIds;
 87  
     }
 88  
 
 89  
     public void setReqComponentIds(List<String> reqComponentIds) {
 90  0
         this.reqComponentIds = reqComponentIds;
 91  0
     }
 92  
 
 93  
     @Override
 94  
     public String toString() {
 95  0
         return "StatementInfo[id=" + getId() + "]";
 96  
     }
 97  
 
 98  
 }