1 package com.atlassian.user.impl.hibernate;
2
3 import com.atlassian.user.impl.DefaultEntity;
4 import com.atlassian.user.ExternalEntity;
5
6 import java.util.Set;
7
8 public class DefaultHibernateExternalEntity extends DefaultEntity implements ExternalEntity
9 {
10 protected String type;
11 private Set groups;
12 private long id;
13
14 public DefaultHibernateExternalEntity(){}
15
16 public String getType()
17 {
18 return type;
19 }
20
21 public void setType(String type)
22 {
23 this.type = type;
24 }
25
26 public Set getGroups()
27 {
28 return groups;
29 }
30
31 public void setGroups(Set groups)
32 {
33 this.groups = groups;
34 }
35
36 public long getId()
37 {
38 return id;
39 }
40
41 public void setId(long id)
42 {
43 this.id = id;
44 }
45
46 public boolean equals(Object o)
47 {
48 if (this == o) return true;
49 if (!(o instanceof DefaultHibernateExternalEntity)) return false;
50 if (!super.equals(o)) return false;
51
52 final DefaultHibernateExternalEntity defaultHibernateExternalEntity = (DefaultHibernateExternalEntity) o;
53
54 if (id != defaultHibernateExternalEntity.id) return false;
55 if (type != null ? !type.equals(defaultHibernateExternalEntity.type) : defaultHibernateExternalEntity.type != null) return false;
56
57 return true;
58 }
59
60 public int hashCode()
61 {
62 int result = super.hashCode();
63 result = 29 * result + (type != null ? type.hashCode() : 0);
64 result = 29 * result + (int) (id ^ (id >>> 32));
65 return result;
66 }
67 }