SHARE
TWEET

Ver-Request

a guest Apr 19th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.inspired.tech.verification;
  2.  
  3. import java.io.Serializable;
  4. import java.sql.Timestamp;
  5. import java.util.ArrayList;
  6. import java.util.List;
  7.  
  8. import org.apache.commons.lang3.builder.EqualsBuilder;
  9. import org.apache.commons.lang3.builder.HashCodeBuilder;
  10. import org.json.JSONObject;
  11.  
  12. import com.google.gson.JsonObject;
  13.  
  14. public class VerRequestMessage implements Serializable{
  15.     private static final long serialVersionUID = 1L;
  16.     private String transactionId;
  17.  
  18.     private long timeStamp;
  19.  
  20.     private String messageSource;
  21.  
  22.     private String sessionId;
  23.  
  24.     private byte[] messagePayload;
  25.  
  26.     private VerRequestType requestType;
  27.  
  28.     private JsonObject messageJsObject;
  29.  
  30.     private Timestamp timestamp;
  31.    
  32.     private String timestampStr;
  33.    
  34.     private String messageObjectStr;
  35.    
  36.     private String requestTypeStr;
  37.    
  38.     private String displayField;
  39.    
  40.     private List selectField = new ArrayList();
  41.  
  42.     public VerRequestMessage() {
  43.     }
  44.  
  45.     public VerRequestMessage(String transactionId, long timeStamp, String sessionId) {
  46.         this.transactionId = transactionId;
  47.         this.timeStamp = timeStamp;
  48.         this.sessionId = sessionId;
  49.     }
  50.  
  51.     public VerRequestMessage(String transactionId, long timeStamp, String sessionId, byte[] messagePayload) {
  52.         this.transactionId = transactionId;
  53.         this.timeStamp = timeStamp;
  54.         this.sessionId = sessionId;
  55.         this.messagePayload = messagePayload;
  56.     }
  57.  
  58.     public String getTransactionId() {
  59.         return transactionId;
  60.     }
  61.  
  62.     public void setTransactionId(String transactionId) {
  63.         this.transactionId = transactionId;
  64.     }
  65.  
  66.     public long getTimeStamp() {
  67.         return timeStamp;
  68.     }
  69.  
  70.     public void setTimeStamp(long timeStamp) {
  71.         this.timeStamp = timeStamp;
  72.     }
  73.  
  74.     public String getMessageSource() {
  75.         return messageSource;
  76.     }
  77.  
  78.     public void setMessageSource(String messageSource) {
  79.         this.messageSource = messageSource;
  80.     }
  81.  
  82.     public String getSessionId() {
  83.         return sessionId;
  84.     }
  85.  
  86.     public void setSessionId(String sessionId) {
  87.         this.sessionId = sessionId;
  88.     }
  89.  
  90.     public byte[] getMessagePayload() {
  91.         return messagePayload;
  92.     }
  93.  
  94.     public void setMessagePayload(byte[] messagePayload) {
  95.         this.messagePayload = messagePayload;
  96.     }
  97.  
  98.     public JsonObject getMessageJsObject() {
  99.         return messageJsObject;
  100.     }
  101.  
  102.     public void setMessageJsObject(JsonObject jsonObject) {
  103.         this.messageJsObject = jsonObject;
  104.     }
  105.  
  106.     public VerRequestType getRequestType() {
  107.         return requestType;
  108.     }
  109.  
  110.     public void setRequestType(VerRequestType requestType) {
  111.         this.requestType = requestType;
  112.     }
  113.  
  114.     public Timestamp getTimestamp() {
  115.         return timestamp;
  116.     }
  117.  
  118.     public void setTimestamp(Timestamp timestamp) {
  119.         this.timestamp = timestamp;
  120.     }
  121.    
  122.     public void setTimestampStr(String timestampStr) {
  123.         this.timestampStr = timestampStr;
  124.     }
  125.    
  126.     public String getTimestampStr() {
  127.         return this.timestampStr;
  128.     }
  129.    
  130.     public void setMessageObjectStr(String messageObjectStr) {
  131.         this.messageObjectStr = messageObjectStr;
  132.     }
  133.    
  134.     public String getMessageObjectStr() {
  135.         return this.messageObjectStr;
  136.     }
  137.    
  138.     public void setRequestTypeStr(String requestTypeStr) {
  139.         this.requestTypeStr = requestTypeStr;
  140.     }
  141.    
  142.     public String getRequestTypeStr() {
  143.         return this.requestTypeStr;
  144.     }
  145.    
  146.     public void setDisplayField(String displayField) {
  147.         this.displayField = displayField;
  148.     }
  149.    
  150.     public String getDisplayField() {
  151.         return this.displayField;
  152.     }
  153.    
  154.     public void setSelectField(List selectField) {
  155.         this.selectField = selectField;
  156.     }
  157.     public List getSelectField() {
  158.         return this.selectField;
  159.     }
  160.  
  161.     @Override
  162.     public boolean equals(Object o) {
  163.         if (this == o) return true;
  164.  
  165.         if (!(o instanceof VerRequestMessage)) return false;
  166.  
  167.         VerRequestMessage that = (VerRequestMessage) o;
  168.  
  169.         return new EqualsBuilder()
  170.                 .append(transactionId, that.transactionId)
  171.                 .append(messageSource, that.messageSource)
  172.                 .append(sessionId, that.sessionId)
  173.                 .append(requestType, that.requestType)
  174.                 .append(messageJsObject, that.messageJsObject)
  175.                 .append(timestampStr, timestampStr)
  176.                 //.append(displayField, displayField)
  177.                 .append(selectField, selectField)
  178.                 .isEquals();
  179.     }
  180.  
  181.     @Override
  182.     public int hashCode() {
  183.         return new HashCodeBuilder(17, 37)
  184.                 .append(transactionId)
  185.                 .append(messageSource)
  186.                 .append(sessionId)
  187.                 .append(requestType)
  188.                 .append(messageJsObject)
  189.                 .append(timestampStr)
  190.                 .append(displayField)
  191.                 .append(selectField)
  192.                 .toHashCode();
  193.     }
  194.    
  195.     @Override
  196.     public String toString() {
  197.         return "VerificationRequestMessage[transactionId=" + transactionId  +
  198.                 ", messageSource=" + messageSource  +
  199.                 ", sessionId=" + sessionId + ", requestType=" + requestType +
  200.                 ", timeStamp=" + timeStamp + ", messageJsObject=" + messageJsObject +
  201.                 ", selectField=" + selectField + "]";
  202.     }
  203. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top