@Override public boolean equals(Object obj) { if (obj == null) { return false; } DefinitionClp definition = null; try { definition = (DefinitionClp) obj; } catch (ClassCastException cce) { return false; } long primaryKey = definition.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }
@Override public Object clone() { DefinitionClp clone = new DefinitionClp(); clone.setDefinitionId(getDefinitionId()); clone.setGroupId(getGroupId()); clone.setCompanyId(getCompanyId()); clone.setUserId(getUserId()); clone.setUserName(getUserName()); clone.setCreateDate(getCreateDate()); clone.setModifiedDate(getModifiedDate()); clone.setTypeId(getTypeId()); clone.setManufacturer(getManufacturer()); clone.setModel(getModel()); clone.setOrderDate(getOrderDate()); clone.setQuantity(getQuantity()); clone.setPrice(getPrice()); return clone; }