Source Code Cross Referenced for CheckBase.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » financial » bo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » ERP CRM Financial » Kuali Financial System » org.kuali.module.financial.bo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-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.financial.bo;
017:
018:        import java.sql.Date;
019:        import java.util.LinkedHashMap;
020:
021:        import org.apache.commons.lang.StringUtils;
022:        import org.apache.commons.lang.time.DateUtils;
023:        import org.kuali.core.bo.PersistableBusinessObjectBase;
024:        import org.kuali.core.util.KualiDecimal;
025:        import org.kuali.core.util.NumberUtils;
026:
027:        /**
028:         * This class represents a check in the system. It is a generalized check business object that will be used by the Cash Receipts
029:         * document, the Cashier document, etc.
030:         */
031:
032:        public class CheckBase extends PersistableBusinessObjectBase implements 
033:                Check {
034:            private String checkNumber;
035:            private Date checkDate;
036:            private String description;
037:            private Integer sequenceId;
038:            private KualiDecimal amount;
039:            private String documentNumber;
040:            private String financialDocumentTypeCode;
041:            private String cashieringRecordSource;
042:            private Integer financialDocumentDepositLineNumber;
043:
044:            /**
045:             * Constructs a CheckBase business object.
046:             */
047:            public CheckBase() {
048:                super ();
049:                this .sequenceId = new Integer(1);
050:                this .amount = new KualiDecimal(0);
051:            }
052:
053:            /**
054:             * Gets the checkDate attribute.
055:             * 
056:             * @return Returns the checkDate.
057:             */
058:            public Date getCheckDate() {
059:                return checkDate;
060:            }
061:
062:            /**
063:             * Sets the checkDate attribute value.
064:             * 
065:             * @param checkDate The checkDate to set.
066:             */
067:            public void setCheckDate(Date checkDate) {
068:                this .checkDate = checkDate;
069:            }
070:
071:            /**
072:             * Gets the checkNumber attribute.
073:             * 
074:             * @return Returns the checkNumber.
075:             */
076:            public String getCheckNumber() {
077:                return checkNumber;
078:            }
079:
080:            /**
081:             * Sets the checkNumber attribute value.
082:             * 
083:             * @param checkNumber The checkNumber to set.
084:             */
085:            public void setCheckNumber(String checkNumber) {
086:                this .checkNumber = checkNumber;
087:            }
088:
089:            /**
090:             * Gets the description attribute.
091:             * 
092:             * @return Returns the description.
093:             */
094:            public String getDescription() {
095:                return description;
096:            }
097:
098:            /**
099:             * Sets the description attribute value.
100:             * 
101:             * @param description The description to set.
102:             */
103:            public void setDescription(String description) {
104:                this .description = description;
105:            }
106:
107:            /**
108:             * Gets the sequenceId attribute.
109:             * 
110:             * @return Returns the sequenceId.
111:             */
112:            public Integer getSequenceId() {
113:                return sequenceId;
114:            }
115:
116:            /**
117:             * Sets the sequenceId attribute value.
118:             * 
119:             * @param sequenceId The sequenceId to set.
120:             */
121:            public void setSequenceId(Integer sequenceId) {
122:                this .sequenceId = sequenceId;
123:            }
124:
125:            /**
126:             * Gets the amount attribute.
127:             * 
128:             * @return Returns the amount.
129:             */
130:            public KualiDecimal getAmount() {
131:                return amount;
132:            }
133:
134:            /**
135:             * Sets the amount attribute value.
136:             * 
137:             * @param amount The amount to set.
138:             */
139:            public void setAmount(KualiDecimal amount) {
140:                this .amount = amount;
141:            }
142:
143:            /**
144:             * Gets the documentNumber attribute.
145:             * 
146:             * @return Returns the documentNumber.
147:             */
148:            public String getDocumentNumber() {
149:                return documentNumber;
150:            }
151:
152:            /**
153:             * Sets the documentNumber attribute value.
154:             * 
155:             * @param documentNumber The documentNumber to set.
156:             */
157:            public void setDocumentNumber(String documentNumber) {
158:                this .documentNumber = documentNumber;
159:            }
160:
161:            /**
162:             * Gets the cashieringRecordSource attribute.
163:             * 
164:             * @return Returns the cashieringRecordSource.
165:             */
166:            public String getCashieringRecordSource() {
167:                return cashieringRecordSource;
168:            }
169:
170:            /**
171:             * Sets the cashieringRecordSource attribute value.
172:             * 
173:             * @param cashieringRecordSource The cashieringRecordSource to set.
174:             */
175:            public void setCashieringRecordSource(
176:                    String financialDocumentColumnTypeCode) {
177:                this .cashieringRecordSource = financialDocumentColumnTypeCode;
178:            }
179:
180:            /**
181:             * Gets the financialDocumentTypeCode attribute.
182:             * 
183:             * @return Returns the financialDocumentTypeCode.
184:             */
185:            public String getFinancialDocumentTypeCode() {
186:                return financialDocumentTypeCode;
187:            }
188:
189:            /**
190:             * Sets the financialDocumentTypeCode attribute value.
191:             * 
192:             * @param financialDocumentTypeCode The financialDocumentTypeCode to set.
193:             */
194:            public void setFinancialDocumentTypeCode(
195:                    String financialDocumentTypeCode) {
196:                this .financialDocumentTypeCode = financialDocumentTypeCode;
197:            }
198:
199:            /**
200:             * Gets the financialDocumentDepositLineNumber attribute.
201:             * 
202:             * @return Returns the financialDocumentDepositLineNumber.
203:             */
204:            public Integer getFinancialDocumentDepositLineNumber() {
205:                return financialDocumentDepositLineNumber;
206:            }
207:
208:            /**
209:             * Sets the financialDocumentDepositLineNumber attribute value.
210:             * 
211:             * @param financialDocumentDepositLineNumber The financialDocumentDepositLineNumber to set.
212:             */
213:            public void setFinancialDocumentDepositLineNumber(
214:                    Integer financialDocumentDepositLineNumber) {
215:                this .financialDocumentDepositLineNumber = financialDocumentDepositLineNumber;
216:            }
217:
218:            /**
219:             * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
220:             */
221:            protected LinkedHashMap toStringMapper() {
222:                LinkedHashMap m = new LinkedHashMap();
223:
224:                m.put("sequenceId", this .sequenceId);
225:                m.put("checkNumber", this .checkNumber);
226:                m.put("amount", this .amount);
227:                m.put("checkDate", this .checkDate);
228:                m.put("financialDocumentDepositLineNumber",
229:                        this .financialDocumentDepositLineNumber);
230:                m.put("description", this .description);
231:                m.put("documentHeaderId", this .documentNumber);
232:                m.put("financialDocumentTypeCode",
233:                        this .financialDocumentTypeCode);
234:                m.put("cashieringRecordSource", this .cashieringRecordSource);
235:
236:                return m;
237:            }
238:
239:            /**
240:             * @see org.kuali.module.financial.bo.Check#isLike(org.kuali.module.financial.bo.Check)
241:             */
242:            public boolean isLike(Check other) {
243:                boolean like = false;
244:
245:                if (StringUtils.equals(checkNumber, other.getCheckNumber())) {
246:                    if (StringUtils.equals(description, other.getDescription())) {
247:                        if (StringUtils.equals(financialDocumentTypeCode, other
248:                                .getFinancialDocumentTypeCode())
249:                                && StringUtils.equals(cashieringRecordSource,
250:                                        other.getCashieringRecordSource())) {
251:                            if (StringUtils.equals(documentNumber, other
252:                                    .getDocumentNumber())) {
253:                                if (NumberUtils.equals(sequenceId, other
254:                                        .getSequenceId())) {
255:                                    if (NumberUtils
256:                                            .equals(
257:                                                    financialDocumentDepositLineNumber,
258:                                                    other
259:                                                            .getFinancialDocumentDepositLineNumber())) {
260:
261:                                        if (DateUtils.isSameDay(checkDate,
262:                                                other.getCheckDate())) {
263:                                            if ((amount != null)
264:                                                    && amount.equals(other
265:                                                            .getAmount())) {
266:                                                like = true;
267:                                            }
268:                                        }
269:                                    }
270:                                }
271:                            }
272:                        }
273:                    }
274:                }
275:
276:                return like;
277:            }
278:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.