Coverage Report - org.kuali.rice.krms.api.repository.agenda.AgendaTreeSubAgendaEntry
 
Classes in this File Line Coverage Branch Coverage Complexity
AgendaTreeSubAgendaEntry
0%
0/12
N/A
1.364
AgendaTreeSubAgendaEntry$1
N/A
N/A
1.364
AgendaTreeSubAgendaEntry$Builder
0%
0/17
0%
0/4
1.364
AgendaTreeSubAgendaEntry$Constants
0%
0/1
N/A
1.364
AgendaTreeSubAgendaEntry$Elements
0%
0/1
N/A
1.364
 
 1  
 /**
 2  
  * Copyright 2005-2011 The Kuali Foundation
 3  
  *
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  * http://www.opensource.org/licenses/ecl2.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 implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 package org.kuali.rice.krms.api.repository.agenda;
 17  
 
 18  
 import java.io.Serializable;
 19  
 import java.util.Collection;
 20  
 
 21  
 import javax.xml.bind.annotation.XmlAccessType;
 22  
 import javax.xml.bind.annotation.XmlAccessorType;
 23  
 import javax.xml.bind.annotation.XmlAnyElement;
 24  
 import javax.xml.bind.annotation.XmlElement;
 25  
 import javax.xml.bind.annotation.XmlRootElement;
 26  
 import javax.xml.bind.annotation.XmlType;
 27  
 
 28  
 import org.kuali.rice.core.api.CoreConstants;
 29  
 import org.kuali.rice.core.api.mo.AbstractDataTransferObject;
 30  
 import org.kuali.rice.core.api.mo.ModelBuilder;
 31  
 
 32  
 /**
 33  
  * This is a description of what this class does - ewestfal don't forget to fill this in. 
 34  
  * 
 35  
  * @author Kuali Rice Team (rice.collab@kuali.org)
 36  
  *
 37  
  */
 38  
 @XmlRootElement(name = AgendaTreeSubAgendaEntry.Constants.ROOT_ELEMENT_NAME)
 39  
 @XmlAccessorType(XmlAccessType.NONE)
 40  
 @XmlType(name = AgendaTreeSubAgendaEntry.Constants.TYPE_NAME, propOrder = {
 41  
                 AgendaTreeSubAgendaEntry.Elements.AGENDA_ITEM_ID,
 42  
                 AgendaTreeSubAgendaEntry.Elements.SUB_AGENDA_ID,
 43  
                 CoreConstants.CommonElements.FUTURE_ELEMENTS
 44  
 })
 45  0
 public final class AgendaTreeSubAgendaEntry extends AbstractDataTransferObject implements AgendaTreeEntryDefinition {
 46  
 
 47  
         private static final long serialVersionUID = 8594116503548506936L;
 48  
 
 49  
         @XmlElement(name = Elements.AGENDA_ITEM_ID, required = true)
 50  
         private final String agendaItemId;
 51  
         
 52  
         @XmlElement(name = Elements.SUB_AGENDA_ID, required = true)
 53  
         private final String subAgendaId;
 54  
                 
 55  0
         @SuppressWarnings("unused")
 56  
     @XmlAnyElement
 57  
     private final Collection<org.w3c.dom.Element> _futureElements = null;
 58  
         
 59  
         /**
 60  
          * Used only by JAXB.
 61  
          */
 62  0
         private AgendaTreeSubAgendaEntry() {
 63  0
                 this.agendaItemId = null;
 64  0
                 this.subAgendaId = null;
 65  0
         }
 66  
         
 67  0
         private AgendaTreeSubAgendaEntry(Builder builder) {
 68  0
                 this.agendaItemId = builder.getAgendaItemId();
 69  0
                 this.subAgendaId = builder.getSubAgendaId();
 70  0
         }
 71  
         
 72  
         @Override
 73  
         public String getAgendaItemId() {
 74  0
                 return agendaItemId;
 75  
         }
 76  
         
 77  
         public String getSubAgendaId() {
 78  0
                 return this.subAgendaId;
 79  
         }
 80  
 
 81  0
         public static class Builder implements ModelBuilder, Serializable {
 82  
         
 83  
                 private static final long serialVersionUID = 3548736700798501429L;
 84  
                 
 85  
                 private String agendaItemId;
 86  
                 private String subAgendaId;
 87  
 
 88  
                 /**
 89  
                  * Private constructor for creating a builder with all of it's required attributes.
 90  
                  */
 91  0
         private Builder(String agendaItemId, String subAgendaId) {
 92  0
                 setAgendaItemId(agendaItemId);
 93  0
                 setSubAgendaId(subAgendaId);
 94  0
         }
 95  
         
 96  
         public static Builder create(String agendaItemId, String subAgendaId){
 97  0
                 return new Builder(agendaItemId, subAgendaId);
 98  
         }
 99  
         
 100  
         public String getAgendaItemId() {
 101  0
                         return this.agendaItemId;
 102  
                 }
 103  
 
 104  
                 public String getSubAgendaId() {
 105  0
                         return this.subAgendaId;
 106  
                 }
 107  
                 
 108  
                 public void setAgendaItemId(String agendaItemId) {
 109  0
                         if (agendaItemId == null) {
 110  0
                                 throw new IllegalArgumentException("agendaItemId was null");
 111  
                         }
 112  0
                         this.agendaItemId = agendaItemId;
 113  0
                 }
 114  
 
 115  
                 public void setSubAgendaId(String subAgendaId) {
 116  0
                         if (subAgendaId == null) {
 117  0
                                 throw new IllegalArgumentException("subAgendaId was null");
 118  
                         }
 119  0
                         this.subAgendaId = subAgendaId;
 120  0
                 }
 121  
 
 122  
                 @Override
 123  
         public AgendaTreeSubAgendaEntry build() {
 124  0
             return new AgendaTreeSubAgendaEntry(this);
 125  
         }
 126  
                 
 127  
     }
 128  
         
 129  
         /**
 130  
          * Defines some internal constants used on this class.
 131  
          */
 132  0
         static class Constants {
 133  
                 final static String ROOT_ELEMENT_NAME = "agendaTreeSubAgendaEntry";
 134  
                 final static String TYPE_NAME = "AgendaTreeSubAgendaEntryType";
 135  
         }
 136  
         
 137  
         /**
 138  
          * A private class which exposes constants which define the XML element names to use
 139  
          * when this object is marshalled to XML.
 140  
          */
 141  0
         static class Elements {
 142  
                 final static String AGENDA_ITEM_ID = "agendaItemId";
 143  
                 final static String SUB_AGENDA_ID = "subAgendaId";
 144  
         }
 145  
 
 146  
 }