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


001:        /*
002:         * Created on 16/10/2006
003:         * 
004:         * Swing Components - visit http://sf.net/projects/gfd
005:         * 
006:         * Copyright (C) 2006  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.ols.dados;
024:
025:        import java.sql.SQLException;
026:
027:        import br.com.gfp.internationalization.ErrosDeDadosMessages;
028:        import br.com.gfpshare.db.AbstractPersistentObject;
029:        import br.com.gfpshare.db.Column;
030:        import br.com.gfpshare.db.Table;
031:
032:        @Table(name="Request")
033:        public class Request extends AbstractPersistentObject {
034:            public static final int BUG_REPORT = 0;
035:
036:            public static final int SUPPORT_REQUEST = 1;
037:
038:            public static final int FEATURE_REQUEST = 2;
039:
040:            @Column(isPk=true,nome="Id",readMethodName="getId",writeMethodName="setId")
041:            private Integer id = null;
042:
043:            /**
044:             * Numero de comentarios (posts) que este request possui
045:             */
046:            @Column(isPk=false,nome="CommentsCount",readMethodName="getCommentsCount",writeMethodName="setCommentsCount")
047:            private Integer commentsCount = null;
048:
049:            /**
050:             * Tipo do request (sepport request, bug report ou feature request)
051:             */
052:            @Column(isPk=false,nome="Tipo",readMethodName="getTipo",writeMethodName="setTipo")
053:            protected Integer tipo = null;
054:
055:            /**
056:             * Indica se este é um request que o usuario postou
057:             */
058:            @Column(isPk=false,nome="MyRequest",readMethodName="isMyRequest",writeMethodName="setMyRequest")
059:            private Boolean myRequest = null;
060:
061:            /**
062:             * Categoria do request (ver site)
063:             */
064:            @Column(isPk=false,nome="Categoria",readMethodName="getCategoria",writeMethodName="setCategoria")
065:            private String categoria = null;
066:
067:            /**
068:             * Grupo do request (ver site)
069:             */
070:            @Column(isPk=false,nome="Grupo",readMethodName="getGrupo",writeMethodName="setGrupo")
071:            private String grupo = null;
072:
073:            /**
074:             * Quem é o responsável pela condução deste request
075:             */
076:            @Column(isPk=false,nome="AtribuidoPara",readMethodName="getAtribuidoPara",writeMethodName="setAtribuidoPara")
077:            private String atribuidoPara = null;
078:
079:            /**
080:             * Prioridade deste request
081:             */
082:            @Column(isPk=false,nome="Prioridade",readMethodName="getPrioridade",writeMethodName="setPrioridade")
083:            private String prioridade = null;
084:
085:            /**
086:             * Status (aberto, fechando, pendente, ...)
087:             */
088:            @Column(isPk=false,nome="Status",readMethodName="getStatus",writeMethodName="setStatus")
089:            private String status = null;
090:
091:            /**
092:             * Titulo do request
093:             */
094:            @Column(isPk=false,nome="Titulo",readMethodName="getTitulo",writeMethodName="setTitulo")
095:            private String titulo = null;
096:
097:            /**
098:             * Comentarios do request
099:             */
100:            @Column(isPk=false,nome="Texto",readMethodName="getTexto",writeMethodName="setTexto")
101:            private String texto = null;
102:
103:            /**
104:             * Indica se este request já foi enviado para o site
105:             */
106:            @Column(isPk=false,nome="LocalPost",readMethodName="isLocalPost",writeMethodName="setLocalPost")
107:            private Boolean localPost = null;
108:
109:            /**
110:             * Campo para adição de novo comentario ao request
111:             */
112:            private String novoTexto = null;
113:
114:            /*
115:             *  Indicamos que as pk não são automáticas para este tipo de dado
116:             */
117:            {
118:                autoPk = false;
119:            }
120:
121:            public Request() {
122:                //Podemos criar um Request sem parametros
123:            }
124:
125:            public Request(Integer id) {
126:                setId(id);
127:            }
128:
129:            public Request(String titulo) {
130:                setTitulo(titulo);
131:            }
132:
133:            public String getAsString(int arg0) {
134:                if (arg0 == CURTO)
135:                    return getId() + " - " + getTitulo();
136:                else if (arg0 == MEDIO)
137:                    return getAsString(CURTO) + " Status: " + getStatus()
138:                            + " Coments Count: " + getCommentsCount();
139:                else if (arg0 == LONGO)
140:                    return getAsString(CURTO) + getAsString(MEDIO)
141:                            + " Prioridade: " + getPrioridade()
142:                            + " Responsável: " + getAtribuidoPara();
143:                return "Invalid parameter!";
144:            }
145:
146:            public void validate() throws SQLException {
147:                if (getTitulo() == null)
148:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
149:                            .getString("TituloInvalido"));
150:                if (getNovoTexto() == null)
151:                    throw new SQLException(ErrosDeDadosMessages.getMessages()
152:                            .getString("TextoInvalido"));
153:            }
154:
155:            public String getAtribuidoPara() {
156:                return atribuidoPara;
157:            }
158:
159:            public void setAtribuidoPara(String atribuidoPara) {
160:                this .atribuidoPara = atribuidoPara;
161:            }
162:
163:            public String getCategoria() {
164:                return categoria;
165:            }
166:
167:            public void setCategoria(String categoria) {
168:                this .categoria = categoria;
169:            }
170:
171:            public Integer getCommentsCount() {
172:                return commentsCount;
173:            }
174:
175:            public void setCommentsCount(Integer commentsCount) {
176:                this .commentsCount = commentsCount;
177:            }
178:
179:            public String getGrupo() {
180:                return grupo;
181:            }
182:
183:            public void setGrupo(String grupo) {
184:                this .grupo = grupo;
185:            }
186:
187:            public Integer getId() {
188:                return id;
189:            }
190:
191:            public void setId(Integer id) {
192:                this .id = id;
193:            }
194:
195:            public String getPrioridade() {
196:                return prioridade;
197:            }
198:
199:            public void setPrioridade(String prioridade) {
200:                this .prioridade = prioridade;
201:            }
202:
203:            public String getStatus() {
204:                return status;
205:            }
206:
207:            public void setStatus(String status) {
208:                this .status = status;
209:            }
210:
211:            public String getTexto() {
212:                return texto;
213:            }
214:
215:            public void setTexto(String texto) {
216:                this .texto = texto;
217:            }
218:
219:            public Integer getTipo() {
220:                return tipo;
221:            }
222:
223:            public void setTipo(Integer tipo) {
224:                this .tipo = tipo;
225:            }
226:
227:            public String getTitulo() {
228:                return titulo;
229:            }
230:
231:            public void setTitulo(String titulo) {
232:                this .titulo = titulo;
233:            }
234:
235:            public Boolean isMyRequest() {
236:                return myRequest;
237:            }
238:
239:            public void setMyRequest(Boolean myRequest) {
240:                this .myRequest = myRequest;
241:            }
242:
243:            public String getNovoTexto() {
244:                return novoTexto;
245:            }
246:
247:            public void setNovoTexto(String novoTexto) {
248:                this .novoTexto = novoTexto;
249:            }
250:
251:            public Boolean isLocalPost() {
252:                return localPost;
253:            }
254:
255:            public void setLocalPost(Boolean localPost) {
256:                this.localPost = localPost;
257:            }
258:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.