[507] | 1 | package gov.hhs.fha.nhinc.gateway.aggregator.model;
|
---|
| 2 |
|
---|
| 3 | import java.util.Date;
|
---|
| 4 |
|
---|
| 5 | /**
|
---|
| 6 | * This class represents one row of the AGGREGATOR.AGG_MESSAGE_RESULTS
|
---|
| 7 | * SQL table.
|
---|
| 8 | *
|
---|
| 9 | * @author Les Westberg
|
---|
| 10 | */
|
---|
| 11 | public class AggMessageResult
|
---|
| 12 | {
|
---|
| 13 | // Private member variables
|
---|
| 14 | //--------------------------
|
---|
| 15 | private String messageId;
|
---|
| 16 | private String messageKey;
|
---|
| 17 | private Date messageOutTime;
|
---|
| 18 | private Date responseReceivedTime;
|
---|
| 19 | private String responseMessageType;
|
---|
| 20 | private String responseMessage;
|
---|
| 21 | private AggTransaction aggTransaction;
|
---|
| 22 |
|
---|
| 23 | /**
|
---|
| 24 | * Default constructor.
|
---|
| 25 | */
|
---|
| 26 | public AggMessageResult()
|
---|
| 27 | {
|
---|
| 28 | clear();
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | /**
|
---|
| 32 | * Clear the contents of this object and set it to a default state.
|
---|
| 33 | */
|
---|
| 34 | private void clear()
|
---|
| 35 | {
|
---|
| 36 | messageId = "";
|
---|
| 37 | messageKey = "";
|
---|
| 38 | messageOutTime = null;
|
---|
| 39 | responseReceivedTime = null;
|
---|
| 40 | responseMessageType = "";
|
---|
| 41 | responseMessage = "";
|
---|
| 42 | aggTransaction = null;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | /**
|
---|
| 46 | * Returns the Message ID that uniquely identifies this row. This is a UUID.
|
---|
| 47 | *
|
---|
| 48 | * @return The message ID that uniquely identifies this row.
|
---|
| 49 | */
|
---|
| 50 | public String getMessageId()
|
---|
| 51 | {
|
---|
| 52 | return messageId;
|
---|
| 53 | }
|
---|
| 54 |
|
---|
| 55 | /**
|
---|
| 56 | * Sets the Message ID that uniquely identifies this row. This is a UUID.
|
---|
| 57 | *
|
---|
| 58 | * @param messageId The message ID that uniquely identifies this row.
|
---|
| 59 | */
|
---|
| 60 | public void setMessageId(String messageId)
|
---|
| 61 | {
|
---|
| 62 | this.messageId = messageId;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 | /**
|
---|
| 66 | * Return the message key that we will use to match up the response that
|
---|
| 67 | * is received.
|
---|
| 68 | *
|
---|
| 69 | * @return The message key used to match up the response received. This
|
---|
| 70 | * must be unique. It is intended that this will be an XML string.
|
---|
| 71 | */
|
---|
| 72 | public String getMessageKey()
|
---|
| 73 | {
|
---|
| 74 | return messageKey;
|
---|
| 75 | }
|
---|
| 76 |
|
---|
| 77 | /**
|
---|
| 78 | * Sets the message key that we will use to match up the response that
|
---|
| 79 | * is received.
|
---|
| 80 | *
|
---|
| 81 | * @param messageKey The message key used to match up the response received. This
|
---|
| 82 | * must be unique. It is intended that this will be an XML string.
|
---|
| 83 | */
|
---|
| 84 | public void setMessageKey(String messageKey)
|
---|
| 85 | {
|
---|
| 86 | this.messageKey = messageKey;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | /**
|
---|
| 90 | * Returns the date and time that the message went out. This will be
|
---|
| 91 | * the same time as the TransactionStartTime in the agg_transaction table
|
---|
| 92 | * for this transaction.
|
---|
| 93 | *
|
---|
| 94 | * @return The date and time that the message went out.
|
---|
| 95 | */
|
---|
| 96 | public Date getMessageOutTime()
|
---|
| 97 | {
|
---|
| 98 | return messageOutTime;
|
---|
| 99 | }
|
---|
| 100 |
|
---|
| 101 | /**
|
---|
| 102 | * Sets the date and time that the message went out. This will be
|
---|
| 103 | * the same time as the TransactionStartTime in the agg_transaction table
|
---|
| 104 | * for this transaction.
|
---|
| 105 | *
|
---|
| 106 | * @param messageOutTime The date and time that the message went out.
|
---|
| 107 | */
|
---|
| 108 | public void setMessageOutTime(Date messageOutTime)
|
---|
| 109 | {
|
---|
| 110 | this.messageOutTime = messageOutTime;
|
---|
| 111 | }
|
---|
| 112 |
|
---|
| 113 | /**
|
---|
| 114 | * Returns the response message. This will be the actual message that has
|
---|
| 115 | * been marshalled to XML. This is what will be aggregated.
|
---|
| 116 | *
|
---|
| 117 | * @return The XML message that was received as a response to thie message
|
---|
| 118 | * that went out.
|
---|
| 119 | */
|
---|
| 120 | public String getResponseMessage()
|
---|
| 121 | {
|
---|
| 122 | return responseMessage;
|
---|
| 123 | }
|
---|
| 124 |
|
---|
| 125 | /**
|
---|
| 126 | * Sets the response message. This will be the actual message that has
|
---|
| 127 | * been marshalled to XML. This is what will be aggregated.
|
---|
| 128 | *
|
---|
| 129 | * @param responseMessage The XML message that was received as a response to thie message
|
---|
| 130 | * that went out.
|
---|
| 131 | */
|
---|
| 132 | public void setResponseMessage(String responseMessage)
|
---|
| 133 | {
|
---|
| 134 | this.responseMessage = responseMessage;
|
---|
| 135 | }
|
---|
| 136 |
|
---|
| 137 | /**
|
---|
| 138 | * Returns the type of the response message. This is the textual name of the
|
---|
| 139 | * JAXB class that represents the XML string.
|
---|
| 140 | *
|
---|
| 141 | * @return The type of the response message.
|
---|
| 142 | */
|
---|
| 143 | public String getResponseMessageType()
|
---|
| 144 | {
|
---|
| 145 | return responseMessageType;
|
---|
| 146 | }
|
---|
| 147 |
|
---|
| 148 | /**
|
---|
| 149 | * Sets the type of the response message. This is the textual name of the
|
---|
| 150 | * JAXB class that represents the XML string.
|
---|
| 151 | *
|
---|
| 152 | * @param responseMessageType The type of the response message.
|
---|
| 153 | */
|
---|
| 154 | public void setResponseMessageType(String responseMessageType)
|
---|
| 155 | {
|
---|
| 156 | this.responseMessageType = responseMessageType;
|
---|
| 157 | }
|
---|
| 158 |
|
---|
| 159 | /**
|
---|
| 160 | * Returns the date and time that the response was received by the
|
---|
| 161 | * aggregator.
|
---|
| 162 | *
|
---|
| 163 | * @return The date and time that the response was received by the
|
---|
| 164 | * aggregator.
|
---|
| 165 | */
|
---|
| 166 | public Date getResponseReceivedTime()
|
---|
| 167 | {
|
---|
| 168 | return responseReceivedTime;
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 | /**
|
---|
| 172 | * Sets the date and time that the response was received by the
|
---|
| 173 | * aggregator.
|
---|
| 174 | *
|
---|
| 175 | * @param responseReceivedTime The date and time that the response was received by the
|
---|
| 176 | * aggregator.
|
---|
| 177 | */
|
---|
| 178 | public void setResponseReceivedTime(Date responseReceivedTime)
|
---|
| 179 | {
|
---|
| 180 | this.responseReceivedTime = responseReceivedTime;
|
---|
| 181 | }
|
---|
| 182 |
|
---|
| 183 | /**
|
---|
| 184 | * Return the AggTransaction associated with the AggMessageResult.
|
---|
| 185 | *
|
---|
| 186 | * @return The AggTransaction associated with the AggMessageResult.
|
---|
| 187 | */
|
---|
| 188 | public AggTransaction getAggTransaction()
|
---|
| 189 | {
|
---|
| 190 | return aggTransaction;
|
---|
| 191 | }
|
---|
| 192 |
|
---|
| 193 | /**
|
---|
| 194 | * Sets the AggTransaction associated with the AggMessageResult.
|
---|
| 195 | *
|
---|
| 196 | * @param aggTransaction The AggTransaction associated with the AggMessageResult.
|
---|
| 197 | */
|
---|
| 198 | public void setAggTransaction(AggTransaction aggTransaction)
|
---|
| 199 | {
|
---|
| 200 | this.aggTransaction = aggTransaction;
|
---|
| 201 | }
|
---|
| 202 |
|
---|
| 203 |
|
---|
| 204 | }
|
---|