From d213cc33423bcc1d9e59a615b76ec70b80d7c4ec Mon Sep 17 00:00:00 2001 From: Scott Macdonald <57190223+scmacdon@users.noreply.github.com> Date: Fri, 28 Oct 2022 06:25:16 -0400 Subject: [PATCH] Update Readme.md --- .../CreatingSpringRedshiftRest/Readme.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/javav2/usecases/CreatingSpringRedshiftRest/Readme.md b/javav2/usecases/CreatingSpringRedshiftRest/Readme.md index e7d7ada7bde..5b56c653f3e 100644 --- a/javav2/usecases/CreatingSpringRedshiftRest/Readme.md +++ b/javav2/usecases/CreatingSpringRedshiftRest/Readme.md @@ -668,11 +668,17 @@ public class WorkItem { private String date; private String description; private String status; + private boolean archived ; public static WorkItem from(List fields) { var item = new WorkItem(); - for (int i = 0; i <= 5; i++) { - String value = fields.get(i).stringValue(); + for (int i = 0; i <= 6; i++) { + String value=""; + boolean val = false; + value = fields.get(i).stringValue(); + if (i == 6) + val = fields.get(i).booleanValue(); + switch (i) { case 0: item.setId(value); @@ -692,11 +698,22 @@ public class WorkItem { case 5: item.setName(value); break; + case 6: + item.setArchived(val); + break; } } return item; } + public boolean getArchived() { + return this.archived; + } + + public void setArchived(boolean archived) { + this.archived = archived; + } + public void setId(String id) { this.id = id; }