@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DDMStructureLayout)) { return false; } DDMStructureLayout ddmStructureLayout = (DDMStructureLayout) obj; long primaryKey = ddmStructureLayout.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }
@Override public int compareTo(DDMStructureLayout ddmStructureLayout) { long primaryKey = ddmStructureLayout.getPrimaryKey(); if (getPrimaryKey() < primaryKey) { return -1; } else if (getPrimaryKey() > primaryKey) { return 1; } else { return 0; } }