Source Code Cross Referenced for Account.java in  » ERP-CRM-Financial » Personal-Finance-Manager » br » com » gfp » data » 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 » Personal Finance Manager » br.com.gfp.data 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Created on 15/06/2004
003:         * 
004:         * Swing Components - visit http://sf.net/projects/gfd
005:         * 
006:         * Copyright (C) 2004  Igor Regis da Silva Simões
007:         * 
008:         * This program is free software; you can redistribute it and/or
009:         * modify it under the terms of the GNU General Public License
010:         * as published by the Free Software Foundation; either version 2
011:         * of the License, or (at your option) any later version.
012:         *
013:         * This program is distributed in the hope that it will be useful,
014:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016:         * GNU General Public License for more details.
017:         *
018:         * You should have received a copy of the GNU General Public License
019:         * along with this program; if not, write to the Free Software
020:         * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
021:         */
022:
023:        package br.com.gfp.data;
024:
025:        import java.sql.SQLException;
026:        import java.util.Date;
027:        import java.util.Map;
028:
029:        import br.com.gfp.internationalization.ErrosDeDadosMessages;
030:        import br.com.gfpshare.db.Column;
031:        import br.com.gfpshare.db.Table;
032:
033:        /**
034:         * Classe abstrtata que representa uma conta e seus dados basicos
035:         * @author Igor Regis da Silva Simoes
036:         */
037:        @Table(name="")
038:        public abstract class Account extends BasicGFPDataObject {
039:
040:            /**
041:             *	Tipo da conta.
042:             */
043:            @Column(nome="TipoConta",isPk=false,writeMethodName="setTipoConta",readMethodName="getTipoConta")
044:            protected String tipoConta = "Conta";
045:
046:            /**
047:             *	Numero da conta
048:             */
049:            @Column(nome="NumeroConta",isPk=false,writeMethodName="setNumeroConta",readMethodName="getNumeroConta")
050:            private String numeroConta = null;
051:
052:            /**
053:             * Descricao da conta
054:             */
055:            @Column(nome="Descricao",isPk=false,writeMethodName="setDescricao",readMethodName="getDescricao")
056:            private String descricao = null;
057:
058:            /**
059:             *	Data de Abertura da conta
060:             */
061:            @Column(nome="DataAbertura",isPk=false,writeMethodName="setDataAbertura",readMethodName="getDataAbertura")
062:            private Date dataAbertura = null;
063:
064:            /**
065:             *	Data de fechamento da conta
066:             */
067:            @Column(nome="DataFechamento",isPk=false,writeMethodName="setDataFechamento",readMethodName="getDataFechamento")
068:            private Date dataFechamento = null;
069:
070:            /**
071:             *	Saldo inicial da conta
072:             */
073:            @Column(nome="SaldoInicial",isPk=false,writeMethodName="setSaldoInicial",readMethodName="getSaldoInicial")
074:            private Double saldoInicial = null;
075:
076:            /**
077:             * Indica se este é um registro de sistema
078:             */
079:            @Column(nome="EhDeSistema",isPk=false,writeMethodName="setEhDeSistema",readMethodName="getEhDeSistema")
080:            private Boolean ehDeSistema = Boolean.FALSE;
081:
082:            /** Cria uma nova instância de Account */
083:            public Account() {
084:                //Não fazemos nada
085:            }
086:
087:            /** Cria uma nova instância de Account
088:             * @param saldoInicial
089:             */
090:            public Account(Double saldoInicial) {
091:                setSaldoInicial(saldoInicial);
092:            }
093:
094:            /** 
095:             *  Creates a new instance of Entidade
096:             * @param conta Map contendo os dados desta nova conta
097:             */
098:            public Account(Map<String, Object> conta) {
099:                setDados(conta);
100:            }
101:
102:            /** 
103:             * Getter for property dataAbertura.
104:             * @return Value of property dataAbertura.
105:             */
106:            public Date getDataAbertura() {
107:                return dataAbertura;
108:            }
109:
110:            /** Setter for property dataAbertura.
111:             * @param dataAbertura New value of property dataAbertura.
112:             *
113:             */
114:            public void setDataAbertura(Date dataAbertura) {
115:                this .dataAbertura = dataAbertura;
116:            }
117:
118:            /** Getter for property dataFechamento.
119:             * @return Value of property dataFechamento.
120:             *
121:             */
122:            public Date getDataFechamento() {
123:                return dataFechamento;
124:            }
125:
126:            /** Setter for property dataFechamento.
127:             * @param dataFechamento New value of property dataFechamento.
128:             *
129:             */
130:            public void setDataFechamento(Date dataFechamento) {
131:                this .dataFechamento = dataFechamento;
132:            }
133:
134:            /** Getter for property saldoInicial.
135:             * @return Value of property saldoInicial.
136:             *
137:             */
138:            public Double getSaldoInicial() {
139:                return saldoInicial;
140:            }
141:
142:            /** Setter for property saldoInicial.
143:             * @param saldoInicial New value of property saldoInicial.
144:             *
145:             */
146:            public void setSaldoInicial(Double saldoInicial) {
147:                this .saldoInicial = saldoInicial;
148:            }
149:
150:            /**
151:             * Getter for property numeroConta.
152:             * @return Value of property numeroConta.
153:             */
154:            public String getNumeroConta() {
155:                return numeroConta;
156:            }
157:
158:            /**
159:             * Setter for property numeroConta.
160:             * @param numeroConta New value of property numeroConta.
161:             */
162:            public void setNumeroConta(String numeroConta) {
163:                this .numeroConta = numeroConta;
164:            }
165:
166:            /**
167:             * Getter for property descricao.
168:             * @return Value of property descricao.
169:             */
170:            public String getDescricao() {
171:                return descricao;
172:            }
173:
174:            /**
175:             * Setter for property descricao.
176:             * @param descricao New value of property descricao.
177:             */
178:            public void setDescricao(String descricao) {
179:                this .descricao = descricao == null
180:                        || descricao.trim().equals("") ? null : descricao;
181:            }
182:
183:            /**
184:             * Getter for property tipoConta.
185:             * @return Value of property tipoConta.
186:             */
187:            public String getTipoConta() {
188:                return tipoConta;
189:            }
190:
191:            /**
192:             * Setter for property tipoConta.
193:             * @param tipoConta
194:             */
195:            public void setTipoConta(String tipoConta) {
196:                //faz nada
197:            }
198:
199:            /**
200:             * Indica se este é um registro de sistema
201:             * @return true caso seja um registro de sistema
202:             */
203:            public Boolean getEhDeSistema() {
204:                return ehDeSistema;
205:            }
206:
207:            /**
208:             * Indica se este é um registro de sistema
209:             * @param persistentEhDeSistema
210:             */
211:            public void setEhDeSistema(Boolean persistentEhDeSistema) {
212:                this .ehDeSistema = persistentEhDeSistema;
213:            }
214:
215:            /**
216:             * @see br.com.gfpshare.db.PersistentObject#validate()
217:             */
218:            public void validate() throws SQLException {
219:                if (this .numeroConta == null)
220:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
221:                            .getString("NumeroDeContaInvalido"));
222:                if (this .dataAbertura == null)
223:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
224:                            .getString("DataAberturaInvalido"));
225:                if (this .dataFechamento != null
226:                        && this .dataFechamento.before(this .dataAbertura))
227:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
228:                            .getString("DataFechamentoInvalido"));
229:                if (this .descricao == null)
230:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
231:                            .getString("DescricaoContaInvalido"));
232:                if (this .tipoConta == null)
233:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
234:                            .getString("TipoContaInvalido"));
235:            }
236:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.