Source Code Cross Referenced for PayRateImpl.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.project.*;
004:        import projectmanagement.business.employee.*;
005:        import projectmanagement.business.ProjectManagementBusinessException;
006:        import projectmanagement.data.timewage.*;
007:        import com.lutris.appserver.server.sql.DatabaseManagerException;
008:        import com.lutris.appserver.server.sql.ObjectIdException;
009:        import com.lutris.dods.builder.generator.query.DataObjectException;
010:
011:        import projectmanagement.spec.timewage.*;
012:        import projectmanagement.spec.employee.*;
013:        import projectmanagement.spec.project.*;
014:
015:        import java.sql.Date;
016:
017:        /**
018:         * Represents a pay rate.
019:         *
020:         * @author Sasa Bojanic
021:         * @version 1.0
022:         */
023:        public class PayRateImpl implements  PayRate {
024:            /**
025:             * The DO of the PayRate.
026:             */
027:            protected PayRateDO myDO = null;
028:
029:            /**
030:             * The public constructor.
031:             */
032:            public PayRateImpl() throws ProjectManagementBusinessException {
033:                try {
034:                    this .myDO = PayRateDO.createVirgin();
035:                } catch (DatabaseManagerException ex) {
036:                    throw new ProjectManagementBusinessException(
037:                            "Error creating empty pay rate", ex);
038:                } catch (ObjectIdException ex) {
039:                    throw new ProjectManagementBusinessException(
040:                            "Error creating object ID for pay rate", ex);
041:                }
042:            }
043:
044:            /** The public constructor
045:             *
046:             * @param thePayRate. The data object of the pay rate.
047:             */
048:            public PayRateImpl(PayRateDO thePayRate) {
049:                this .myDO = thePayRate;
050:            }
051:
052:            /**
053:             * Gets the DO object for the pay rate
054:             *
055:             * @return the DO object.
056:             * @exception ProjectManagementBusinessException if an error occurs
057:             *   retrieving data.
058:             */
059:            public PayRateDO getDO() throws ProjectManagementBusinessException {
060:                if (this .myDO != null) {
061:                    return this .myDO;
062:                } else {
063:                    throw new ProjectManagementBusinessException(
064:                            "Error getting DO object for pay rate");
065:                }
066:            }
067:
068:            /**
069:             * Gets the object id for the pay rate
070:             *
071:             * @return the object id.
072:             * @exception ProjectManagementBusinessException if an error occurs
073:             *   retrieving data (usually due to an underlying data layer
074:             *   error).
075:             */
076:            public String getHandle() throws ProjectManagementBusinessException {
077:                try {
078:                    return this .myDO.getHandle();
079:                } catch (DatabaseManagerException ex) {
080:                    throw new ProjectManagementBusinessException(
081:                            "Error getting handle for pay rate", ex);
082:                }
083:            }
084:
085:            /**
086:             * Sets the rate for the pay rate.
087:             *
088:             * @param the rate.
089:             * @exception ProjectManagementBusinessException if an error occurs
090:             *   setting the data (usually due to an underlying data layer
091:             *   error).
092:             */
093:            public void setRate(double rate)
094:                    throws ProjectManagementBusinessException {
095:                try {
096:                    myDO.setRate(rate);
097:                } catch (DataObjectException ex) {
098:                    throw new ProjectManagementBusinessException(
099:                            "Error setting pay rate rate", ex);
100:                }
101:            }
102:
103:            /**
104:             * Gets the rate for the pay rate
105:             *
106:             * @return the rate.
107:             * @exception ProjectManagementBusinessException if an error occurs
108:             *   retrieving data (usually due to an underlying data layer
109:             *   error).
110:             */
111:            public double getRate() throws ProjectManagementBusinessException {
112:                try {
113:                    return myDO.getRate();
114:                } catch (DataObjectException ex) {
115:                    throw new ProjectManagementBusinessException(
116:                            "Error getting pay rate rate", ex);
117:                }
118:            }
119:
120:            /**
121:             * Sets the date the payrate is valid from.
122:             *
123:             * @param the date the payrate is valid from.
124:             * @exception ProjectManagementBusinessException if an error occurs
125:             *   setting the data (usually due to an underlying data layer
126:             *   error).
127:             */
128:            public void setValidFrom(Date validFrom)
129:                    throws ProjectManagementBusinessException {
130:                try {
131:                    myDO.setValidFrom(validFrom);
132:                } catch (DataObjectException ex) {
133:                    throw new ProjectManagementBusinessException(
134:                            "Error setting valid from", ex);
135:                }
136:            }
137:
138:            /**
139:             * Gets the date the payrate is valid from.
140:             *
141:             * @return the date the payrate is valid from.
142:             * @exception ProjectManagementBusinessException if an error occurs
143:             *   retrieving data (usually due to an underlying data layer
144:             *   error).
145:             */
146:            public Date getValidFrom()
147:                    throws ProjectManagementBusinessException {
148:                try {
149:                    return myDO.getValidFrom();
150:                } catch (DataObjectException ex) {
151:                    throw new ProjectManagementBusinessException(
152:                            "Error getting valid from", ex);
153:                }
154:            }
155:
156:            /**
157:             * Sets the employee for the pay rate.
158:             *
159:             * @param the employee.
160:             * @exception ProjectManagementBusinessException if an error occurs
161:             *   setting the data (usually due to an underlying data layer
162:             *   error).
163:             */
164:            public void setEmployee(Employee employee)
165:                    throws ProjectManagementBusinessException {
166:                try {
167:                    myDO.setEmployee(((EmployeeImpl) employee).getDO());
168:                } catch (DataObjectException ex) {
169:                    throw new ProjectManagementBusinessException(
170:                            "Error setting employee", ex);
171:                }
172:            }
173:
174:            /**
175:             * Gets the employee.
176:             *
177:             * @return the employee.
178:             * @exception ProjectManagementBusinessException if an error occurs
179:             *   retrieving data (usually due to an underlying data layer
180:             *   error).
181:             */
182:            public Employee getEmployee()
183:                    throws ProjectManagementBusinessException {
184:                try {
185:                    return new EmployeeImpl(myDO.getEmployee());
186:                } catch (DataObjectException ex) {
187:                    throw new ProjectManagementBusinessException(
188:                            "Error getting employee", ex);
189:                }
190:            }
191:
192:            /**
193:             * Sets the project for the pay rate.
194:             *
195:             * @param the project.
196:             * @exception ProjectManagementBusinessException if an error occurs
197:             *   setting the data (usually due to an underlying data layer
198:             *   error).
199:             */
200:            public void setProject(Project project)
201:                    throws ProjectManagementBusinessException {
202:                try {
203:                    myDO.setProject(((ProjectImpl) project).getDO());
204:                } catch (DataObjectException ex) {
205:                    throw new ProjectManagementBusinessException(
206:                            "Error setting project", ex);
207:                }
208:            }
209:
210:            /**
211:             * Gets the project.
212:             *
213:             * @return the project.
214:             * @exception ProjectManagementBusinessException if an error occurs
215:             *   retrieving data (usually due to an underlying data layer
216:             *   error).
217:             */
218:            public Project getProject()
219:                    throws ProjectManagementBusinessException {
220:                try {
221:                    return new ProjectImpl(myDO.getProject());
222:                } catch (DataObjectException ex) {
223:                    throw new ProjectManagementBusinessException(
224:                            "Error getting project", ex);
225:                }
226:            }
227:
228:            /**
229:             * Commits all changes to the database.
230:             *
231:             * @exception ProjectManagementBusinessException if an error occurs
232:             *   retrieving data (usually due to an underlying data layer
233:             *   error).
234:             */
235:            public void save() throws ProjectManagementBusinessException {
236:                try {
237:                    this .myDO.save();
238:                } catch (Exception ex) {
239:                    throw new ProjectManagementBusinessException(
240:                            "Error saving pay rate", ex);
241:                }
242:            }
243:
244:            /**
245:             * Deletes the pay rate from database.
246:             *
247:             * @exception ProjectManagementBusinessException if an error occurs
248:             *   deleting data (usually due to an underlying data layer
249:             *   error).
250:             */
251:            public void delete() throws ProjectManagementBusinessException {
252:                try {
253:                    this .myDO.delete();
254:                } catch (Exception ex) {
255:                    throw new ProjectManagementBusinessException(
256:                            "Error deleting pay rate", ex);
257:                }
258:            }
259:
260:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.