001: /*
002: * Copyright 2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.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/ecl1.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: */
016: package org.kuali.module.gl.service;
017:
018: import org.kuali.core.bo.DocumentType;
019: import org.kuali.kfs.bo.Options;
020: import org.kuali.kfs.bo.OriginationCode;
021: import org.kuali.module.chart.bo.A21SubAccount;
022: import org.kuali.module.chart.bo.Account;
023: import org.kuali.module.chart.bo.AccountingPeriod;
024: import org.kuali.module.chart.bo.Chart;
025: import org.kuali.module.chart.bo.ObjectCode;
026: import org.kuali.module.chart.bo.ObjectType;
027: import org.kuali.module.chart.bo.ProjectCode;
028: import org.kuali.module.chart.bo.SubAccount;
029: import org.kuali.module.chart.bo.SubObjCd;
030: import org.kuali.module.chart.bo.codes.BalanceTyp;
031: import org.kuali.module.gl.bo.OriginEntry;
032: import org.kuali.module.gl.util.CachingLookup;
033:
034: /**
035: * An interface of methods that duplicate the relationships that OriginEntryFull has.
036: * Why does this exist? Because OriginEntryLite needs a way to get its related data.
037: */
038: public interface OriginEntryLookupService {
039: /**
040: * Retrieve a chart for the given origin entry
041: *
042: * @param entry the origin entry to get the chart for
043: * @return the related Chart record, or null if not found
044: */
045: public Chart getChart(OriginEntry entry);
046:
047: /**
048: * Retrieve account for given origin entry
049: *
050: * @param entry the origin entry to retrieve the account of
051: * @return the related account record, or null if not found
052: */
053: public Account getAccount(OriginEntry entry);
054:
055: /**
056: * Retrieve financial object for given origin entry
057: *
058: * @param entry the origin entry to retrieve the financial object of
059: * @return the related financial object record, or null if not found
060: */
061: public ObjectCode getFinancialObject(OriginEntry entry);
062:
063: /**
064: * Retrieve balance type, or, evidently, balance typ, for given origin entry
065: *
066: * @param entry the origin entry to retrieve the balance type of
067: * @return the related balance typ record, or null if not found
068: */
069: public BalanceTyp getBalanceType(OriginEntry entry);
070:
071: /**
072: * Retrieve option for given origin entry
073: *
074: * @param entry the origin entry to retrieve the related options record of
075: * @return the related Options record, or null if not found
076: */
077: public Options getOption(OriginEntry entry);
078:
079: /**
080: * Get object type for given origin entry
081: *
082: * @param entry the origin entry to retrieve the object type of
083: * @return the related object type record, or null if not found
084: */
085: public ObjectType getObjectType(OriginEntry entry);
086:
087: /**
088: * Get sub account for given origin entry
089: *
090: * @param entry the origin entry to retrieve the sub account of
091: * @return the related SubAccount record, or null if not found
092: */
093: public SubAccount getSubAccount(OriginEntry entry);
094:
095: /**
096: * Get A21SubAccount for given origin entryable
097: *
098: * @param entry the origin entry to retrieve the A21 sub account of
099: * @return the related A21 SubAccount record, or null if not found
100: */
101: public A21SubAccount getA21SubAccount(OriginEntry entry);
102:
103: /**
104: * Get financial sub object for given origin entryable
105: *
106: * @param entry the origin entry to retrieve the financial sub object of
107: * @return the related financial sub object record, or null if not found
108: */
109: public SubObjCd getFinancialSubObject(OriginEntry entry);
110:
111: /**
112: * Get document type for given origin entryable
113: *
114: * @param entry the origin entry to retrieve the document type of
115: * @return the related document type record, or null if not found
116: */
117: public DocumentType getDocumentType(OriginEntry entry);
118:
119: /**
120: * Get the reference document type for the given origin entryable
121: *
122: * @param entry origin entryable to lookup the reference document type for
123: * @return the related reference DocumentType record, or null if not found
124: */
125: public DocumentType getReferenceDocumentType(OriginEntry entry);
126:
127: /**
128: * Retrieves the project code for the given origin entryable
129: *
130: * @param entry the origin entry to retrieve the project code of
131: * @return the related ProjectCode record, or null if not found
132: */
133: public ProjectCode getProjectCode(OriginEntry entry);
134:
135: /**
136: * Retrieves the accounting period for the given origin entryable
137: *
138: * @param entry the origin entry to retrieve the accounting period of
139: * @return the related AccountingPeriod record, or null if not found
140: */
141: public AccountingPeriod getAccountingPeriod(OriginEntry entry);
142:
143: /**
144: * Retrieves the origination code for the given origin entryable
145: *
146: * @param entry the origin entry to retrieve the origin code of
147: * @return the related OriginationCode record, or null if not found
148: */
149: public OriginationCode getOriginationCode(OriginEntry entry);
150:
151: /**
152: * Set the caching lookup for this lookup service
153: *
154: * @param lookupService an instance of CachingLookup to use to communicated with the persistence store
155: */
156: public void setLookupService(CachingLookup lookupService);
157: }
|