1 22 43 package org.jboss.test.hibernate.model; 44 45 import java.io.Serializable ; 46 import java.util.Calendar ; 47 48 54 public class UserRole implements Serializable { 55 private User user; 56 private Role role; 57 private Calendar timeOfCreation; 58 59 private UserRole() {} 60 61 public UserRole(User user, Role role) { 62 this.user = user; 63 this.role = role; 64 this.timeOfCreation = Calendar.getInstance(); 65 } 66 67 public Role getRole() { 68 return role; 69 } 70 71 public void setRole(Role role) { 72 this.role = role; 73 } 74 75 public Calendar getTimeOfCreation() { 76 return timeOfCreation; 77 } 78 79 public void setTimeOfCreation(Calendar timeOfCreation) { 80 this.timeOfCreation = timeOfCreation; 81 } 82 83 public User getUser() { 84 return user; 85 } 86 87 public void setUser(User user) { 88 this.user = user; 89 } 90 91 } 92 93 | Popular Tags |