001 /*
002 * Copyright 2011 The Kuali Foundation.
003 *
004 * Licensed under the Educational Community License, Version 2.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/ecl2.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 */
016 package org.kuali.kfs.gl.service;
017
018 /**
019 * A class which encapsulates statistics about a scrubber run
020 */
021 public class ScrubberReportData {
022 /**
023 * Constructs a ScrubberReportData instance
024 */
025 public ScrubberReportData() {
026 }
027
028 private int numberOfUnscrubbedRecordsRead = 0;
029 private int numberOfScrubbedRecordsWritten = 0;
030 private int numberOfErrorRecordsWritten = 0;
031 private int numberOfOffsetEntriesGenerated = 0;
032 private int numberOfCapitalizationEntriesGenerated = 0;
033 private int numberOfLiabilityEntriesGenerated = 0;
034 private int numberOfPlantIndebtednessEntriesGenerated = 0;
035 private int numberOfCostShareEntriesGenerated = 0;
036 private int numberOfCostShareEncumbrancesGenerated = 0;
037 private int numberOfExpiredAccountsFound = 0;
038
039 /**
040 * Adds the values from the parameter report data into this object.
041 *
042 * @param anotherReport another set of scrubber report data to add to this scrubber report data
043 */
044 public void incorporateReportData(ScrubberReportData anotherReport) {
045 numberOfUnscrubbedRecordsRead += anotherReport.numberOfUnscrubbedRecordsRead;
046 numberOfScrubbedRecordsWritten += anotherReport.numberOfScrubbedRecordsWritten;
047 numberOfErrorRecordsWritten += anotherReport.numberOfErrorRecordsWritten;
048 numberOfOffsetEntriesGenerated += anotherReport.numberOfOffsetEntriesGenerated;
049 numberOfCapitalizationEntriesGenerated += anotherReport.numberOfCapitalizationEntriesGenerated;
050 numberOfLiabilityEntriesGenerated += anotherReport.numberOfLiabilityEntriesGenerated;
051 numberOfPlantIndebtednessEntriesGenerated += anotherReport.numberOfPlantIndebtednessEntriesGenerated;
052 numberOfCostShareEntriesGenerated += anotherReport.numberOfCostShareEntriesGenerated;
053 numberOfCostShareEncumbrancesGenerated += anotherReport.numberOfCostShareEncumbrancesGenerated;
054 numberOfExpiredAccountsFound += anotherReport.numberOfExpiredAccountsFound;
055 }
056
057 /**
058 * Increments the error records written count by 1
059 */
060 public void incrementErrorRecordWritten() {
061 numberOfErrorRecordsWritten++;
062 }
063
064 /**
065 * Increments the expired account found count by 1
066 */
067 public void incrementExpiredAccountFound() {
068 numberOfExpiredAccountsFound++;
069 }
070
071 /**
072 * Increments the scrubbed records written count by 1
073 */
074 public void incrementScrubbedRecordWritten() {
075 numberOfScrubbedRecordsWritten++;
076 }
077
078 /**
079 * Increments the offset entry generated count by 1
080 */
081 public void incrementOffsetEntryGenerated() {
082 numberOfOffsetEntriesGenerated++;
083 }
084
085 /**
086 * Increments the capitalization entry generated count by 1
087 */
088 public void incrementCapitalizationEntryGenerated() {
089 numberOfCapitalizationEntriesGenerated++;
090 }
091
092 /**
093 * Increments the liability entry generated count by 1
094 */
095 public void incrementLiabilityEntryGenerated() {
096 numberOfLiabilityEntriesGenerated++;
097 }
098
099 /**
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 }