hs.hsadmin/hsarback/src/de/hsadmin/mods/pac/PacComponentId.java

54 lines
1.1 KiB
Java
Raw Normal View History

2010-10-01 21:52:51 +02:00
package de.hsadmin.mods.pac;
2011-03-22 23:02:06 +01:00
import java.io.Serializable;
2010-10-01 21:52:51 +02:00
2011-03-22 23:02:06 +01:00
public class PacComponentId implements Serializable {
2011-07-07 17:12:56 +02:00
private static final long serialVersionUID = 1L;
2011-03-22 23:02:06 +01:00
private long pacId;
private long basePacId;
private long baseComponentId;
2010-10-01 21:52:51 +02:00
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof PacComponentId) {
PacComponentId other = (PacComponentId) obj;
2011-03-22 23:02:06 +01:00
return getPacId() == other.getPacId() && getBaseComponentId() == other.getBaseComponentId() && getBasePacId() == other.getBasePacId();
2010-10-01 21:52:51 +02:00
}
return false;
}
@Override
public int hashCode() {
2011-03-22 23:02:06 +01:00
return (new Long(getPacId() ^ getBaseComponentId() ^ getBasePacId() % Integer.MAX_VALUE)).intValue();
}
public void setPacId(long pacId) {
this.pacId = pacId;
}
public long getPacId() {
return pacId;
}
public void setBaseComponentId(long baseComponentId) {
this.baseComponentId = baseComponentId;
}
public long getBaseComponentId() {
return baseComponentId;
}
public void setBasePacId(long basePacId) {
this.basePacId = basePacId;
}
public long getBasePacId() {
return basePacId;
2010-10-01 21:52:51 +02:00
}
}