1 package org.hibernate.test.collection; 3 4 7 public class Permission { 8 private String type; 9 Permission() {} 10 public String getType() { 11 return type; 12 } 13 public void setType(String type) { 14 this.type = type; 15 } 16 public Permission(String type) { 17 this.type = type; 18 } 19 public boolean equals(Object that) { 20 if ( !(that instanceof Permission) ) return false; 21 Permission p = (Permission) that; 22 return this.type.equals(p.type); 23 } 24 public int hashCode() { 25 return type.hashCode(); 26 } 27 } 28 | Popular Tags |