1 package org.hibernate.test.lob; 3 4 import java.io.Serializable ; 5 6 11 public class User implements Serializable { 12 private Long id; 13 private String handle; 14 private String password; 15 private Name name; 16 private String email; 17 private Serializable serialData; 18 19 public String getHandle() { 20 return handle; 21 } 22 23 public void setHandle(String handle) { 24 this.handle = handle; 25 } 26 27 public Long getId() { 28 return id; 29 } 30 31 protected void setId(Long id) { 32 this.id = id; 33 } 34 35 public Name getName() { 36 return name; 37 } 38 39 public void setName(Name name) { 40 this.name = name; 41 } 42 43 public String getPassword() { 44 return password; 45 } 46 47 public void setPassword(String password) { 48 this.password = password; 49 } 50 51 public String getEmail() { 52 return email; 53 } 54 55 public void setEmail(String email) { 56 this.email = email; 57 } 58 59 public boolean equals(Object other) { 60 if (other==null) return false; 61 if ( !(other instanceof User) ) return false; 62 return ( (User) other ).getHandle().equals(handle); 63 } 64 65 public int hashCode() { 66 return handle.hashCode(); 67 } 68 69 70 public Serializable getSerialData() 71 { 72 return serialData; 73 } 74 75 public void setSerialData(Serializable serialData) 76 { 77 this.serialData = serialData; 78 } 79 } 80 | Popular Tags |