/*
* $Id: AssignmentEvent.java 524 2005-09-20 11:16:02Z hengels $
* (c) Copyright 2004 con:cern development team.
*
* This file is part of con:cern (http://concern.org).
*
* con:cern is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* Please see COPYING for the complete licence.
*/
package org.concern;
import java.util.*;
/**
* @author hengels
* @version $Revision: 524 $
*/
public class AssignmentEvent
extends EventObject
{
String process;
String activity;
String subjectId;
String assignee;
int level;
public AssignmentEvent(Object source, String process, String activity, String subjectId, String assignee, int level) {
super(source);
this.process = process;
this.activity = activity;
this.subjectId = subjectId;
this.assignee = assignee;
this.level = level;
}
public String getProcess() {
return process;
}
public String getActivity() {
return activity;
}
public String getSubjectId() {
return subjectId;
}
public String getAssignee() {
return assignee;
}
public int getLevel() {
return level;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
final AssignmentEvent event = (AssignmentEvent)o;
if (level != event.level) return false;
if (!activity.equals(event.activity)) return false;
if (!assignee.equals(event.assignee)) return false;
if (!process.equals(event.process)) return false;
if (!subjectId.equals(event.subjectId)) return false;
return true;
}
public int hashCode() {
int result;
result = process.hashCode();
result = 29 * result + activity.hashCode();
result = 29 * result + subjectId.hashCode();
result = 29 * result + assignee.hashCode();
result = 29 * result + level;
return result;
}
public String toString() {
return process + ":" + activity + ":" + subjectId + " -> " + assignee;
}
}
|