コード例 #1
0
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }

    if (!(obj instanceof KaleoNotification)) {
      return false;
    }

    KaleoNotification kaleoNotification = (KaleoNotification) obj;

    long primaryKey = kaleoNotification.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }
コード例 #2
0
  @Override
  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }

    KaleoNotification kaleoNotification = null;

    try {
      kaleoNotification = (KaleoNotification) obj;
    } catch (ClassCastException cce) {
      return false;
    }

    long primaryKey = kaleoNotification.getPrimaryKey();

    if (getPrimaryKey() == primaryKey) {
      return true;
    } else {
      return false;
    }
  }