001    /*
002     * Copyright 2011 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     */
016    package org.kuali.kfs.module.cab.businessobject;
017    
018    import java.util.LinkedHashMap;
019    
020    import org.kuali.kfs.module.cab.CabConstants;
021    import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
022    import org.kuali.rice.kns.util.KualiDecimal;
023    
024    /**
025     * @author Kuali Nervous System Team (kualidev@oncourse.iu.edu)
026     */
027    public class PurchasingAccountsPayableActionHistory extends PersistableBusinessObjectBase {
028    
029        private Long actionIdentifier;
030        private String actionTypeCode;
031        private String fromDocumentNumber;
032        private Integer fromPurApLineItemIdentifier;
033        private Integer fromCabLineNumber;
034        private String toDocumentNumber;
035        private Integer toPurApLineItemIdentifier;
036        private Integer toCabLineNumber;
037        private Long generalLedgerAccountIdentifier;
038        private KualiDecimal itemAccountTotalAmount;
039        private KualiDecimal accountsPayableItemQuantity;
040        private boolean active;
041    
042        public PurchasingAccountsPayableActionHistory() {
043            
044        }
045        
046        public PurchasingAccountsPayableActionHistory(PurchasingAccountsPayableItemAsset fromItem, PurchasingAccountsPayableItemAsset toItem, String actionType) {
047            this.actionTypeCode = actionType;
048            this.fromDocumentNumber = fromItem.getDocumentNumber();
049            this.fromPurApLineItemIdentifier = fromItem.getAccountsPayableLineItemIdentifier();
050            this.fromCabLineNumber = fromItem.getCapitalAssetBuilderLineNumber();
051            if (toItem != null) {
052                this.toDocumentNumber = toItem.getDocumentNumber();
053                this.toPurApLineItemIdentifier = toItem.getAccountsPayableLineItemIdentifier();
054                this.toCabLineNumber = toItem.getCapitalAssetBuilderLineNumber();
055            }
056            this.active = true;
057        }
058    
059        
060        /**
061         * Gets the actionIdentifier attribute.
062         * 
063         * @return Returns the actionIdentifier.
064         */
065        public Long getActionIdentifier() {
066            return actionIdentifier;
067        }
068    
069    
070        /**
071         * Sets the actionIdentifier attribute value.
072         * 
073         * @param actionIdentifier The actionIdentifier to set.
074         */
075        public void setActionIdentifier(Long actionIdentifier) {
076            this.actionIdentifier = actionIdentifier;
077        }
078    
079    
080        /**
081         * Gets the actionTypeCode attribute.
082         * 
083         * @return Returns the actionTypeCode.
084         */
085        public String getActionTypeCode() {
086            return actionTypeCode;
087        }
088    
089    
090        /**
091         * Sets the actionTypeCode attribute value.
092         * 
093         * @param actionTypeCode The actionTypeCode to set.
094         */
095        public void setActionTypeCode(String actionTypeCode) {
096            this.actionTypeCode = actionTypeCode;
097        }
098    
099    
100        /**
101         * Gets the fromDocumentNumber attribute.
102         * 
103         * @return Returns the fromDocumentNumber.
104         */
105        public String getFromDocumentNumber() {
106            return fromDocumentNumber;
107        }
108    
109    
110        /**
111         * Sets the fromDocumentNumber attribute value.
112         * 
113         * @param fromDocumentNumber The fromDocumentNumber to set.
114         */
115        public void setFromDocumentNumber(String fromDocumentNumber) {
116            this.fromDocumentNumber = fromDocumentNumber;
117        }
118    
119    
120        /**
121         * Gets the fromPurApLineItemIdentifier attribute.
122         * 
123         * @return Returns the fromPurApLineItemIdentifier.
124         */
125        public Integer getFromPurApLineItemIdentifier() {
126            return fromPurApLineItemIdentifier;
127        }
128    
129    
130        /**
131         * Sets the fromPurApLineItemIdentifier attribute value.
132         * 
133         * @param fromPurApLineItemIdentifier The fromPurApLineItemIdentifier to set.
134         */
135        public void setFromPurApLineItemIdentifier(Integer fromPurApLineItemIdentifier) {
136            this.fromPurApLineItemIdentifier = fromPurApLineItemIdentifier;
137        }
138    
139    
140        /**
141         * Gets the fromCabLineNumber attribute.
142         * 
143         * @return Returns the fromCabLineNumber.
144         */
145        public Integer getFromCabLineNumber() {
146            return fromCabLineNumber;
147        }
148    
149    
150        /**
151         * Sets the fromCabLineNumber attribute value.
152         * 
153         * @param fromCabLineNumber The fromCabLineNumber to set.
154         */
155        public void setFromCabLineNumber(Integer fromCabLineNumber) {
156            this.fromCabLineNumber = fromCabLineNumber;
157        }
158    
159    
160        /**
161         * Gets the toDocumentNumber attribute.
162         * 
163         * @return Returns the toDocumentNumber.
164         */
165        public String getToDocumentNumber() {
166            return toDocumentNumber;
167        }
168    
169    
170        /**
171         * Sets the toDocumentNumber attribute value.
172         * 
173         * @param toDocumentNumber The toDocumentNumber to set.
174         */
175        public void setToDocumentNumber(String toDocumentNumber) {
176            this.toDocumentNumber = toDocumentNumber;
177        }
178    
179    
180        /**
181         * Gets the toPurApLineItemIdentifier attribute.
182         * 
183         * @return Returns the toPurApLineItemIdentifier.
184         */
185        public Integer getToPurApLineItemIdentifier() {
186            return toPurApLineItemIdentifier;
187        }
188    
189    
190        /**
191         * Sets the toPurApLineItemIdentifier attribute value.
192         * 
193         * @param toPurApLineItemIdentifier The toPurApLineItemIdentifier to set.
194         */
195        public void setToPurApLineItemIdentifier(Integer toPurApLineItemIdentifier) {
196            this.toPurApLineItemIdentifier = toPurApLineItemIdentifier;
197        }
198    
199    
200        /**
201         * Gets the toCabLineNumber attribute.
202         * 
203         * @return Returns the toCabLineNumber.
204         */
205        public Integer getToCabLineNumber() {
206            return toCabLineNumber;
207        }
208    
209    
210        /**
211         * Sets the toCabLineNumber attribute value.
212         * 
213         * @param toCabLineNumber The toCabLineNumber to set.
214         */
215        public void setToCabLineNumber(Integer toCabLineNumber) {
216            this.toCabLineNumber = toCabLineNumber;
217        }
218    
219    
220        /**
221         * Gets the generalLedgerAccountIdentifier attribute.
222         * 
223         * @return Returns the generalLedgerAccountIdentifier.
224         */
225        public Long getGeneralLedgerAccountIdentifier() {
226            return generalLedgerAccountIdentifier;
227        }
228    
229    
230        /**
231         * Sets the generalLedgerAccountIdentifier attribute value.
232         * 
233         * @param generalLedgerAccountIdentifier The generalLedgerAccountIdentifier to set.
234         */
235        public void setGeneralLedgerAccountIdentifier(Long generalLedgerAccountIdentifier) {
236            this.generalLedgerAccountIdentifier = generalLedgerAccountIdentifier;
237        }
238    
239    
240        /**
241         * Gets the itemAccountTotalAmount attribute.
242         * 
243         * @return Returns the itemAccountTotalAmount.
244         */
245        public KualiDecimal getItemAccountTotalAmount() {
246            return itemAccountTotalAmount;
247        }
248    
249    
250        /**
251         * Sets the itemAccountTotalAmount attribute value.
252         * 
253         * @param itemAccountTotalAmount The itemAccountTotalAmount to set.
254         */
255        public void setItemAccountTotalAmount(KualiDecimal itemAccountTotalAmount) {
256            this.itemAccountTotalAmount = itemAccountTotalAmount;
257        }
258    
259    
260        /**
261         * Gets the accountsPayableItemQuantity attribute.
262         * 
263         * @return Returns the accountsPayableItemQuantity.
264         */
265        public KualiDecimal getAccountsPayableItemQuantity() {
266            return accountsPayableItemQuantity;
267        }
268    
269    
270        /**
271         * Sets the accountsPayableItemQuantity attribute value.
272         * 
273         * @param accountsPayableItemQuantity The accountsPayableItemQuantity to set.
274         */
275        public void setAccountsPayableItemQuantity(KualiDecimal accountsPayableItemQuantity) {
276            this.accountsPayableItemQuantity = accountsPayableItemQuantity;
277        }
278    
279    
280        /**
281         * Gets the active attribute.
282         * 
283         * @return Returns the active.
284         */
285        public boolean isActive() {
286            return active;
287        }
288    
289    
290        /**
291         * Sets the active attribute value.
292         * 
293         * @param active The active to set.
294         */
295        public void setActive(boolean active) {
296            this.active = active;
297        }
298    
299    
300        /**
301         * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
302         */
303        protected LinkedHashMap toStringMapper() {
304            LinkedHashMap m = new LinkedHashMap();
305            m.put("actionIdentifier", this.actionIdentifier);
306            return m;
307        }
308    
309    }