Ejemplo n.º 1
0
  /**
   * Compare two Insert commands for equality. Will only evaluate to equal if they are IDENTICAL:
   * group is equal, value is equal and variables are equal.
   *
   * @param obj Other object
   * @return True if equal
   */
  public boolean equals(Object obj) {
    // Quick same object test
    if (this == obj) {
      return true;
    }

    // Quick fail tests
    if (!(obj instanceof Insert)) {
      return false;
    }

    Insert other = (Insert) obj;

    return EquivalenceUtil.areEqual(getGroup(), other.getGroup())
        && EquivalenceUtil.areEqual(getValues(), other.getValues())
        && EquivalenceUtil.areEqual(getVariables(), other.getVariables())
        && sameOptionAndHint(other)
        && EquivalenceUtil.areEqual(getQueryExpression(), other.getQueryExpression());
  }
Ejemplo n.º 2
0
  /**
   * Compare two CreateUpdateProcedureCommand for equality. They will only evaluate to equal if they
   * are IDENTICAL: the commandTypes are same and the block objects are equal.
   *
   * @param obj Other object
   * @return True if equal
   */
  public boolean equals(Object obj) {
    // Quick same object test
    if (this == obj) {
      return true;
    }

    // Quick fail tests
    if (!(obj instanceof CreateProcedureCommand)) {
      return false;
    }

    CreateProcedureCommand other = (CreateProcedureCommand) obj;

    // Compare the block
    return sameOptionAndHint(other) && EquivalenceUtil.areEqual(getBlock(), other.getBlock());
  }