View Javadoc
1   /*
2    * Copyright 2007-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  
17  package org.kuali.ole.module.purap.document.service;
18  
19  import org.kuali.ole.module.purap.businessobject.ReceivingAddress;
20  
21  import java.util.Collection;
22  
23  public interface ReceivingAddressService {
24  
25      /**
26       * Finds all of the active receiving addresses with the specified chart/org code.
27       *
28       * @param chartCode - chart of accounts code.
29       * @param orgCode   - organization code.
30       * @return - collection of receiving addresses found.
31       */
32      public Collection<ReceivingAddress> findActiveByChartOrg(String chartCode, String orgCode);
33  
34      /**
35       * Finds all of the active default receiving addresses with the specified chart/org code.
36       * When the database is not in consistent state, there could be more than one active default address per chart/org.
37       *
38       * @param chartCode - chart of accounts code.
39       * @param orgCode   - organization code.
40       * @return - collection of receiving addresses found.
41       */
42      public Collection<ReceivingAddress> findDefaultByChartOrg(String chartCode, String orgCode);
43  
44      /**
45       * Finds the unique active default receiving addresses with the specified chart/org code.
46       * When the database is in consistent state, there shall be no more than one active default address per chart/org.
47       *
48       * @param chartCode - chart of accounts code.
49       * @param orgCode   - organization code.
50       * @return - receiving addresses found.
51       */
52      public ReceivingAddress findUniqueDefaultByChartOrg(String chartCode, String orgCode);
53  
54      /**
55       * Counts the number of the active receiving addresses with the specified chart/org code.
56       *
57       * @param chartCode - chart of accounts code.
58       * @param orgCode   - organization code.
59       * @return - number of receiving addresses found.
60       */
61      public int countActiveByChartOrg(String chartCode, String orgCode);
62  
63  }
64