Source Code Cross Referenced for AchAccountNumber.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » pdp » 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.pdp.bo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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:        /*
017:         * Created on Jul 9, 2004
018:         *
019:         */
020:        package org.kuali.module.pdp.bo;
021:
022:        import java.io.Serializable;
023:        import java.sql.Timestamp;
024:        import java.util.Date;
025:
026:        import org.apache.commons.lang.builder.EqualsBuilder;
027:        import org.apache.commons.lang.builder.HashCodeBuilder;
028:        import org.apache.commons.lang.builder.ToStringBuilder;
029:        import org.apache.ojb.broker.PersistenceBroker;
030:        import org.apache.ojb.broker.PersistenceBrokerAware;
031:        import org.apache.ojb.broker.PersistenceBrokerException;
032:
033:        /**
034:         * @author delyea
035:         * @hibernate.class table="PDP.PDP_ACH_ACCT_NBR_T"
036:         */
037:
038:        public class AchAccountNumber implements  Serializable,
039:                PersistenceBrokerAware {
040:
041:            private Integer id; // PMT_GRP_ID Primary Key
042:            private String achBankAccountNbr; // ACH_BNK_ACCT_NBR
043:            private Integer version; // VER_NBR
044:            private Timestamp lastUpdate;
045:
046:            public AchAccountNumber() {
047:                super ();
048:            }
049:
050:            /**
051:             * returns a partial string of the account number if the account number is zero chars it returns empty string if the account
052:             * number is 1-4 chars it returns everything masked if the account number is 5-8 chars it returns the last 2 numbers non masked
053:             * if the account number is > 8 chars it returns the last 4 numbers non masked
054:             * 
055:             * @return
056:             * @hibernate.property column="ACH_BNK_ACCT_NBR" length="17"
057:             */
058:            public String getPartialMaskAchBankAccountNbr() {
059:                String partialAccountNumber = "";
060:                String numbers = "";
061:                int accountLength = achBankAccountNbr.length();
062:                if (accountLength == 0) {
063:                    return "";
064:                } else if ((accountLength == 3) || (accountLength == 4)) {
065:                    numbers = achBankAccountNbr.substring(accountLength - 1);
066:                } else if ((accountLength < 8) && (accountLength > 4)) {
067:                    numbers = achBankAccountNbr.substring(accountLength - 3);
068:                } else if (accountLength >= 8) {
069:                    numbers = achBankAccountNbr.substring(accountLength - 4);
070:                }
071:                for (int i = 0; i < (accountLength - numbers.length()); i++) {
072:                    partialAccountNumber = partialAccountNumber + "*";
073:                }
074:                return partialAccountNumber + numbers;
075:            }
076:
077:            /**
078:             * @return
079:             * @hibernate.property column="ACH_BNK_ACCT_NBR" length="17"
080:             */
081:            public String getAchBankAccountNbr() {
082:                return achBankAccountNbr;
083:            }
084:
085:            /**
086:             * @return
087:             * @hibernate.id column="PMT_GRP_ID" generator-class="assigned"
088:             */
089:            public Integer getId() {
090:                return id;
091:            }
092:
093:            /**
094:             * @return
095:             * @hibernate.version column="VER_NBR" not-null="true"
096:             */
097:            public Integer getVersion() {
098:                return version;
099:            }
100:
101:            /**
102:             * @param integer
103:             */
104:            public void setAchBankAccountNbr(String s) {
105:                achBankAccountNbr = s;
106:            }
107:
108:            /**
109:             * @param integer
110:             */
111:            public void setId(Integer integer) {
112:                id = integer;
113:            }
114:
115:            /**
116:             * @param integer
117:             */
118:            public void setVersion(Integer integer) {
119:                version = integer;
120:            }
121:
122:            public boolean equals(Object obj) {
123:                if (!(obj instanceof  AchAccountNumber)) {
124:                    return false;
125:                }
126:                AchAccountNumber o = (AchAccountNumber) obj;
127:                return new EqualsBuilder().append(id, o.getId()).isEquals();
128:            }
129:
130:            public int hashCode() {
131:                return new HashCodeBuilder(67, 79).append(id).toHashCode();
132:            }
133:
134:            public String toString() {
135:                return new ToStringBuilder(this ).append("id", this .id)
136:                        .toString();
137:            }
138:
139:            /**
140:             * @return Returns the lastUpdate.
141:             */
142:            public Timestamp getLastUpdate() {
143:                return lastUpdate;
144:            }
145:
146:            /**
147:             * @param lastUpdate The lastUpdate to set.
148:             */
149:            public void setLastUpdate(Timestamp lastUpdate) {
150:                this .lastUpdate = lastUpdate;
151:            }
152:
153:            public void beforeInsert(PersistenceBroker broker)
154:                    throws PersistenceBrokerException {
155:                lastUpdate = new Timestamp((new Date()).getTime());
156:            }
157:
158:            public void afterInsert(PersistenceBroker broker)
159:                    throws PersistenceBrokerException {
160:
161:            }
162:
163:            public void beforeUpdate(PersistenceBroker broker)
164:                    throws PersistenceBrokerException {
165:                lastUpdate = new Timestamp((new Date()).getTime());
166:            }
167:
168:            public void afterUpdate(PersistenceBroker broker)
169:                    throws PersistenceBrokerException {
170:
171:            }
172:
173:            public void beforeDelete(PersistenceBroker broker)
174:                    throws PersistenceBrokerException {
175:
176:            }
177:
178:            public void afterDelete(PersistenceBroker broker)
179:                    throws PersistenceBrokerException {
180:
181:            }
182:
183:            public void afterLookup(PersistenceBroker broker)
184:                    throws PersistenceBrokerException {
185:
186:            }
187:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.