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; } }