Skip to content

Commit

Permalink
Merge pull request #170 from orkes-io/fix/schedule_zone_id_field
Browse files Browse the repository at this point in the history
Added record-style setter for `zoneId`
  • Loading branch information
jmigueprieto authored Aug 8, 2024
2 parents 02e7724 + 5af3cae commit 65832de
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,15 @@ public String getZoneId() {
return zoneId;
}

public SaveScheduleRequest setZoneId(String zoneId) {
public void setZoneId(String zoneId) {
this.zoneId = zoneId;
}

public SaveScheduleRequest zoneId(String zoneId) {
this.zoneId = zoneId;
return this;
}

@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -250,7 +255,8 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.scheduleStartTime, saveScheduleRequest.scheduleStartTime)
&& Objects.equals(
this.startWorkflowRequest, saveScheduleRequest.startWorkflowRequest)
&& Objects.equals(this.updatedBy, saveScheduleRequest.updatedBy);
&& Objects.equals(this.updatedBy, saveScheduleRequest.updatedBy)
&& Objects.equals(this.zoneId, saveScheduleRequest.zoneId);
}

@Override
Expand All @@ -264,7 +270,8 @@ public int hashCode() {
scheduleEndTime,
scheduleStartTime,
startWorkflowRequest,
updatedBy);
updatedBy,
zoneId);
}

@Override
Expand All @@ -287,6 +294,7 @@ public String toString() {
.append(toIndentedString(startWorkflowRequest))
.append("\n");
sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
sb.append(" zoneId: ").append(toIndentedString(zoneId)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,16 @@ public String getZoneId() {
return zoneId;
}

public WorkflowSchedule setZoneId(String zoneId) {
public void setZoneId(String zoneId) {
this.zoneId = zoneId;
}

public WorkflowSchedule zoneId(String zoneId) {
this.zoneId = zoneId;
return this;
}

//TODO this should be autogenerated (with Lombok)
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -296,9 +301,11 @@ public boolean equals(java.lang.Object o) {
&& Objects.equals(this.scheduleStartTime, workflowSchedule.scheduleStartTime)
&& Objects.equals(this.startWorkflowRequest, workflowSchedule.startWorkflowRequest)
&& Objects.equals(this.updatedBy, workflowSchedule.updatedBy)
&& Objects.equals(this.updatedTime, workflowSchedule.updatedTime);
&& Objects.equals(this.updatedTime, workflowSchedule.updatedTime)
&& Objects.equals(this.zoneId, workflowSchedule.zoneId);
}

//TODO this should be autogenerated (with Lombok)
@Override
public int hashCode() {
return Objects.hash(
Expand All @@ -312,9 +319,11 @@ public int hashCode() {
scheduleStartTime,
startWorkflowRequest,
updatedBy,
updatedTime);
updatedTime,
zoneId);
}

//TODO this should be autogenerated (with Lombok)
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand All @@ -337,6 +346,7 @@ public String toString() {
.append("\n");
sb.append(" updatedBy: ").append(toIndentedString(updatedBy)).append("\n");
sb.append(" updatedTime: ").append(toIndentedString(updatedTime)).append("\n");
sb.append(" zoneId: ").append(toIndentedString(zoneId)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void testTimeZoneId() {
.name(NAME)
.cronExpression(CRON_EXPRESSION)
.startWorkflowRequest(Commons.getStartWorkflowRequest())
.setZoneId("Europe/Madrid");
.zoneId("Europe/Madrid");
schedulerClient.saveSchedule(schedule);
var savedSchedule = schedulerClient.getSchedule(NAME);
assertEquals("Europe/Madrid", savedSchedule.getZoneId());
Expand Down

0 comments on commit 65832de

Please sign in to comment.