001/* 002 * Copyright 2006 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 */ 016package org.kuali.ole.gl.businessobject; 017 018/** 019 * A class to encapsulate statistics generated during a demerger 020 */ 021public class DemergerReportData { 022 /** 023 * Constructs a DemergerReportData instance 024 */ 025 public DemergerReportData() { 026 } 027 028 private int errorTransactionsRead = 0; 029 private int validTransactionsRead = 0; 030 private int errorTransactionsSaved = 0; 031 private int validTransactionsSaved = 0; 032 private int offsetTransactionsBypassed = 0; 033 private int capitalizationTransactionsBypassed = 0; 034 private int liabilityTransactionsBypassed = 0; 035 private int transferTransactionsBypassed = 0; 036 private int costShareTransactionsBypassed = 0; 037 private int costShareEncumbranceTransactionsBypassed = 0; 038 039 /** 040 * Adds the values from the parameter report data into this object. 041 * 042 * @param anotherReport more demerger report data to add to the current demerger report data 043 */ 044 public void incorporateReportData(DemergerReportData anotherReport) { 045 errorTransactionsRead += anotherReport.errorTransactionsRead; 046 validTransactionsRead += anotherReport.validTransactionsRead; 047 errorTransactionsSaved += anotherReport.errorTransactionsSaved; 048 validTransactionsSaved += anotherReport.validTransactionsSaved; 049 offsetTransactionsBypassed += anotherReport.offsetTransactionsBypassed; 050 capitalizationTransactionsBypassed += anotherReport.capitalizationTransactionsBypassed; 051 liabilityTransactionsBypassed += anotherReport.liabilityTransactionsBypassed; 052 transferTransactionsBypassed += anotherReport.transferTransactionsBypassed; 053 costShareTransactionsBypassed += anotherReport.costShareTransactionsBypassed; 054 costShareEncumbranceTransactionsBypassed += anotherReport.costShareEncumbranceTransactionsBypassed; 055 } 056 057 /** 058 * Increments the count of error transactions read by 1 059 */ 060 public void incrementErrorTransactionsRead() { 061 errorTransactionsRead++; 062 } 063 064 /** 065 * Increments the count of valid transactions read by 1 066 */ 067 public void incrementValidTransactionsRead() { 068 validTransactionsRead++; 069 } 070 071 /** 072 * Increments the count of error transactions written by 1 073 */ 074 public void incrementErrorTransactionsSaved() { 075 errorTransactionsSaved++; 076 } 077 078 /** 079 * Increments the count of valid transactions saved by 1 080 */ 081 public void incrementValidTransactionsSaved() { 082 validTransactionsSaved++; 083 } 084 085 /** 086 * Increments the count of offset transactions bypassed by 1 087 */ 088 public void incrementOffsetTransactionsBypassed() { 089 offsetTransactionsBypassed++; 090 } 091 092 /** 093 * Increments the count of capitalization transactions bypassed by 1 094 */ 095 public void incrementCapitalizationTransactionsBypassed() { 096 capitalizationTransactionsBypassed++; 097 } 098 099 /** 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}