View Javadoc
1   /*
2    * Copyright 2005-2008 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.sys.businessobject;
17  
18  /**
19   * This class is a helper class which will allows us to pass control in and out of the processGeneralLedgerPendingEntry() method by
20   * reference. This was necessary since you can't increment an Integer object without breaking reference.
21   * 
22   * 
23   */
24  public class GeneralLedgerPendingEntrySequenceHelper {
25      private int sequenceCounter;
26  
27      /**
28       * Constructs a GeneralLedgerPendingEntrySequenceHelper.java, initializing the counter to 1.
29       */
30      public GeneralLedgerPendingEntrySequenceHelper() {
31          this.sequenceCounter = 1;
32      }
33  
34      /**
35       * Constructs a GeneralLedgerPendingEntrySequenceHelper.java, initializing the counter to the given int.
36       */
37      public GeneralLedgerPendingEntrySequenceHelper(int initialCount) {
38          this.sequenceCounter = initialCount;
39      }
40  
41      /**
42       * This method retrieves the value of the sequenceCounter attribute.
43       * 
44       * @return
45       */
46      public int getSequenceCounter() {
47          return sequenceCounter;
48      }
49  
50      /**
51       * This method increments the value of the sequenceCounter attribute.
52       */
53      public void increment() {
54          this.sequenceCounter += 1;
55      }
56  
57      /**
58       * This method decrements the value of the sequenceCounter attribute.
59       */
60      public void decrement() {
61          this.sequenceCounter -= 1;
62      }
63  }