01: /*
02: * $Id: Assignment.java 986 2007-05-03 08:09:24Z hengels $
03: * (c) Copyright 2004 con:cern development team.
04: *
05: * This file is part of con:cern (http://concern.org).
06: *
07: * con:cern is free software; you can redistribute it and/or modify
08: * it under the terms of the GNU Lesser General Public License
09: * as published by the Free Software Foundation; either version 2.1
10: * of the License, or (at your option) any later version.
11: *
12: * Please see COPYING for the complete licence.
13: */
14: package org.concern.controller;
15:
16: /**
17: * @author hengels
18: * @version $Revision: 986 $
19: */
20: public class Assignment {
21: protected Integer id;
22: protected String assignee;
23:
24: public Assignment() {
25: }
26:
27: public Assignment(String assignee) {
28: this .assignee = assignee;
29: }
30:
31: public Integer getId() {
32: return id;
33: }
34:
35: public void setId(Integer id) {
36: this .id = id;
37: }
38:
39: public String getAssignee() {
40: return assignee;
41: }
42:
43: public void setAssignee(String assignee) {
44: this .assignee = assignee;
45: }
46:
47: public boolean equals(Object o) {
48: if (this == o)
49: return true;
50: if (!(o instanceof Assignment))
51: return false;
52:
53: final Assignment assignment = (Assignment) o;
54:
55: if (!assignee.equals(assignment.assignee))
56: return false;
57:
58: return true;
59: }
60:
61: public int hashCode() {
62: return assignee != null ? assignee.hashCode() : 0;
63: }
64:
65: public String toString() {
66: return assignee;
67: }
68: }
|