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.businessobject;
17  
18  /**
19   * A class to encapsulate statistics generated during a demerger
20   */
21  public class DemergerReportData {
22      /**
23       * Constructs a DemergerReportData instance
24       */
25      public DemergerReportData() {
26      }
27  
28      private int errorTransactionsRead = 0;
29      private int validTransactionsRead = 0;
30      private int errorTransactionsSaved = 0;
31      private int validTransactionsSaved = 0;
32      private int offsetTransactionsBypassed = 0;
33      private int capitalizationTransactionsBypassed = 0;
34      private int liabilityTransactionsBypassed = 0;
35      private int transferTransactionsBypassed = 0;
36      private int costShareTransactionsBypassed = 0;
37      private int costShareEncumbranceTransactionsBypassed = 0;
38  
39      /**
40       * Adds the values from the parameter report data into this object.
41       * 
42       * @param anotherReport more demerger report data to add to the current demerger report data
43       */
44      public void incorporateReportData(DemergerReportData anotherReport) {
45          errorTransactionsRead += anotherReport.errorTransactionsRead;
46          validTransactionsRead += anotherReport.validTransactionsRead;
47          errorTransactionsSaved += anotherReport.errorTransactionsSaved;
48          validTransactionsSaved += anotherReport.validTransactionsSaved;
49          offsetTransactionsBypassed += anotherReport.offsetTransactionsBypassed;
50          capitalizationTransactionsBypassed += anotherReport.capitalizationTransactionsBypassed;
51          liabilityTransactionsBypassed += anotherReport.liabilityTransactionsBypassed;
52          transferTransactionsBypassed += anotherReport.transferTransactionsBypassed;
53          costShareTransactionsBypassed += anotherReport.costShareTransactionsBypassed;
54          costShareEncumbranceTransactionsBypassed += anotherReport.costShareEncumbranceTransactionsBypassed;
55      }
56  
57      /**
58       * Increments the count of error transactions read by 1
59       */
60      public void incrementErrorTransactionsRead() {
61          errorTransactionsRead++;
62      }
63  
64      /**
65       * Increments the count of valid transactions read by 1
66       */
67      public void incrementValidTransactionsRead() {
68          validTransactionsRead++;
69      }
70      
71      /**
72       * Increments the count of error transactions written by 1
73       */
74      public void incrementErrorTransactionsSaved() {
75          errorTransactionsSaved++;
76      }
77  
78      /**
79       * Increments the count of valid transactions saved by 1
80       */
81      public void incrementValidTransactionsSaved() {
82          validTransactionsSaved++;
83      }
84  
85      /**
86       * Increments the count of offset transactions bypassed by 1
87       */
88      public void incrementOffsetTransactionsBypassed() {
89          offsetTransactionsBypassed++;
90      }
91  
92      /**
93       * Increments the count of capitalization transactions bypassed by 1
94       */
95      public void incrementCapitalizationTransactionsBypassed() {
96          capitalizationTransactionsBypassed++;
97      }
98  
99      /**
100      * Increments the count of liability transactions bypassed by 1
101      */
102     public void incrementLiabilityTransactionsBypassed() {
103         liabilityTransactionsBypassed++;
104     }
105 
106     /**
107      * Increments the count of transfer transactions bypassed by 1
108      */
109     public void incrementTransferTransactionsBypassed() {
110         transferTransactionsBypassed++;
111     }
112 
113     /**
114      * Increments the count of cost share transactions bypassed by 1
115      */
116     public void incrementCostShareTransactionsBypassed() {
117         costShareTransactionsBypassed++;
118     }
119 
120     /**
121      * Increments the count of cost share encumbrance transactions bypassed by 1
122      */
123     public void incrementCostShareEncumbranceTransactionsBypassed() {
124         costShareEncumbranceTransactionsBypassed++;
125     }
126 
127     /**
128      * Returns the count of capitalization transactions bypassed
129      * 
130      * @return the count of capitalization transactions bypassed
131      */
132     public int getCapitalizationTransactionsBypassed() {
133         return capitalizationTransactionsBypassed;
134     }
135 
136     /**
137      * Returns the count of cost share encumbranace transactions bypassed
138      * 
139      * @return the count of cost share encumbranace transactions bypassed
140      */
141     public int getCostShareEncumbranceTransactionsBypassed() {
142         return costShareEncumbranceTransactionsBypassed;
143     }
144 
145     /**
146      * Returns the count of cost share transactions bypassed
147      * 
148      * @return the count of cost share transactions bypassed
149      */
150     public int getCostShareTransactionsBypassed() {
151         return costShareTransactionsBypassed;
152     }
153 
154     /**
155      * Returns the count of error transactions read
156      * 
157      * @return the count of error transactions read
158      */
159     public int getErrorTransactionsRead() {
160         return errorTransactionsRead;
161     }
162 
163     /**
164      * Returns the count of error transactions saved
165      * 
166      * @return the count of error transactions saved
167      */
168     public int getErrorTransactionsSaved() {
169         return errorTransactionsSaved;
170     }
171 
172     /**
173      * Returns the count of liability transactions bypassed
174      * 
175      * @return the count of liability transactions bypassed
176      */
177     public int getLiabilityTransactionsBypassed() {
178         return liabilityTransactionsBypassed;
179     }
180 
181     /**
182      * Returns the count of offset transactions bypassed
183      * 
184      * @return the count of offset transactions bypassed
185      */
186     public int getOffsetTransactionsBypassed() {
187         return offsetTransactionsBypassed;
188     }
189 
190     /**
191      * Returns the count of transfer transactions bypassed
192      * 
193      * @return the count of transfer transactions bypassed
194      */
195     public int getTransferTransactionsBypassed() {
196         return transferTransactionsBypassed;
197     }
198 
199     /**
200      * Returns the count of valid transactions saved
201      * 
202      * @return the count of valid transactions saved
203      */
204     public int getValidTransactionsSaved() {
205         return validTransactionsSaved;
206     }
207 
208     /**
209      * Resets the number of error transactions read to the given amount
210      * 
211      * @param x the count of error transactions read to reset to
212      */
213     public void setErrorTransactionsRead(int x) {
214         this.errorTransactionsRead = x;
215     }
216 
217     /**
218      * Resets the number of error transactions written to the given amount
219      * 
220      * @param x the count of error transactions written to reset to
221      */
222     public void setErrorTransactionWritten(int x) {
223         this.errorTransactionsSaved = x;
224     }
225 
226     /**
227      * Sets the validTransactionsSaved attribute value.
228      * 
229      * @param validTransactionsSaved The validTransactionsSaved to set.
230      */
231     public void setValidTransactionsSaved(int validTransactionsSaved) {
232         this.validTransactionsSaved = validTransactionsSaved;
233     }
234     
235     /**
236      * Returns the count of valid transactions read
237      * 
238      * @return the count of valid transactions read
239      */
240     public int getValidTransactionsRead() {
241         return validTransactionsRead;
242     }
243     
244     /**
245      * Resets the number of valid transactions read to the given amount
246      * 
247      * @param x the count of valid transactions read to reset to
248      */
249     public void setValidTransactionsRead(int x) {
250         this.validTransactionsRead = x;
251     }
252 }