KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > collection > Permission


1 //$Id: Permission.java,v 1.2 2005/02/12 07:27:21 steveebersole Exp $
2
package org.hibernate.test.collection;
3
4 /**
5  * @author Gavin King
6  */

7 public class Permission {
8     private String JavaDoc type;
9     Permission() {}
10     public String JavaDoc getType() {
11         return type;
12     }
13     public void setType(String JavaDoc type) {
14         this.type = type;
15     }
16     public Permission(String JavaDoc type) {
17         this.type = type;
18     }
19     public boolean equals(Object JavaDoc 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