source: ComponentRegistry/trunk/ComponentRegistry/src/main/java/clarin/cmdi/componentregistry/OwnerGroup.java @ 1992

Last change on this file since 1992 was 1992, checked in by twagoo, 12 years ago

Created 'ComponentStatus?' enum and 'Owner' classes, and replaced userId in ComponentRegistry by Status and Owner properties.

Refs #142 and #143

File size: 750 bytes
Line 
1package clarin.cmdi.componentregistry;
2
3/**
4 *
5 * @author Twan Goosen <twan.goosen@mpi.nl>
6 */
7public class OwnerGroup implements Owner {
8
9    private final Number id;
10
11    public OwnerGroup(Number id) {
12        this.id = id;
13    }
14
15    @Override
16    public Number getId() {
17        return id;
18    }
19
20    @Override
21    public boolean equals(Object obj) {
22        if (obj == null) {
23            return false;
24        }
25        if (getClass() != obj.getClass()) {
26            return false;
27        }
28        final OwnerGroup other = (OwnerGroup) obj;
29        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
30            return false;
31        }
32        return true;
33    }
34
35    @Override
36    public int hashCode() {
37        int hash = 3;
38        hash = 31 * hash + (this.id != null ? this.id.hashCode() : 0);
39        return hash;
40    }
41}
Note: See TracBrowser for help on using the repository browser.