1 /*
2 * Copyright 2007 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.module.purap.businessobject;
17
18 import org.kuali.ole.sys.businessobject.AccountingLine;
19 import org.kuali.ole.sys.businessobject.SourceAccountingLine;
20 import org.kuali.rice.core.api.util.type.KualiDecimal;
21
22 import java.math.BigDecimal;
23
24 /**
25 * Purap Accounting Line Interface.
26 */
27 public interface PurApAccountingLine extends AccountingLine {
28
29 public abstract Integer getAccountIdentifier();
30
31 public abstract void setAccountIdentifier(Integer accountIdentifier);
32
33 public abstract Integer getItemIdentifier();
34
35 public abstract void setItemIdentifier(Integer itemIdentifier);
36
37 public abstract BigDecimal getAccountLinePercent();
38
39 public abstract void setAccountLinePercent(BigDecimal accountLinePercent);
40
41 public abstract Integer getSequenceNumber();
42
43 public abstract void setSequenceNumber(Integer sequenceNumber);
44
45 public abstract Integer getPurApSequenceNumber();
46
47 /**
48 * Determines if the current purap accounting line is in an empty state.
49 *
50 * @return boolean - true if empty state
51 */
52 public abstract boolean isEmpty();
53
54 /**
55 * Creates a copy of the current purap accounting line and sets the percentage and the amount to zero.
56 *
57 * @return - purap accounting line copy with blank percent and amount
58 */
59 public abstract PurApAccountingLine createBlankAmountsCopy();
60
61 /**
62 * Compares the current accounting line values with a source accounting line to see if both accounting lines are equal.
63 *
64 * @param accountingLine - accounting line to compare
65 * @return boolean - true if passed in and current accounting line are equal, false otherwise
66 */
67 public abstract boolean accountStringsAreEqual(SourceAccountingLine accountingLine);
68
69 /**
70 * Compares the current accounting line values with a purap accounting line to see if both accounting lines are equal.
71 *
72 * @param accountingLine - accounting line to compare
73 * @return boolean - true if passed in and current accounting line are equal, false otherwise
74 */
75 public abstract boolean accountStringsAreEqual(PurApAccountingLine accountingLine);
76
77 /**
78 * Creates a source accounting line from the current purap accounting line.
79 *
80 * @return - source accounting line based on current purap accounting line
81 */
82 public abstract SourceAccountingLine generateSourceAccountingLine();
83
84 public KualiDecimal getAlternateAmountForGLEntryCreation();
85
86 public void setAlternateAmountForGLEntryCreation(KualiDecimal alternateAmountForGLEntryCreation);
87
88 public <T extends PurApItem> T getPurapItem();
89
90 public void setPurapItem(PurApItem item);
91
92 public String getString();
93
94 public String getPostingPeriodCode();
95
96 public void setPostingPeriodCode(String postingPeriodCode);
97
98 }