Example #1
0
 public int hashCode() {
   int result;
   result = (id != null ? id.hashCode() : 0);
   result = 31 * result + (stamp != null ? stamp.hashCode() : 0);
   result = 31 * result + (budget != null ? budget.hashCode() : 0);
   result = 31 * result + (name != null ? name.hashCode() : 0);
   result = 31 * result + (type != null ? type.ordinal() : 0);
   result = 31 * result + (refernceDate != null ? refernceDate.toString().hashCode() : 0);
   return result;
 }
Example #2
0
  @SuppressWarnings({"RedundantIfStatement"})
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    AllocationSetting allocationSetting = (AllocationSetting) o;

    if (budget != null
        ? !budget.equals(allocationSetting.budget)
        : allocationSetting.budget != null) return false;
    if (id != null ? !id.equals(allocationSetting.id) : allocationSetting.id != null) return false;
    if (name != null ? !name.equals(allocationSetting.name) : allocationSetting.name != null)
      return false;
    if (refernceDate != null
        ? !refernceDate.equals(allocationSetting.refernceDate)
        : allocationSetting.refernceDate != null) return false;
    if (stamp != null ? !stamp.equals(allocationSetting.stamp) : allocationSetting.stamp != null)
      return false;
    if (type.ordinal() != allocationSetting.type.ordinal()) return false;

    return true;
  }
Example #3
0
 public String toString() {
   return MessageFormat.format("{0}:{2}@{3}", name, type.toString(), budget.toString());
 }