Source Code Cross Referenced for WorkSheetImpl.java in  » J2EE » Enhydra-Demos » projectmanagement » business » timewage » 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 » J2EE » Enhydra Demos » projectmanagement.business.timewage 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package projectmanagement.business.timewage;
002:
003:        import projectmanagement.business.ProjectManagementBusinessException;
004:        import projectmanagement.data.timewage.*;
005:        import com.lutris.appserver.server.sql.DatabaseManagerException;
006:        import com.lutris.appserver.server.sql.ObjectIdException;
007:        import com.lutris.dods.builder.generator.query.DataObjectException;
008:
009:        import java.sql.Date;
010:        import java.sql.Time;
011:
012:        import projectmanagement.spec.timewage.*;
013:
014:        /**
015:         * Represents a work sheet.
016:         *
017:         * @author Sasa Bojanic
018:         * @version 1.0
019:         */
020:        public class WorkSheetImpl implements  WorkSheet {
021:            /**
022:             * The DO of the WorkSheet.
023:             */
024:            protected WorkSheetDO myDO = null;
025:
026:            /**
027:             * The public constructor.
028:             */
029:            public WorkSheetImpl() throws ProjectManagementBusinessException {
030:                try {
031:                    this .myDO = WorkSheetDO.createVirgin();
032:                } catch (DatabaseManagerException ex) {
033:                    throw new ProjectManagementBusinessException(
034:                            "Error creating empty work sheet", ex);
035:                } catch (ObjectIdException ex) {
036:                    throw new ProjectManagementBusinessException(
037:                            "Error creating object ID for work sheet", ex);
038:                }
039:            }
040:
041:            /** The public constructor
042:             *
043:             * @param theWorkSheet. The data object of the work sheet.
044:             */
045:            public WorkSheetImpl(WorkSheetDO theWorkSheet) {
046:                this .myDO = theWorkSheet;
047:            }
048:
049:            /**
050:             * Gets the DO object for the work sheet
051:             *
052:             * @return the DO object.
053:             * @exception ProjectManagementBusinessException if an error occurs
054:             *   retrieving data.
055:             */
056:            public WorkSheetDO getDO()
057:                    throws ProjectManagementBusinessException {
058:                if (this .myDO != null) {
059:                    return this .myDO;
060:                } else {
061:                    throw new ProjectManagementBusinessException(
062:                            "Error getting DO object for work sheet");
063:                }
064:            }
065:
066:            /**
067:             * Gets the object id for the work sheet
068:             *
069:             * @return the object id.
070:             * @exception ProjectManagementBusinessException if an error occurs
071:             *   retrieving data (usually due to an underlying data layer
072:             *   error).
073:             */
074:            public String getHandle() throws ProjectManagementBusinessException {
075:                try {
076:                    return this .myDO.getHandle();
077:                } catch (DatabaseManagerException ex) {
078:                    throw new ProjectManagementBusinessException(
079:                            "Error getting handle for work sheet", ex);
080:                }
081:            }
082:
083:            /**
084:             * Sets the PayRate for the work sheet.
085:             *
086:             * @param the pay rate.
087:             * @exception ProjectManagementBusinessException if an error occurs
088:             *   setting the data (usually due to an underlying data layer
089:             *   error).
090:             */
091:            public void setPayRate(PayRate thePayRate)
092:                    throws ProjectManagementBusinessException {
093:                try {
094:                    myDO.setPayRate(((PayRateImpl) thePayRate).getDO());
095:                } catch (DataObjectException ex) {
096:                    throw new ProjectManagementBusinessException(
097:                            "Error setting work sheet rate", ex);
098:                }
099:            }
100:
101:            /**
102:             * Gets the pay rate for the work sheet
103:             *
104:             * @return the pay rate.
105:             * @exception ProjectManagementBusinessException if an error occurs
106:             *   retrieving data (usually due to an underlying data layer
107:             *   error).
108:             */
109:            public PayRate getPayRate()
110:                    throws ProjectManagementBusinessException {
111:                try {
112:                    return new PayRateImpl(myDO.getPayRate());
113:                } catch (DataObjectException ex) {
114:                    throw new ProjectManagementBusinessException(
115:                            "Error getting work sheet pay rate", ex);
116:                }
117:            }
118:
119:            /**
120:             * Sets the working date for work sheet.
121:             *
122:             * @param the working date for the worksheet.
123:             * @exception ProjectManagementBusinessException if an error occurs
124:             *   setting the data (usually due to an underlying data layer
125:             *   error).
126:             */
127:            public void setWorkingDate(Date workingDate)
128:                    throws ProjectManagementBusinessException {
129:                try {
130:                    myDO.setWorkingDate(workingDate);
131:                } catch (DataObjectException ex) {
132:                    throw new ProjectManagementBusinessException(
133:                            "Error setting working date", ex);
134:                }
135:            }
136:
137:            /**
138:             * Gets the working date for work sheet.
139:             *
140:             * @return the working date for work sheet.
141:             * @exception ProjectManagementBusinessException if an error occurs
142:             *   retrieving data (usually due to an underlying data layer
143:             *   error).
144:             */
145:            public Date getWorkingDate()
146:                    throws ProjectManagementBusinessException {
147:                try {
148:                    return myDO.getWorkingDate();
149:                } catch (DataObjectException ex) {
150:                    throw new ProjectManagementBusinessException(
151:                            "Error getting the working date for work sheet", ex);
152:                }
153:            }
154:
155:            /**
156:             * Sets the time started for the work sheet.
157:             *
158:             * @param the time started.
159:             * @exception ProjectManagementBusinessException if an error occurs
160:             *   setting the data (usually due to an underlying data layer
161:             *   error).
162:             */
163:            public void setTimeStarted(Time timeStarted)
164:                    throws ProjectManagementBusinessException {
165:                try {
166:                    myDO.setTimeStarted(timeStarted);
167:                } catch (DataObjectException ex) {
168:                    throw new ProjectManagementBusinessException(
169:                            "Error setting time started", ex);
170:                }
171:            }
172:
173:            /**
174:             * Gets the time started.
175:             *
176:             * @return the time started.
177:             * @exception ProjectManagementBusinessException if an error occurs
178:             *   retrieving data (usually due to an underlying data layer
179:             *   error).
180:             */
181:            public Time getTimeStarted()
182:                    throws ProjectManagementBusinessException {
183:                try {
184:                    return myDO.getTimeStarted();
185:                } catch (DataObjectException ex) {
186:                    throw new ProjectManagementBusinessException(
187:                            "Error getting time started", ex);
188:                }
189:            }
190:
191:            /**
192:             * Sets the time finished for the work sheet.
193:             *
194:             * @param the time finished.
195:             * @exception ProjectManagementBusinessException if an error occurs
196:             *   setting the data (usually due to an underlying data layer
197:             *   error).
198:             */
199:            public void setTimeFinished(Time timeFinished)
200:                    throws ProjectManagementBusinessException {
201:                try {
202:                    myDO.setTimeFinished(timeFinished);
203:                } catch (DataObjectException ex) {
204:                    throw new ProjectManagementBusinessException(
205:                            "Error setting time finished", ex);
206:                }
207:            }
208:
209:            /**
210:             * Gets the time finished.
211:             *
212:             * @return the time finished.
213:             * @exception ProjectManagementBusinessException if an error occurs
214:             *   retrieving data (usually due to an underlying data layer
215:             *   error).
216:             */
217:            public Time getTimeFinished()
218:                    throws ProjectManagementBusinessException {
219:                try {
220:                    return myDO.getTimeFinished();
221:                } catch (DataObjectException ex) {
222:                    throw new ProjectManagementBusinessException(
223:                            "Error getting time finished", ex);
224:                }
225:            }
226:
227:            /**
228:             * Sets the personal comment for the work sheet.
229:             *
230:             * @param the personal comment.
231:             * @exception ProjectManagementBusinessException if an error occurs
232:             *   setting the data (usually due to an underlying data layer
233:             *   error).
234:             */
235:            public void setPersonalComment(String personalComment)
236:                    throws ProjectManagementBusinessException {
237:                try {
238:                    myDO.setPersonalComment(personalComment);
239:                } catch (DataObjectException ex) {
240:                    throw new ProjectManagementBusinessException(
241:                            "Error setting work sheet personal comment", ex);
242:                }
243:            }
244:
245:            /**
246:             * Gets the personal comment for the work sheet
247:             *
248:             * @return the personal comment.
249:             * @exception ProjectManagementBusinessException if an error occurs
250:             *   retrieving data (usually due to an underlying data layer
251:             *   error).
252:             */
253:            public String getPersonalComment()
254:                    throws ProjectManagementBusinessException {
255:                try {
256:                    return myDO.getPersonalComment();
257:                } catch (DataObjectException ex) {
258:                    throw new ProjectManagementBusinessException(
259:                            "Error getting work sheet personal comment", ex);
260:                }
261:            }
262:
263:            /**
264:             * Sets the comment for client for the work sheet.
265:             *
266:             * @param the comment for client.
267:             * @exception ProjectManagementBusinessException if an error occurs
268:             *   setting the data (usually due to an underlying data layer
269:             *   error).
270:             */
271:            public void setCommentForClient(String commentForClient)
272:                    throws ProjectManagementBusinessException {
273:                try {
274:                    myDO.setCommentForClient(commentForClient);
275:                } catch (DataObjectException ex) {
276:                    throw new ProjectManagementBusinessException(
277:                            "Error setting work sheet comment for client", ex);
278:                }
279:            }
280:
281:            /**
282:             * Gets the comment for client for the work sheet
283:             *
284:             * @return the comment for client.
285:             * @exception ProjectManagementBusinessException if an error occurs
286:             *   retrieving data (usually due to an underlying data layer
287:             *   error).
288:             */
289:            public String getCommentForClient()
290:                    throws ProjectManagementBusinessException {
291:                try {
292:                    return myDO.getCommentForClient();
293:                } catch (DataObjectException ex) {
294:                    throw new ProjectManagementBusinessException(
295:                            "Error getting work sheet comment for client", ex);
296:                }
297:            }
298:
299:            /**
300:             * Commits all changes to the database.
301:             *
302:             * @exception ProjectManagementBusinessException if an error occurs
303:             *   retrieving data (usually due to an underlying data layer
304:             *   error).
305:             */
306:            public void save() throws ProjectManagementBusinessException {
307:                try {
308:                    this .myDO.save();
309:                } catch (Exception ex) {
310:                    throw new ProjectManagementBusinessException(
311:                            "Error saving work sheet", ex);
312:                }
313:            }
314:
315:            /**
316:             * Deletes the work sheet from database.
317:             *
318:             * @exception ProjectManagementBusinessException if an error occurs
319:             *   deleting data (usually due to an underlying data layer
320:             *   error).
321:             */
322:            public void delete() throws ProjectManagementBusinessException {
323:                try {
324:                    this .myDO.delete();
325:                } catch (Exception ex) {
326:                    throw new ProjectManagementBusinessException(
327:                            "Error deleting work sheet", ex);
328:                }
329:            }
330:
331:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.