| 1 | package gov.hhs.fha.nhinc.gateway.aggregator.model;
|
|---|
| 2 |
|
|---|
| 3 | import java.util.Date;
|
|---|
| 4 | import java.util.Set;
|
|---|
| 5 |
|
|---|
| 6 | /**
|
|---|
| 7 | * This class represents one row of the AGGREGATOR.AGG_TRANSACTION
|
|---|
| 8 | * SQL table.
|
|---|
| 9 | *
|
|---|
| 10 | * @author Les Westberg
|
|---|
| 11 | */
|
|---|
| 12 | public class AggTransaction
|
|---|
| 13 | {
|
|---|
| 14 | // Private member variables
|
|---|
| 15 | //-------------------------
|
|---|
| 16 | private String transactionId;
|
|---|
| 17 | private String serviceType;
|
|---|
| 18 | private Date transactionStartTime;
|
|---|
| 19 | private Set<AggMessageResult> aggMessageResults;
|
|---|
| 20 |
|
|---|
| 21 | /**
|
|---|
| 22 | * Default constructor.
|
|---|
| 23 | */
|
|---|
| 24 | public AggTransaction()
|
|---|
| 25 | {
|
|---|
| 26 | clear();
|
|---|
| 27 | }
|
|---|
| 28 |
|
|---|
| 29 | /**
|
|---|
| 30 | * Clear the contents of this object and set it to the default state.
|
|---|
| 31 | */
|
|---|
| 32 | public void clear()
|
|---|
| 33 | {
|
|---|
| 34 | transactionId = "";
|
|---|
| 35 | serviceType = "";
|
|---|
| 36 | transactionStartTime = null;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | /**
|
|---|
| 40 | * Return the service type of the services that is being called for
|
|---|
| 41 | * which results are being aggregated.
|
|---|
| 42 | *
|
|---|
| 43 | * @return The name of the service type.
|
|---|
| 44 | */
|
|---|
| 45 | public String getServiceType()
|
|---|
| 46 | {
|
|---|
| 47 | return serviceType;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | /**
|
|---|
| 51 | * Set the service type of the services that is being called for
|
|---|
| 52 | * which results are being aggregated.
|
|---|
| 53 | *
|
|---|
| 54 | * @param serviceType The name of the service type.
|
|---|
| 55 | */
|
|---|
| 56 | public void setServiceType(String serviceType)
|
|---|
| 57 | {
|
|---|
| 58 | this.serviceType = serviceType;
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | /**
|
|---|
| 63 | * Return the transaction ID associated with this aggregation
|
|---|
| 64 | * transaction.
|
|---|
| 65 | *
|
|---|
| 66 | * @return The transaction ID for this aggregation transaction.
|
|---|
| 67 | */
|
|---|
| 68 | public String getTransactionId()
|
|---|
| 69 | {
|
|---|
| 70 | return transactionId;
|
|---|
| 71 | }
|
|---|
| 72 |
|
|---|
| 73 | /**
|
|---|
| 74 | * Sets the transaction ID associated with this aggregation
|
|---|
| 75 | * transaction.
|
|---|
| 76 | *
|
|---|
| 77 | * @param transactionId The transaction ID for this aggregation transaction.
|
|---|
| 78 | */
|
|---|
| 79 | public void setTransactionId(String transactionId)
|
|---|
| 80 | {
|
|---|
| 81 | this.transactionId = transactionId;
|
|---|
| 82 | }
|
|---|
| 83 |
|
|---|
| 84 | /**
|
|---|
| 85 | * Return the time that the transaction was started.
|
|---|
| 86 | *
|
|---|
| 87 | * @return The date and time that this transaction was started.
|
|---|
| 88 | */
|
|---|
| 89 | public Date getTransactionStartTime()
|
|---|
| 90 | {
|
|---|
| 91 | return transactionStartTime;
|
|---|
| 92 | }
|
|---|
| 93 |
|
|---|
| 94 | /**
|
|---|
| 95 | * Sets the time that the transaction was started.
|
|---|
| 96 | *
|
|---|
| 97 | * @param transactionStartTime The date and time that this transaction was started.
|
|---|
| 98 | */
|
|---|
| 99 | public void setTransactionStartTime(Date transactionStartTime)
|
|---|
| 100 | {
|
|---|
| 101 | this.transactionStartTime = transactionStartTime;
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 | /**
|
|---|
| 105 | * Return the set of message results associated with this transaction.
|
|---|
| 106 | *
|
|---|
| 107 | * @return the set of message results associated with this transaction.
|
|---|
| 108 | */
|
|---|
| 109 | public Set<AggMessageResult> getAggMessageResults()
|
|---|
| 110 | {
|
|---|
| 111 | return aggMessageResults;
|
|---|
| 112 | }
|
|---|
| 113 |
|
|---|
| 114 | /**
|
|---|
| 115 | * Sets the set of message results associated with this transaction.
|
|---|
| 116 | *
|
|---|
| 117 | * @param aggMessageResults the set of message results associated with this transaction.
|
|---|
| 118 | */
|
|---|
| 119 | public void setAggMessageResults(Set<AggMessageResult> aggMessageResults)
|
|---|
| 120 | {
|
|---|
| 121 | this.aggMessageResults = aggMessageResults;
|
|---|
| 122 | }
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 | }
|
|---|