From 683ef6941801c663947e9b75c7f44e3e20cb693b Mon Sep 17 00:00:00 2001 From: mattbradburyr3 Date: Sun, 29 Jan 2023 19:47:09 +0000 Subject: [PATCH] tidied getChatFlowArgs --- .../workflows/ChatStateResults.java | 39 ++++++++++--------- .../workflows/GetChatFlowArgs.java | 22 ++++++----- .../utxoexample/workflows/ListChatsFlow.java | 2 +- 3 files changed, 34 insertions(+), 29 deletions(-) diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ChatStateResults.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ChatStateResults.java index 7fbf2e0..a088730 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ChatStateResults.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ChatStateResults.java @@ -5,11 +5,17 @@ import net.corda.v5.base.annotations.CordaSerializable; import java.util.UUID; -@CordaSerializable +//@CordaSerializable public class ChatStateResults { + + private UUID id; + private String chatName; + private String messageFromName; + private String message; + public ChatStateResults() {} - @ConstructorForDeserialization +// @ConstructorForDeserialization public ChatStateResults(UUID id, String chatName, String messageFromName, String message) { this.id = id; this.chatName = chatName; @@ -21,37 +27,34 @@ public class ChatStateResults { return id; } - public void setId(UUID id) { - this.id = id; - } +// public void setId(UUID id) { +// this.id = id; +// } public String getChatName() { return chatName; } - public void setChatName(String chatName) { - this.chatName = chatName; - } +// public void setChatName(String chatName) { +// this.chatName = chatName; +// } public String getMessageFromName() { return messageFromName; } - public void setMessageFromName(String messageFromName) { - this.messageFromName = messageFromName; - } +// public void setMessageFromName(String messageFromName) { +// this.messageFromName = messageFromName; +// } public String getMessage() { return message; } - public void setMessage(String message) { - this.message = message; - } +// public void setMessage(String message) { +// this.message = message; +// } + - public UUID id; - public String chatName; - public String messageFromName; - public String message; } diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlowArgs.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlowArgs.java index a334165..e2af8e7 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlowArgs.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/GetChatFlowArgs.java @@ -5,11 +5,14 @@ import net.corda.v5.base.annotations.CordaSerializable; import java.util.UUID; -@CordaSerializable +//@CordaSerializable public class GetChatFlowArgs { + + private UUID id; + private int numberOfRecords; public GetChatFlowArgs() {} - @ConstructorForDeserialization +// @ConstructorForDeserialization public GetChatFlowArgs(UUID id, int numberOfRecords ) { this.id = id; this.numberOfRecords = numberOfRecords; @@ -19,19 +22,18 @@ public class GetChatFlowArgs { return id; } - public void setId(UUID id) { - this.id = id; - } +// public void setId(UUID id) { +// this.id = id; +// } public int getNumberOfRecords() { return numberOfRecords; } - public void setNumberOfRecords(int numberOfRecords) { - this.numberOfRecords = numberOfRecords; - } +// public void setNumberOfRecords(int numberOfRecords) { +// this.numberOfRecords = numberOfRecords; +// } + - public UUID id; - public int numberOfRecords; } diff --git a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java index c1bc6ef..8fc9247 100644 --- a/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java +++ b/workflows/src/main/java/com/r3/developers/csdetemplate/utxoexample/workflows/ListChatsFlow.java @@ -29,7 +29,7 @@ public class ListChatsFlow implements RPCStartableFlow{ @CordaInject public UtxoLedgerService utxoLedgerService; - @NotNull +// @NotNull @Suspendable @Override public String call(RPCRequestData requestBody) {