hs.hsadmin/hsarback/src/de/hsadmin/mods/pac/PacComponentId.java
2013-04-29 20:01:09 +02:00

54 lines
1.0 KiB
Java

package de.hsadmin.mods.pac;
import java.io.Serializable;
public class PacComponentId implements Serializable {
private static final long serialVersionUID = 1L;
private long pac;
private long basePac;
private long baseComponent;
@Override
public boolean equals(Object obj) {
if (obj != null && obj instanceof PacComponentId) {
PacComponentId other = (PacComponentId) obj;
return getPac() == other.getPac() && getBaseComponent() == other.getBaseComponent() && getBasePac() == other.getBasePac();
}
return false;
}
@Override
public int hashCode() {
return (new Long(getPac() ^ getBaseComponent() ^ getBasePac() % Integer.MAX_VALUE)).intValue();
}
public void setPac(long pacId) {
this.pac = pacId;
}
public long getPac() {
return pac;
}
public void setBaseComponent(long baseComponentId) {
this.baseComponent = baseComponentId;
}
public long getBaseComponent() {
return baseComponent;
}
public void setBasePac(long basePacId) {
this.basePac = basePacId;
}
public long getBasePac() {
return basePac;
}
}