@Test public void testEquals() { List<Condition> conditions = Stream.of( new Condition("string_column", Function.INCLUDES, Atom.string("A string")), new Condition("integer_column", Function.LESS_THAN, Atom.integer(42)), new Condition("bool_column", Function.EQUALS, Atom.bool(true)), new Condition("uuid_column", Function.NOT_EQUALS, Atom.uuid(uuid)), new Condition("named-uuid_column", Function.EXCLUDES, Atom.namedUuid("uuid-name")), new Condition("map_column", Function.GREATER_THAN_OR_EQUALS, new Map<>(ImmutableList.of(new Pair<>(Atom.string("key"), Atom.string("value")))) ), new Condition("set_column", Function.LESS_THAN_OR_EQUALS, new Set(ImmutableSet.of(Atom.string("value1"), Atom.string("value2"))) ) ).collect(Collectors.toList()); new EqualsTester().addEqualityGroup(delete, new Delete("Logical_Switch", conditions)).testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Delete)) { return false; } Delete that = (Delete) other; return Objects.equals(table, that.getTable()) && Objects.equals(conditions, that.getWhere()); }
Delete extends Operation { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Delete)) { return false; } Delete that = (Delete) other; return Objects.equals(table, that.getTable()) && Objects.equals(conditions, that.getWhere()); } }
Delete extends Operation { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Delete)) { return false; } Delete that = (Delete) other; return Objects.equals(table, that.getTable()) && Objects.equals(conditions, that.getWhere()); } Delete(String table);  Delete(String table, List<Condition> conditions); }
Delete extends Operation { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Delete)) { return false; } Delete that = (Delete) other; return Objects.equals(table, that.getTable()) && Objects.equals(conditions, that.getWhere()); } Delete(String table);  Delete(String table, List<Condition> conditions); Delete where(String column, Function function, Value value); Delete where(String column, Function function, String string); Delete where(String column, Function function, long integer); Delete where(String column, Function function, boolean bool); Delete where(String column, Function function, Uuid uuid); Delete where(String column, Function function, NamedUuid namedUuid); Delete where(
      String column, Function function, java.util.Map<K, V> map
  ); Delete where(
      String column, Function function, java.util.Set<T> set
  ); String getTable(); List<Condition> getWhere(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
Delete extends Operation { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Delete)) { return false; } Delete that = (Delete) other; return Objects.equals(table, that.getTable()) && Objects.equals(conditions, that.getWhere()); } Delete(String table);  Delete(String table, List<Condition> conditions); Delete where(String column, Function function, Value value); Delete where(String column, Function function, String string); Delete where(String column, Function function, long integer); Delete where(String column, Function function, boolean bool); Delete where(String column, Function function, Uuid uuid); Delete where(String column, Function function, NamedUuid namedUuid); Delete where(
      String column, Function function, java.util.Map<K, V> map
  ); Delete where(
      String column, Function function, java.util.Set<T> set
  ); String getTable(); List<Condition> getWhere(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }