1 // license-header java merge-point
2 /**
3 * This is only generated once! It will never be overwritten.
4 * You can (and have to!) safely modify it by hand.
5 */
6 package org.andromda.timetracker.domain;
7
8 import org.andromda.timetracker.vo.UserRoleVO;
9
10 /**
11 * @see UserRole
12 */
13 public class UserRoleDaoImpl
14 extends UserRoleDaoBase
15 {
16 /**
17 * @see UserRoleDao#toUserRoleVO(UserRole, UserRoleVO)
18 */
19 @Override
20 public void toUserRoleVO(
21 UserRole sourceEntity,
22 UserRoleVO targetVO)
23 {
24 // TODO verify behavior of toUserRoleVO
25 super.toUserRoleVO(sourceEntity, targetVO);
26 }
27
28 /**
29 * @see UserRoleDao#toUserRoleVO(UserRole)
30 */
31 @Override
32 public UserRoleVO toUserRoleVO(final UserRole entity)
33 {
34 // TODO verify behavior of toUserRoleVO
35 return super.toUserRoleVO(entity);
36 }
37
38 /**
39 * Retrieves the entity object that is associated with the specified value object
40 * from the object store. If no such entity object exists in the object store,
41 * a new, blank entity is created
42 */
43 private UserRole loadUserRoleFromUserRoleVO(UserRoleVO userRoleVO)
44 {
45 UserRole userRole = null;
46 if (userRoleVO != null && userRoleVO.getId() != null)
47 {
48 try
49 {
50 userRole = this.load(userRoleVO.getId());
51 }
52 catch (UserRoleDaoException e)
53 {
54 // ok to continue
55 }
56 }
57 if (userRole == null)
58 {
59 userRole = new UserRole();
60 }
61 return userRole;
62 }
63
64 /**
65 * @see UserRoleDao#userRoleVOToEntity(UserRoleVO)
66 */
67 @Override
68 public UserRole userRoleVOToEntity(UserRoleVO userRoleVO)
69 {
70 // TODO verify behavior of userRoleVOToEntity
71 UserRole entity = this.loadUserRoleFromUserRoleVO(userRoleVO);
72 this.userRoleVOToEntity(userRoleVO, entity, true);
73 return entity;
74 }
75
76 /**
77 * @see UserRoleDao#userRoleVOToEntity(UserRoleVO, UserRole, boolean)
78 */
79 @Override
80 public void userRoleVOToEntity(
81 UserRoleVO sourceVO,
82 UserRole targetEntity,
83 boolean copyIfNull)
84 {
85 // TODO verify behavior of userRoleVOToEntity
86 super.userRoleVOToEntity(sourceVO, targetEntity, copyIfNull);
87 }
88 }