Source Code Cross Referenced for HistoryWrapper.java in  » Test-Coverage » salome-tmf » salomeTMF_plug » mantis » sqlWrapper » 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 » Test Coverage » salome tmf » salomeTMF_plug.mantis.sqlWrapper 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package salomeTMF_plug.mantis.sqlWrapper;
002:
003:        import java.sql.Date;
004:        import java.text.SimpleDateFormat;
005:
006:        import salomeTMF_plug.mantis.MantisPlugin;
007:        import salomeTMF_plug.mantis.languages.Language;
008:
009:        public class HistoryWrapper {
010:            int id;
011:            Date pDate;
012:            String username;
013:            String field_name;
014:            String old_value;
015:            String new_value;
016:            int code;
017:
018:            /* For to String */
019:            String field;
020:            String change;
021:
022:            public int getCode() {
023:                return code;
024:            }
025:
026:            public void setCode(int code) {
027:                this .code = code;
028:            }
029:
030:            public String getField_name() {
031:                return field_name;
032:            }
033:
034:            public void setField_name(String field_name) {
035:                this .field_name = field_name;
036:            }
037:
038:            public int getId() {
039:                return id;
040:            }
041:
042:            public void setId(int id) {
043:                this .id = id;
044:            }
045:
046:            public String getNew_value() {
047:                return new_value;
048:            }
049:
050:            public void setNew_value(String new_value) {
051:                this .new_value = new_value;
052:            }
053:
054:            public String getOld_value() {
055:                return old_value;
056:            }
057:
058:            public void setOld_value(String old_value) {
059:                this .old_value = old_value;
060:            }
061:
062:            public Date getPDate() {
063:                return pDate;
064:            }
065:
066:            public void setPDate(Date date) {
067:                pDate = date;
068:            }
069:
070:            public String getUsername() {
071:                return username;
072:            }
073:
074:            public void setUsername(String username) {
075:                this .username = username;
076:            }
077:
078:            public String getDate() {
079:                SimpleDateFormat formater = new SimpleDateFormat(
080:                        "dd/MM/yyyy HH:mm");
081:                return formater.format(pDate).toString();
082:            }
083:
084:            public String getField() {
085:                String ret = "";
086:                if (code == 0) {
087:                    ret = field_name;
088:                } else if (code == 1) {
089:                    ret = Language.getInstance().getText("New"); //local
090:                } else if (code == 18) {
091:                    ret = Language.getInstance().getText("Relationship_added"); //local
092:                } else if (code == 19) {
093:                    ret = Language.getInstance()
094:                            .getText("Relationship_deleted"); //local
095:                } else {
096:                    /* Not yet Implemented */
097:                    ret = field_name;
098:                }
099:                return ret;
100:            }
101:
102:            public String getChange(MantisPlugin pMantisPlugin) {
103:                String ret = "";
104:                if (code == 0) {
105:                    if (field_name.equals("handler_id")) {
106:                        ret = old_value + " => " + new_value;
107:                    } else if (field_name.equals("status")) {
108:                        Integer I_old_value = new Integer(old_value);
109:                        Integer I_new_value = new Integer(new_value);
110:                        ret = pMantisPlugin.statusByID.get(I_old_value)
111:                                + " => "
112:                                + pMantisPlugin.statusByID.get(I_new_value);
113:                    } else if (field_name.equals("priority")) {
114:                        Integer I_old_value = new Integer(old_value);
115:                        Integer I_new_value = new Integer(new_value);
116:                        ret = pMantisPlugin.priorityByID.get(I_old_value)
117:                                + " => "
118:                                + pMantisPlugin.priorityByID.get(I_new_value);
119:                    } else if (field_name.equals("severity")) {
120:                        Integer I_old_value = new Integer(old_value);
121:                        Integer I_new_value = new Integer(new_value);
122:                        ret = pMantisPlugin.severityByID.get(I_old_value)
123:                                + " => "
124:                                + pMantisPlugin.severityByID.get(I_new_value);
125:                    } else if (field_name.equals("reproducibility")) {
126:                        Integer I_old_value = new Integer(old_value);
127:                        Integer I_new_value = new Integer(new_value);
128:                        ret = pMantisPlugin.reproductibilityByID
129:                                .get(I_old_value)
130:                                + " => "
131:                                + pMantisPlugin.reproductibilityByID
132:                                        .get(I_new_value);
133:                    } else if (field_name.equals("resolution")) {
134:                        Integer I_old_value = new Integer(old_value);
135:                        Integer I_new_value = new Integer(new_value);
136:                        ret = pMantisPlugin.resolutionByID.get(I_old_value)
137:                                + " => "
138:                                + pMantisPlugin.resolutionByID.get(I_new_value);
139:                    } else {
140:                        ret = old_value + " => " + new_value;
141:                    }
142:                } else if (code == 1) {
143:                    ret = ""; //local
144:                } else if (code == 18) {
145:                    ret = Language.getInstance().getText("related_to") + " "
146:                            + new_value; //local
147:                } else if (code == 19) {
148:                    ret = Language.getInstance().getText("related_to") + " "
149:                            + new_value; //local
150:                } else {
151:                    /* Not yet Implemented */
152:                    ret = old_value + " => " + new_value;
153:                }
154:                return ret;
155:            }
156:            /*if (code == 0){
157:            	//Update
158:            	 SimpleDateFormat formater = new SimpleDateFormat("dd/MM/yyyy HH:mm");
159:            	formater.format // toString
160:            }*/
161:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.