diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/Form.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/Form.java index 783015148c..451c39d333 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/Form.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/Form.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.ClassToInstanceMap; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NonNull; import lombok.Setter; @@ -21,6 +22,7 @@ /** * API representation of a form query. */ +@EqualsAndHashCode public abstract class Form implements QueryDescription { /** @@ -30,6 +32,7 @@ public abstract class Form implements QueryDescription { @Nullable @Getter @Setter + @EqualsAndHashCode.Exclude private JsonNode values; @JsonIgnore diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/AbsoluteMode.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/AbsoluteMode.java index 1b7e00d556..c71dbd788c 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/AbsoluteMode.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/AbsoluteMode.java @@ -18,12 +18,14 @@ import com.bakdata.conquery.models.query.QueryResolveContext; import com.bakdata.conquery.models.query.Visitable; import com.fasterxml.jackson.annotation.JsonView; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @Getter @Setter @CPSType(id = "ABSOLUTE", base = Mode.class) +@EqualsAndHashCode(callSuper = true, doNotUseGetters = true) public class AbsoluteMode extends Mode { @NotNull @Valid @@ -35,6 +37,7 @@ public class AbsoluteMode extends Mode { @JsonView(View.InternalCommunication.class) + @EqualsAndHashCode.Exclude private ArrayConceptQuery resolvedFeatures; @Override diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/EntityDateMode.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/EntityDateMode.java index 619c5668db..a7223e4e69 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/EntityDateMode.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/EntityDateMode.java @@ -19,6 +19,7 @@ import com.bakdata.conquery.models.query.QueryResolveContext; import com.bakdata.conquery.models.query.Visitable; import com.fasterxml.jackson.annotation.JsonView; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -43,6 +44,7 @@ public void visit(Consumer visitor) { @JsonView(View.InternalCommunication.class) + @EqualsAndHashCode.Exclude private ArrayConceptQuery resolvedFeatures; @Override diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/ExportForm.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/ExportForm.java index 7021a7d74e..381e4bf70d 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/ExportForm.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/ExportForm.java @@ -39,6 +39,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import lombok.AccessLevel; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; @@ -46,6 +47,7 @@ @Getter @Setter @CPSType(id = "EXPORT_FORM", base = QueryDescription.class) +@EqualsAndHashCode(callSuper = true) public class ExportForm extends Form implements InternalForm { @NotNull @@ -53,6 +55,7 @@ public class ExportForm extends Form implements InternalForm { private ManagedExecutionId queryGroupId; @JsonIgnore + @EqualsAndHashCode.Exclude private ManagedQuery queryGroup; @NotNull @@ -61,6 +64,7 @@ public class ExportForm extends Form implements InternalForm { private Mode timeMode; @NotEmpty + @Valid private List features = ImmutableList.of(); @NotNull @@ -70,8 +74,10 @@ public class ExportForm extends Form implements InternalForm { private boolean alsoCreateCoarserSubdivisions = false; @JsonIgnore + @EqualsAndHashCode.Exclude private Query prerequisite; @JsonIgnore + @EqualsAndHashCode.Exclude private List resolvedResolutions; @Override public void visit(Consumer visitor) { diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/Mode.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/Mode.java index c44b6d525a..56243c6db2 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/Mode.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/Mode.java @@ -6,16 +6,19 @@ import com.bakdata.conquery.models.query.Visitable; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.PROPERTY, property = "value") @CPSBase +@EqualsAndHashCode public abstract class Mode implements Visitable { @Getter @Setter @JsonBackReference + @EqualsAndHashCode.Exclude private ExportForm form; public abstract void resolve(QueryResolveContext context); diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/RelativeMode.java b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/RelativeMode.java index 9c4d0f24e6..07c5007341 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/RelativeMode.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/forms/export_form/RelativeMode.java @@ -17,11 +17,13 @@ import com.bakdata.conquery.models.query.QueryResolveContext; import com.bakdata.conquery.models.query.Visitable; import com.fasterxml.jackson.annotation.JsonView; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @Getter @Setter -@CPSType(id="RELATIVE", base=Mode.class) +@CPSType(id = "RELATIVE", base = Mode.class) +@EqualsAndHashCode(callSuper = true) public class RelativeMode extends Mode { @NotNull private CalendarUnit timeUnit; @@ -36,6 +38,7 @@ public class RelativeMode extends Mode { @JsonView(View.InternalCommunication.class) + @EqualsAndHashCode.Exclude private ArrayConceptQuery resolvedFeatures; @Override diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/query/CQElement.java b/backend/src/main/java/com/bakdata/conquery/apiv1/query/CQElement.java index 6f4a9fe289..704e672cb8 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/query/CQElement.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/query/CQElement.java @@ -23,11 +23,13 @@ import com.bakdata.conquery.models.query.resultinfo.ResultInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, property = "type") @CPSBase +@EqualsAndHashCode public abstract class CQElement implements Visitable { /** diff --git a/backend/src/main/java/com/bakdata/conquery/apiv1/query/concept/filter/CQTable.java b/backend/src/main/java/com/bakdata/conquery/apiv1/query/concept/filter/CQTable.java index 52a17dd036..bea2268426 100644 --- a/backend/src/main/java/com/bakdata/conquery/apiv1/query/concept/filter/CQTable.java +++ b/backend/src/main/java/com/bakdata/conquery/apiv1/query/concept/filter/CQTable.java @@ -18,6 +18,7 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import io.dropwizard.validation.ValidationMethod; +import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; import lombok.ToString; @@ -25,6 +26,7 @@ @Getter @Setter @ToString(exclude = "concept") +@EqualsAndHashCode public class CQTable { @Valid @NotNull @@ -35,6 +37,7 @@ public class CQTable { private List