Source Code Cross Referenced for UserDaoImpl.java in  » UML » AndroMDA-3.2 » org » andromda » timetracker » domain » 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 » UML » AndroMDA 3.2 » org.andromda.timetracker.domain 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // license-header java merge-point
002:        /**
003:         * This is only generated once! It will never be overwritten.
004:         * You can (and have to!) safely modify it by hand.
005:         */package org.andromda.timetracker.domain;
006:
007:        import java.util.Collection;
008:
009:        import org.andromda.timetracker.vo.UserRoleVO;
010:
011:        /**
012:         * @see org.andromda.timetracker.domain.User
013:         */
014:        public class UserDaoImpl extends
015:                org.andromda.timetracker.domain.UserDaoBase {
016:            /**
017:             * @see org.andromda.timetracker.domain.UserDao#toUserVO(org.andromda.timetracker.domain.User, org.andromda.timetracker.vo.UserVO)
018:             */
019:            public void toUserVO(
020:                    org.andromda.timetracker.domain.User sourceEntity,
021:                    org.andromda.timetracker.vo.UserVO targetVO) {
022:                // @todo verify behavior of toUserVO
023:                super .toUserVO(sourceEntity, targetVO);
024:            }
025:
026:            /**
027:             * @see org.andromda.timetracker.domain.UserDao#toUserVO(org.andromda.timetracker.domain.User)
028:             */
029:            public org.andromda.timetracker.vo.UserVO toUserVO(
030:                    final org.andromda.timetracker.domain.User entity) {
031:                // @todo verify behavior of toUserVO
032:                return super .toUserVO(entity);
033:            }
034:
035:            /**
036:             * Retrieves the entity object that is associated with the specified value object
037:             * from the object store. If no such entity object exists in the object store,
038:             * a new, blank entity is created
039:             */
040:            private org.andromda.timetracker.domain.User loadUserFromUserVO(
041:                    org.andromda.timetracker.vo.UserVO userVO) {
042:                // @todo implement loadUserFromUserVO
043:                throw new java.lang.UnsupportedOperationException(
044:                        "org.andromda.timetracker.domain.loadUserFromUserVO(org.andromda.timetracker.vo.UserVO) not yet implemented.");
045:
046:                /* A typical implementation looks like this:
047:                org.andromda.timetracker.domain.User user = this.load(userVO.getId());
048:                if (user == null)
049:                {
050:                    user = org.andromda.timetracker.domain.User.Factory.newInstance();
051:                }
052:                return user;
053:                 */
054:            }
055:
056:            /**
057:             * @see org.andromda.timetracker.domain.UserDao#userVOToEntity(org.andromda.timetracker.vo.UserVO)
058:             */
059:            public org.andromda.timetracker.domain.User userVOToEntity(
060:                    org.andromda.timetracker.vo.UserVO userVO) {
061:                // @todo verify behavior of userVOToEntity
062:                org.andromda.timetracker.domain.User entity = this 
063:                        .loadUserFromUserVO(userVO);
064:                this .userVOToEntity(userVO, entity, true);
065:                return entity;
066:            }
067:
068:            /**
069:             * @see org.andromda.timetracker.domain.UserDao#userVOToEntity(org.andromda.timetracker.vo.UserVO, org.andromda.timetracker.domain.User)
070:             */
071:            public void userVOToEntity(
072:                    org.andromda.timetracker.vo.UserVO sourceVO,
073:                    org.andromda.timetracker.domain.User targetEntity,
074:                    boolean copyIfNull) {
075:                // @todo verify behavior of userVOToEntity
076:                super .userVOToEntity(sourceVO, targetEntity, copyIfNull);
077:            }
078:
079:            /**
080:             * @see org.andromda.timetracker.domain.UserDao#toUserDetailsVO(org.andromda.timetracker.domain.User, org.andromda.timetracker.vo.UserDetailsVO)
081:             */
082:            public void toUserDetailsVO(
083:                    org.andromda.timetracker.domain.User sourceEntity,
084:                    org.andromda.timetracker.vo.UserDetailsVO targetVO) {
085:                super .toUserDetailsVO(sourceEntity, targetVO);
086:
087:                // Convert roles
088:                Collection srcRoles = sourceEntity.getRoles();
089:                UserRoleVO[] targetRoles = new UserRoleVO[srcRoles.size()];
090:                int i = 0;
091:                for (Object srcRole : srcRoles) {
092:                    targetRoles[i] = getUserRoleDao().toUserRoleVO(
093:                            (UserRole) srcRole);
094:                    i++;
095:                }
096:                targetVO.setRoles(targetRoles);
097:            }
098:
099:            /**
100:             * @see org.andromda.timetracker.domain.UserDao#toUserDetailsVO(org.andromda.timetracker.domain.User)
101:             */
102:            public org.andromda.timetracker.vo.UserDetailsVO toUserDetailsVO(
103:                    final org.andromda.timetracker.domain.User entity) {
104:                // @todo verify behavior of toUserDetailsVO
105:                return super .toUserDetailsVO(entity);
106:            }
107:
108:            /**
109:             * Retrieves the entity object that is associated with the specified value object
110:             * from the object store. If no such entity object exists in the object store,
111:             * a new, blank entity is created
112:             */
113:            private org.andromda.timetracker.domain.User loadUserFromUserDetailsVO(
114:                    org.andromda.timetracker.vo.UserDetailsVO userDetailsVO) {
115:                // @todo implement loadUserFromUserDetailsVO
116:                throw new java.lang.UnsupportedOperationException(
117:                        "org.andromda.timetracker.domain.loadUserFromUserDetailsVO(org.andromda.timetracker.vo.UserDetailsVO) not yet implemented.");
118:
119:                /* A typical implementation looks like this:
120:                org.andromda.timetracker.domain.User user = this.load(userDetailsVO.getId());
121:                if (user == null)
122:                {
123:                    user = org.andromda.timetracker.domain.User.Factory.newInstance();
124:                }
125:                return user;
126:                 */
127:            }
128:
129:            /**
130:             * @see org.andromda.timetracker.domain.UserDao#userDetailsVOToEntity(org.andromda.timetracker.vo.UserDetailsVO)
131:             */
132:            public org.andromda.timetracker.domain.User userDetailsVOToEntity(
133:                    org.andromda.timetracker.vo.UserDetailsVO userDetailsVO) {
134:                // @todo verify behavior of userDetailsVOToEntity
135:                org.andromda.timetracker.domain.User entity = this 
136:                        .loadUserFromUserDetailsVO(userDetailsVO);
137:                this .userDetailsVOToEntity(userDetailsVO, entity, true);
138:                return entity;
139:            }
140:
141:            /**
142:             * @see org.andromda.timetracker.domain.UserDao#userDetailsVOToEntity(org.andromda.timetracker.vo.UserDetailsVO, org.andromda.timetracker.domain.User)
143:             */
144:            public void userDetailsVOToEntity(
145:                    org.andromda.timetracker.vo.UserDetailsVO sourceVO,
146:                    org.andromda.timetracker.domain.User targetEntity,
147:                    boolean copyIfNull) {
148:                // @todo verify behavior of userDetailsVOToEntity
149:                super .userDetailsVOToEntity(sourceVO, targetEntity, copyIfNull);
150:            }
151:
152:            protected User handleGetUserDetails(String username)
153:                    throws Exception {
154:
155:                User user = (User) getSession()
156:                        .createQuery(
157:                                "from org.andromda.timetracker.domain.User user left join fetch user.roles where user.username = :username")
158:                        .setParameter("username", username).uniqueResult();
159:                return user;
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.