1 package com.blandware.atleap.model.core; 2 3 import java.util.Date ; 4 5 6 16 public class UserCookie extends BaseObject { 17 19 22 private Long id; 23 26 private User user; 27 30 private String cookieId; 31 34 private Date dateCreated; 35 36 38 41 public UserCookie() { 42 this.dateCreated = new Date (); 43 } 44 45 52 public Long getId() { 53 return id; 54 } 55 56 61 public void setId(Long id) { 62 this.id = id; 63 } 64 65 71 public User getUser() { 72 return user; 73 } 74 75 80 public void setUser(User user) { 81 this.user = user; 82 } 83 84 90 public String getCookieId() { 91 return cookieId; 92 } 93 94 99 public void setCookieId(String cookieId) { 100 this.cookieId = cookieId; 101 } 102 103 109 public Date getDateCreated() { 110 return dateCreated; 111 } 112 113 118 public void setDateCreated(Date dateCreated) { 119 this.dateCreated = dateCreated; 120 } 121 122 public boolean equals(Object o) { 123 if ( this == o ) { 124 return true; 125 } 126 if ( !(o instanceof UserCookie) ) { 127 return false; 128 } 129 130 final UserCookie userCookie = (UserCookie) o; 131 132 if ( cookieId != null ? !cookieId.equals(userCookie.cookieId) : userCookie.cookieId != null ) { 133 return false; 134 } 135 if ( dateCreated != null ? !dateCreated.equals(userCookie.dateCreated) : userCookie.dateCreated != null ) { 136 return false; 137 } 138 if ( user != null ? !user.equals(userCookie.user) : userCookie.user != null ) { 139 return false; 140 } 141 142 return true; 143 } 144 145 public int hashCode() { 146 int result; 147 result = (user != null ? user.hashCode() : 0); 148 result = 29 * result + (cookieId != null ? cookieId.hashCode() : 0); 149 result = 29 * result + (dateCreated != null ? dateCreated.hashCode() : 0); 150 return result; 151 } 152 153 } 154 | Popular Tags |