View Javadoc
1   /*
2    * Copyright 2006 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.ole.gl.service;
17  
18  /**
19   * A class which encapsulates statistics about a scrubber run
20   */
21  public class ScrubberReportData {
22      /**
23       * Constructs a ScrubberReportData instance
24       */
25      public ScrubberReportData() {
26      }
27  
28      private int numberOfUnscrubbedRecordsRead = 0;
29      private int numberOfScrubbedRecordsWritten = 0;
30      private int numberOfErrorRecordsWritten = 0;
31      private int numberOfOffsetEntriesGenerated = 0;
32      private int numberOfCapitalizationEntriesGenerated = 0;
33      private int numberOfLiabilityEntriesGenerated = 0;
34      private int numberOfPlantIndebtednessEntriesGenerated = 0;
35      private int numberOfCostShareEntriesGenerated = 0;
36      private int numberOfCostShareEncumbrancesGenerated = 0;
37      private int numberOfExpiredAccountsFound = 0;
38  
39      /**
40       * Adds the values from the parameter report data into this object.
41       * 
42       * @param anotherReport another set of scrubber report data to add to this scrubber report data
43       */
44      public void incorporateReportData(ScrubberReportData anotherReport) {
45          numberOfUnscrubbedRecordsRead += anotherReport.numberOfUnscrubbedRecordsRead;
46          numberOfScrubbedRecordsWritten += anotherReport.numberOfScrubbedRecordsWritten;
47          numberOfErrorRecordsWritten += anotherReport.numberOfErrorRecordsWritten;
48          numberOfOffsetEntriesGenerated += anotherReport.numberOfOffsetEntriesGenerated;
49          numberOfCapitalizationEntriesGenerated += anotherReport.numberOfCapitalizationEntriesGenerated;
50          numberOfLiabilityEntriesGenerated += anotherReport.numberOfLiabilityEntriesGenerated;
51          numberOfPlantIndebtednessEntriesGenerated += anotherReport.numberOfPlantIndebtednessEntriesGenerated;
52          numberOfCostShareEntriesGenerated += anotherReport.numberOfCostShareEntriesGenerated;
53          numberOfCostShareEncumbrancesGenerated += anotherReport.numberOfCostShareEncumbrancesGenerated;
54          numberOfExpiredAccountsFound += anotherReport.numberOfExpiredAccountsFound;
55      }
56  
57      /**
58       * Increments the error records written count by 1
59       */
60      public void incrementErrorRecordWritten() {
61          numberOfErrorRecordsWritten++;
62      }
63  
64      /**
65       * Increments the expired account found count by 1
66       */
67      public void incrementExpiredAccountFound() {
68          numberOfExpiredAccountsFound++;
69      }
70  
71      /**
72       * Increments the scrubbed records written count by 1
73       */
74      public void incrementScrubbedRecordWritten() {
75          numberOfScrubbedRecordsWritten++;
76      }
77  
78      /**
79       * Increments the offset entry generated count by 1
80       */
81      public void incrementOffsetEntryGenerated() {
82          numberOfOffsetEntriesGenerated++;
83      }
84  
85      /**
86       * Increments the capitalization entry generated count by 1
87       */
88      public void incrementCapitalizationEntryGenerated() {
89          numberOfCapitalizationEntriesGenerated++;
90      }
91  
92      /**
93       * Increments the liability entry generated count by 1
94       */
95      public void incrementLiabilityEntryGenerated() {
96          numberOfLiabilityEntriesGenerated++;
97      }
98  
99      /**
100      * Increments the plant indebtedness entry count by 1
101      */
102     public void incrementPlantIndebtednessEntryGenerated() {
103         numberOfPlantIndebtednessEntriesGenerated++;
104     }
105 
106     /**
107      * Increments the cost share entry generated count by 1
108      */
109     public void incrementCostShareEntryGenerated() {
110         numberOfCostShareEntriesGenerated++;
111     }
112 
113     /**
114      * Increments the cost share encumbranace generated count by 1
115      */
116     public void incrementCostShareEncumbranceGenerated() {
117         numberOfCostShareEncumbrancesGenerated++;
118     }
119 
120     /**
121      * Increments the unscrubbed records read count by 1
122      */
123     public void incrementUnscrubbedRecordsRead() {
124         numberOfUnscrubbedRecordsRead++;
125     }
126 
127     /**
128      * @return Returns the numberOfUnscrubbedRecordsRead.
129      */
130     public int getNumberOfUnscrubbedRecordsRead() {
131         return numberOfUnscrubbedRecordsRead;
132     }
133 
134     /**
135      * @return Returns the numberOfScrubbedRecordsWritten.
136      */
137     public int getNumberOfScrubbedRecordsWritten() {
138         return numberOfScrubbedRecordsWritten;
139     }
140 
141     /**
142      * @return Returns the numberOfErrorRecordsWritten.
143      */
144     public int getNumberOfErrorRecordsWritten() {
145         return numberOfErrorRecordsWritten;
146     }
147 
148     /**
149      * @return Returns the numberOfOffsetEntriesGenerated.
150      */
151     public int getNumberOfOffsetEntriesGenerated() {
152         return numberOfOffsetEntriesGenerated;
153     }
154 
155     /**
156      * @return Returns the numberOfCapitalizationEntriesGenerated.
157      */
158     public int getNumberOfCapitalizationEntriesGenerated() {
159         return numberOfCapitalizationEntriesGenerated;
160     }
161 
162     /**
163      * @return Returns the numberOfLiabilityEntriesGenerated.
164      */
165     public int getNumberOfLiabilityEntriesGenerated() {
166         return numberOfLiabilityEntriesGenerated;
167     }
168 
169     /**
170      * @return Returns the numberOfPlantIndebtednessEntriesGenerated.
171      */
172     public int getNumberOfPlantIndebtednessEntriesGenerated() {
173         return numberOfPlantIndebtednessEntriesGenerated;
174     }
175 
176     /**
177      * @return Returns the numberOfCostShareEntriesGenerated.
178      */
179     public int getNumberOfCostShareEntriesGenerated() {
180         return numberOfCostShareEntriesGenerated;
181     }
182 
183     /**
184      * @return Returns the numberOfCostShareEncumbrancesGenerated.
185      */
186     public int getNumberOfCostShareEncumbrancesGenerated() {
187         return numberOfCostShareEncumbrancesGenerated;
188     }
189 
190     /**
191      * @return Returns the totalNumberOfRecordsWritten.
192      */
193     public int getTotalNumberOfRecordsWritten() {
194         return numberOfScrubbedRecordsWritten + numberOfErrorRecordsWritten + numberOfOffsetEntriesGenerated + numberOfCapitalizationEntriesGenerated + numberOfLiabilityEntriesGenerated + numberOfPlantIndebtednessEntriesGenerated + numberOfCostShareEntriesGenerated + numberOfCostShareEncumbrancesGenerated;
195     }
196 
197     /**
198      * @return Returns the numberOfExpiredAccountsFound.
199      */
200     public int getNumberOfExpiredAccountsFound() {
201         return numberOfExpiredAccountsFound;
202     }
203 
204 }