@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof ExpandoValue)) { return false; } ExpandoValue expandoValue = (ExpandoValue) obj; long primaryKey = expandoValue.getPrimaryKey(); if (getPrimaryKey() == primaryKey) { return true; } else { return false; } }
public boolean equals(Object obj) { if (obj == null) { return false; } ExpandoValue expandoValue = null; try { expandoValue = (ExpandoValue) obj; } catch (ClassCastException cce) { return false; } long pk = expandoValue.getPrimaryKey(); if (getPrimaryKey() == pk) { return true; } else { return false; } }