001: /*
002: * Copyright 2006-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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.module.gl.service.impl.scrubber;
017:
018: /**
019: * A class to encapsulate statistics generated during a demerger
020: */
021: public class DemergerReportData {
022: /**
023: * Constructs a DemergerReportData instance
024: */
025: public DemergerReportData() {
026: }
027:
028: private int errorTransactionsRead = 0;
029: private int errorTransactionsSaved = 0;
030: private int validTransactionsSaved = 0;
031: private int offsetTransactionsBypassed = 0;
032: private int capitalizationTransactionsBypassed = 0;
033: private int liabilityTransactionsBypassed = 0;
034: private int transferTransactionsBypassed = 0;
035: private int costShareTransactionsBypassed = 0;
036: private int costShareEncumbranceTransactionsBypassed = 0;
037:
038: /**
039: * Adds the values from the parameter report data into this object.
040: *
041: * @param anotherReport more demerger report data to add to the current demerger report data
042: */
043: public void incorporateReportData(DemergerReportData anotherReport) {
044: errorTransactionsRead += anotherReport.errorTransactionsRead;
045: errorTransactionsSaved += anotherReport.errorTransactionsSaved;
046: validTransactionsSaved += anotherReport.validTransactionsSaved;
047: offsetTransactionsBypassed += anotherReport.offsetTransactionsBypassed;
048: capitalizationTransactionsBypassed += anotherReport.capitalizationTransactionsBypassed;
049: liabilityTransactionsBypassed += anotherReport.liabilityTransactionsBypassed;
050: transferTransactionsBypassed += anotherReport.transferTransactionsBypassed;
051: costShareTransactionsBypassed += anotherReport.costShareTransactionsBypassed;
052: costShareEncumbranceTransactionsBypassed += anotherReport.costShareEncumbranceTransactionsBypassed;
053: }
054:
055: /**
056: * Increments the count of cost share encumbrance transactions read by 1
057: */
058: public void incrementErrorTransactionsRead() {
059: errorTransactionsRead++;
060: }
061:
062: /**
063: * Increments the count of error transactions written by 1
064: */
065: public void incrementErrorTransactionsSaved() {
066: errorTransactionsSaved++;
067: }
068:
069: /**
070: * Increments the count of valid transactions saved by 1
071: */
072: public void incrementValidTransactionsSaved() {
073: validTransactionsSaved++;
074: }
075:
076: /**
077: * Increments the count of offset transactions bypassed by 1
078: */
079: public void incrementOffsetTransactionsBypassed() {
080: offsetTransactionsBypassed++;
081: }
082:
083: /**
084: * Increments the count of capitalization transactions bypassed by 1
085: */
086: public void incrementCapitalizationTransactionsBypassed() {
087: capitalizationTransactionsBypassed++;
088: }
089:
090: /**
091: * Increments the count of liability transactions bypassed by 1
092: */
093: public void incrementLiabilityTransactionsBypassed() {
094: liabilityTransactionsBypassed++;
095: }
096:
097: /**
098: * Increments the count of transfer transactions bypassed by 1
099: */
100: public void incrementTransferTransactionsBypassed() {
101: transferTransactionsBypassed++;
102: }
103:
104: /**
105: * Increments the count of cost share transactions bypassed by 1
106: */
107: public void incrementCostShareTransactionsBypassed() {
108: costShareTransactionsBypassed++;
109: }
110:
111: /**
112: * Increments the count of cost share encumbrance transactions bypassed by 1
113: */
114: public void incrementCostShareEncumbranceTransactionsBypassed() {
115: costShareEncumbranceTransactionsBypassed++;
116: }
117:
118: /**
119: * Returns the count of capitalization transactions bypassed
120: *
121: * @return the count of capitalization transactions bypassed
122: */
123: public int getCapitalizationTransactionsBypassed() {
124: return capitalizationTransactionsBypassed;
125: }
126:
127: /**
128: * Returns the count of cost share encumbranace transactions bypassed
129: *
130: * @return the count of cost share encumbranace transactions bypassed
131: */
132: public int getCostShareEncumbranceTransactionsBypassed() {
133: return costShareEncumbranceTransactionsBypassed;
134: }
135:
136: /**
137: * Returns the count of cost share transactions bypassed
138: *
139: * @return the count of cost share transactions bypassed
140: */
141: public int getCostShareTransactionsBypassed() {
142: return costShareTransactionsBypassed;
143: }
144:
145: /**
146: * Returns the count of error transactions read
147: *
148: * @return the count of error transactions read
149: */
150: public int getErrorTransactionsRead() {
151: return errorTransactionsRead;
152: }
153:
154: /**
155: * Returns the count of error transactions saved
156: *
157: * @return the count of error transactions saved
158: */
159: public int getErrorTransactionsSaved() {
160: return errorTransactionsSaved;
161: }
162:
163: /**
164: * Returns the count of liability transactions bypassed
165: *
166: * @return the count of liability transactions bypassed
167: */
168: public int getLiabilityTransactionsBypassed() {
169: return liabilityTransactionsBypassed;
170: }
171:
172: /**
173: * Returns the count of offset transactions bypassed
174: *
175: * @return the count of offset transactions bypassed
176: */
177: public int getOffsetTransactionsBypassed() {
178: return offsetTransactionsBypassed;
179: }
180:
181: /**
182: * Returns the count of transfer transactions bypassed
183: *
184: * @return the count of transfer transactions bypassed
185: */
186: public int getTransferTransactionsBypassed() {
187: return transferTransactionsBypassed;
188: }
189:
190: /**
191: * Returns the count of valid transactions saved
192: *
193: * @return the count of valid transactions saved
194: */
195: public int getValidTransactionsSaved() {
196: return validTransactionsSaved;
197: }
198:
199: /**
200: * Resets the number of error transactions read to the given amount
201: *
202: * @param x the count of error transactions read to reset to
203: */
204: public void setErrorTransactionsRead(int x) {
205: this .errorTransactionsRead = x;
206: }
207:
208: /**
209: * Resets the number of error transactions written to the given amount
210: *
211: * @param x the count of error transactions written to reset to
212: */
213: public void setErrorTransactionWritten(int x) {
214: this .errorTransactionsSaved = x;
215: }
216:
217: /**
218: * Sets the validTransactionsSaved attribute value.
219: *
220: * @param validTransactionsSaved The validTransactionsSaved to set.
221: */
222: public void setValidTransactionsSaved(int validTransactionsSaved) {
223: this.validTransactionsSaved = validTransactionsSaved;
224: }
225: }
|