Source Code Cross Referenced for Contact.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 11/04/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.Map;
027:
028:        import br.com.gfp.internationalization.ErrosDeDadosMessages;
029:        import br.com.gfpshare.db.Column;
030:        import br.com.gfpshare.db.Table;
031:
032:        /**
033:         *	Classe que representa uma entidade.
034:         *	Uma entidade pode ser uma pessoa ou uma empresa.
035:         * @author  Igor Regis da Silva Simões
036:         */
037:        @Table(name="Entidade")
038:        public class Contact extends BasicGFPDataObject {
039:            /**
040:             * Nome da entidade
041:             */
042:            @Column(nome="Nome",isPk=false,writeMethodName="setNome",readMethodName="getNome")
043:            private String nome = null;
044:
045:            /**
046:             * Endereço da entidade
047:             */
048:            @Column(nome="Endereco",isPk=false,writeMethodName="setEndereco",readMethodName="getEndereco")
049:            private String endereco = null;
050:
051:            /**
052:             * Telefone da entidade
053:             */
054:            @Column(nome="Telefone",isPk=false,writeMethodName="setTelefone",readMethodName="getTelefone")
055:            private String telefone = null;
056:
057:            /**
058:             * Nome do contado na entidade
059:             */
060:            @Column(nome="Contato",isPk=false,writeMethodName="setContato",readMethodName="getContato")
061:            private String contato = null;
062:
063:            /**
064:             * Email da entidade
065:             */
066:            @Column(nome="Email",isPk=false,writeMethodName="setEmail",readMethodName="getEmail")
067:            private String email = null;
068:
069:            /**
070:             * Descricao da entidade
071:             */
072:            @Column(nome="Descricao",isPk=false,writeMethodName="setDescricao",readMethodName="getDescricao")
073:            private String descricao = null;
074:
075:            /**
076:             *	Codigo de identificação da entidade, que pode ser CPF ou CNPJ 
077:             */
078:            @Column(nome="Cod_Identificacao",isPk=false,writeMethodName="setCod_Identificacao",readMethodName="getCod_Identificacao")
079:            private String cod_Identificacao = null;
080:
081:            /**
082:             * Indica se este é um registro de sistema
083:             */
084:            @Column(nome="EhDeSistema",isPk=false,writeMethodName="setEhDeSistema",readMethodName="getEhDeSistema")
085:            private Boolean ehDeSistema = Boolean.FALSE;
086:
087:            /** 
088:             *  Creates a new instance of Entidade
089:             */
090:            public Contact() {
091:                //Não fazemos nada
092:            }
093:
094:            /** 
095:             *  Creates a new instance of Entidade
096:             * @param id Id da nova entidade
097:             */
098:            public Contact(Integer id) {
099:                setId(id);
100:            }
101:
102:            /** 
103:             *  Creates a new instance of Entidade
104:             * @param nome Nome da nova entidade
105:             */
106:            public Contact(String nome) {
107:                setNome(nome);
108:            }
109:
110:            /** 
111:             *  Creates a new instance of Entidade
112:             * @param entidade Map com os dados desta nova entidade
113:             */
114:            public Contact(Map<String, Object> entidade) {
115:                setDados(entidade);
116:            }
117:
118:            /**
119:             * Getter for property nome.
120:             * @return Value of property nome.
121:             */
122:            public String getNome() {
123:                return nome;
124:            }
125:
126:            /**
127:             * Setter for property nome.
128:             * @param nome New value of property nome.
129:             */
130:            public void setNome(String nome) {
131:
132:                this .nome = nome == null || nome.equals("") ? null : nome;
133:            }
134:
135:            /**
136:             * Getter for property endereco.
137:             * @return Value of property endereco.
138:             */
139:            public String getEndereco() {
140:                return endereco;
141:            }
142:
143:            /**
144:             * Setter for property endereco.
145:             * @param endereco New value of property endereco.
146:             */
147:            public void setEndereco(String endereco) {
148:                this .endereco = endereco == null || endereco.equals("") ? null
149:                        : endereco;
150:            }
151:
152:            /**
153:             * Getter for property telefone.
154:             * @return Value of property telefone.
155:             */
156:            public String getTelefone() {
157:                return telefone;
158:            }
159:
160:            /**
161:             * Setter for property telefone.
162:             * @param telefone New value of property telefone.
163:             */
164:            public void setTelefone(String telefone) {
165:                this .telefone = telefone == null
166:                        || telefone.trim().equals("(  )     -") ? null
167:                        : telefone;
168:            }
169:
170:            /**
171:             * Getter for property contato.
172:             * @return Value of property contato.
173:             */
174:            public String getContato() {
175:                return contato;
176:            }
177:
178:            /**
179:             * Setter for property contato.
180:             * @param contato New value of property contato.
181:             */
182:            public void setContato(String contato) {
183:                this .contato = contato == null || contato.equals("") ? null
184:                        : contato;
185:            }
186:
187:            /**
188:             * Getter for property email.
189:             * @return Value of property email.
190:             */
191:            public String getEmail() {
192:                return email;
193:            }
194:
195:            /**
196:             * Setter for property email.
197:             * @param email New value of property email.
198:             */
199:            public void setEmail(String email) {
200:                this .email = email == null || email.equals("") ? null : email;
201:            }
202:
203:            /**
204:             * Getter for property descricao.
205:             * @return Value of property descricao.
206:             */
207:            public String getDescricao() {
208:                return descricao;
209:            }
210:
211:            /**
212:             * Setter for property descricao.
213:             * @param descricao New value of property descricao.
214:             */
215:            public void setDescricao(String descricao) {
216:                this .descricao = descricao == null || descricao.equals("") ? null
217:                        : descricao;
218:            }
219:
220:            /**
221:             * Getter for property cod_identificacao.
222:             * @return Value of property cod_identificacao.
223:             */
224:            public String getCod_Identificacao() {
225:                return cod_Identificacao;
226:            }
227:
228:            /**
229:             * Setter for property cod_identificacao.
230:             * @param cod_identificacao New value of property cod_identificacao.
231:             */
232:            public void setCod_Identificacao(String cod_identificacao) {
233:                this .cod_Identificacao = cod_identificacao;
234:            }
235:
236:            /**
237:             * Indica se este é um registro de sistema
238:             * @return true caso seja um registro de sistema
239:             */
240:            public Boolean getEhDeSistema() {
241:                return ehDeSistema;
242:            }
243:
244:            /**
245:             * Indica se este é um registro de sistema
246:             * @param ehDeSistema
247:             */
248:            public void setEhDeSistema(Boolean ehDeSistema) {
249:                this .ehDeSistema = ehDeSistema;
250:            }
251:
252:            /**
253:             * @see br.com.gfpshare.db.PersistentObject#validate()
254:             */
255:            public void validate() throws SQLException {
256:                if (this .nome == null)
257:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
258:                            .getString("NomeInvalido"));
259:            }
260:
261:            /**
262:             * @see br.com.gfpshare.db.PersistentObject#getAsString(int)
263:             */
264:            public String getAsString(int format) {
265:                switch (format) {
266:                case AccountSaving.CURTO:
267:                    return getNome();
268:                case AccountSaving.MEDIO:
269:                    return getNome() + " - " + getDescricao();
270:                case AccountSaving.LONGO:
271:                    return toString();
272:                }
273:                return "";
274:            }
275:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.