Clover Coverage Report - KS Contract Documentation Generator 0.0.1-SNAPSHOT
Coverage timestamp: Wed Dec 31 1969 19:00:00 EST
../../../../../../img/srcFileCovDistChart0.png 0% of files have more coverage
14   79   10   2.33
8   49   0.71   6
6     1.67  
1    
 
  ServiceContractModelCache       Line # 31 14 0% 10 28 0% 0.0
 
No Tests
 
1    /*
2    * Copyright 2010 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.osedu.org/licenses/ECL-2.0
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.student.contract.model.impl;
17   
18    import java.util.List;
19   
20    import org.kuali.student.contract.model.MessageStructure;
21    import org.kuali.student.contract.model.Service;
22    import org.kuali.student.contract.model.ServiceContractModel;
23    import org.kuali.student.contract.model.ServiceMethod;
24    import org.kuali.student.contract.model.XmlType;
25   
26    /**
27    * This reads the supplied spreadsheet but then caches it so it doesn't have to
28    * re-read it again.
29    * @author nwright
30    */
 
31    public class ServiceContractModelCache implements ServiceContractModel {
32   
33    private ServiceContractModel model;
34   
 
35  0 toggle public ServiceContractModelCache(ServiceContractModel model) {
36  0 this.model = model;
37    }
38    private List<ServiceMethod> serviceMethods = null;
39   
 
40  0 toggle @Override
41    public List<ServiceMethod> getServiceMethods() {
42  0 if (serviceMethods == null) {
43  0 serviceMethods = model.getServiceMethods();
44    }
45  0 return serviceMethods;
46    }
47    private List<XmlType> xmlTypes;
48   
 
49  0 toggle @Override
50    public List<XmlType> getXmlTypes() {
51  0 if (xmlTypes == null) {
52  0 xmlTypes = model.getXmlTypes();
53    }
54  0 return xmlTypes;
55    }
56    private List<MessageStructure> messageStructures = null;
57   
 
58  0 toggle @Override
59    public List<MessageStructure> getMessageStructures() {
60  0 if (messageStructures == null) {
61  0 messageStructures = model.getMessageStructures();
62    }
63  0 return messageStructures;
64    }
65    private List<Service> services = null;
66   
 
67  0 toggle @Override
68    public List<Service> getServices() {
69  0 if (services == null) {
70  0 services = model.getServices();
71    }
72  0 return services;
73    }
74   
 
75  0 toggle @Override
76    public List<String> getSourceNames() {
77  0 return model.getSourceNames();
78    }
79    }