Skip to content

Commit

Permalink
CTO-123 - Locks - Added max lock lift, units
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-rma committed Oct 8, 2024
1 parent 72ca681 commit 82f8579
Showing 1 changed file with 44 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import cwms.cda.data.dto.CwmsId;
import cwms.cda.data.dto.Location;
import cwms.cda.data.dto.LookupType;
import cwms.cda.data.dto.Unit;
import cwms.cda.formatters.Formats;
import cwms.cda.formatters.annotations.FormattableWith;
import cwms.cda.formatters.json.JsonV1;
Expand All @@ -45,12 +46,15 @@ public class Lock extends CwmsDTOBase {
@JsonProperty(required = true)
private final Location location;
@JsonProperty(required = true)
private final LookupType chamberLocationDescription;
private final LookupType chamberType;
private final double lockWidth;
private final double lockLength;
private final double normalLockLift;
private final double volumePerLockage;
private final double minimumDraft;
private final double maximumLockLift;
private final Unit units;
private final Unit volumeUnits;
private final CwmsId highWaterUpperPoolLocationLevel;
private final CwmsId lowWaterLowerPoolLocationLevel;
private final CwmsId highWaterLowerPoolLocationLevel;
Expand All @@ -59,7 +63,7 @@ public class Lock extends CwmsDTOBase {
private Lock(Builder builder) {
this.location = builder.location;
this.projectId = builder.projectId;
this.chamberLocationDescription = builder.locationDescription;
this.chamberType = builder.chamberType;
this.lockWidth = builder.lockWidth;
this.lockLength = builder.lockLength;
this.normalLockLift = builder.normalLockLift;
Expand All @@ -69,6 +73,9 @@ private Lock(Builder builder) {
this.lowWaterLowerPoolLocationLevel = builder.lowWaterLowerPoolLocationLevel;
this.highWaterLowerPoolLocationLevel = builder.highWaterLowerPoolLocationLevel;
this.lowWaterUpperPoolLocationLevel = builder.lowWaterUpperPoolLocationLevel;
this.maximumLockLift = builder.maximumLockLift;
this.units = builder.units;
this.volumeUnits = builder.volumeUnits;
}

public final CwmsId getProjectId() {
Expand All @@ -79,8 +86,8 @@ public final Location getLocation() {
return location;
}

public final LookupType getChamberLocationDescription() {
return chamberLocationDescription;
public final LookupType getChamberType() {
return chamberType;
}

public final double getLockWidth() {
Expand All @@ -95,6 +102,18 @@ public final double getNormalLockLift() {
return normalLockLift;
}

public final double getMaximumLockLift() {
return maximumLockLift;
}

public final Unit getUnits() {
return units;
}

public final Unit getVolumeUnits() {
return volumeUnits;
}

public final double getVolumePerLockage() {
return volumePerLockage;
}
Expand Down Expand Up @@ -122,12 +141,15 @@ public final CwmsId getLowWaterUpperPoolLocationLevel() {
public static final class Builder {
private Location location;
private CwmsId projectId;
private LookupType locationDescription;
private LookupType chamberType;
private double lockWidth;
private double lockLength;
private double normalLockLift;
private double maximumLockLift;
private double volumePerLockage;
private double minimumDraft;
private Unit units;
private Unit volumeUnits;
private CwmsId highWaterUpperPoolLocationLevel;
private CwmsId lowWaterLowerPoolLocationLevel;
private CwmsId highWaterLowerPoolLocationLevel;
Expand All @@ -143,8 +165,8 @@ public Lock.Builder withProjectId(CwmsId projectId) {
return this;
}

public Lock.Builder withLocationDescription(LookupType locationDescription) {
this.locationDescription = locationDescription;
public Lock.Builder withChamberType(LookupType chamberType) {
this.chamberType = chamberType;
return this;
}

Expand All @@ -163,6 +185,21 @@ public Lock.Builder withNormalLockLift(double normalLockLift) {
return this;
}

public Lock.Builder withMaximumLockLift(double maximumLockLift) {
this.maximumLockLift = maximumLockLift;
return this;
}

public Lock.Builder withUnit(Unit unit) {
this.units = unit;
return this;
}

public Lock.Builder withVolumeUnit(Unit volumeUnit) {
this.volumeUnits = volumeUnit;
return this;
}

public Lock.Builder withVolumePerLockage(double volumePerLockage) {
this.volumePerLockage = volumePerLockage;
return this;
Expand Down

0 comments on commit 82f8579

Please sign in to comment.