Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AER-2710 Fix json serialisation #248

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.util.HashSet;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonProperty;

import nl.overheid.aerius.shared.domain.Substance;
import nl.overheid.aerius.shared.domain.result.EmissionResultKey;

Expand All @@ -29,7 +31,7 @@
*/
public class CalculationSetOptions implements Serializable {

private static final long serialVersionUID = 4L;
private static final long serialVersionUID = 5L;

private int calculationSetOptionsId;
private CalculationMethod calculationMethod = CalculationMethod.FORMAL_ASSESSMENT;
Expand All @@ -38,7 +40,7 @@ public class CalculationSetOptions implements Serializable {
private boolean useInCombinationArchive;
private final ArrayList<Substance> substances = new ArrayList<>();
private final Set<EmissionResultKey> emissionResultKeys = new HashSet<>();
private OwN2000CalculationOptions own2000CalculationOptions = new WNBCalculationOptions();
private WNBCalculationOptions owN2000CalculationOptions = new WNBCalculationOptions();
private RBLCalculationOptions rblCalculationOptions = new RBLCalculationOptions();
private NCACalculationOptions ncaCalculationOptions = new NCACalculationOptions();
private Serializable experimentalOptions;
Expand Down Expand Up @@ -135,15 +137,16 @@ public void setConnectSuppliedOptions(final ConnectSuppliedOptions connectSuppli
}

public OwN2000CalculationOptions getOwN2000CalculationOptions() {
return own2000CalculationOptions;
return owN2000CalculationOptions;
}

/**
* @deprecated replace calls with {@link #getOwN2000CalculationOptions()}
*/
@Deprecated
@JsonProperty("owN2000CalculationOptions")
Hilbrand marked this conversation as resolved.
Show resolved Hide resolved
public WNBCalculationOptions getWnbCalculationOptions() {
return (WNBCalculationOptions) own2000CalculationOptions;
return owN2000CalculationOptions;
}

public RBLCalculationOptions getRblCalculationOptions() {
Expand Down Expand Up @@ -172,7 +175,7 @@ public void setExperimentalOptions(final Serializable experimentalOptions) {
public String toString() {
return "CalculationSetOptions [calculationSetOptionsId=" + calculationSetOptionsId + ", calculationMethod=" + calculationMethod
+ ", calculateMaximumRange=" + calculateMaximumRange + ", substances=" + substances + ", emissionResultKeys=" + emissionResultKeys
+ ", stacking=" + stacking + ", connectSuppliedOptions=" + connectSuppliedOptions + ", own2000CalculationOptions=" + own2000CalculationOptions
+ ", stacking=" + stacking + ", connectSuppliedOptions=" + connectSuppliedOptions + ", own2000CalculationOptions=" + owN2000CalculationOptions
+ ", rblCalculationOptions=" + rblCalculationOptions + ", ncaCalculationOptions=" + ncaCalculationOptions + "]";
}
}
Loading