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 {
|
|
|
|
|
|
|
|
private static final long serialVersionUID = -3018368675798315892L;
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|