View Javadoc
1   package org.kuali.ole.pojo;
2   
3   
4   import org.kuali.ole.docstore.common.document.content.bib.marc.BibMarcRecord;
5   import org.kuali.ole.docstore.common.document.ids.BibId;
6   import org.kuali.ole.pojo.edi.EDIOrder;
7   
8   import java.util.HashMap;
9   import java.util.Map;
10  
11  /**
12   * Created by IntelliJ IDEA.
13   * User: pvsubrah
14   * Date: 4/4/12
15   * Time: 8:57 PM
16   * To change this template use File | Settings | File Templates.
17   */
18  public class OleOrderRecord {
19      private String agendaName;
20      private String description;
21      private String originalEDIFileName;
22      private String oleOriginalBibRecordFileName;
23      private EDIOrder originalEdi;
24      private OleBibRecord oleBibRecord;
25      private OleTxRecord oleTxRecord;
26      private BibMarcRecord originalRecord;
27      private String bibId;
28      private BibId bibTree;
29      private String linkToOrderOption;
30      private String oleERSIdentifier;
31  
32      public String getBibId() {
33          return bibId;
34      }
35  
36      public void setBibId(String bibId) {
37          this.bibId = bibId;
38      }
39  
40      private Map<String, Object> messageMap = new HashMap();
41  
42      public OleBibRecord getOleBibRecord() {
43          return oleBibRecord;
44      }
45  
46      public void setOleBibRecord(OleBibRecord oleBibRecord) {
47          this.oleBibRecord = oleBibRecord;
48      }
49  
50      public OleTxRecord getOleTxRecord() {
51          return oleTxRecord;
52      }
53  
54      public void setOleTxRecord(OleTxRecord oleTxRecord) {
55          this.oleTxRecord = oleTxRecord;
56      }
57  
58      public BibMarcRecord getOriginalRecord() {
59          return originalRecord;
60      }
61  
62      public void setOriginalRecord(BibMarcRecord originalRecord) {
63          this.originalRecord = originalRecord;
64      }
65  
66      public EDIOrder getOriginalEdi() {
67          return originalEdi;
68      }
69  
70      public void setOriginalEdi(EDIOrder originalEdi) {
71          this.originalEdi = originalEdi;
72      }
73  
74      public void addMessageToMap(String key, Object value) {
75          messageMap.put(key, value);
76      }
77  
78      public Map<String, Object> getMessageMap() {
79          return messageMap;
80      }
81  
82      public String getAgendaName() {
83          return agendaName;
84      }
85  
86      public void setAgendaName(String agendaName) {
87          this.agendaName = agendaName;
88      }
89  
90      public String getOriginalEDIFileName() {
91          return originalEDIFileName;
92      }
93  
94      public void setOriginalEDIFileName(String originalEDIFileName) {
95          this.originalEDIFileName = originalEDIFileName;
96      }
97  
98      public String getOleOriginalBibRecordFileName() {
99          return oleOriginalBibRecordFileName;
100     }
101 
102     public void setOleOriginalBibRecordFileName(String oleOriginalBibRecordFileName) {
103         this.oleOriginalBibRecordFileName = oleOriginalBibRecordFileName;
104     }
105 
106     public String getDescription() {
107         return description;
108     }
109 
110     public void setDescription(String description) {
111         this.description = description;
112     }
113 
114     public BibId getBibTree() {
115         return bibTree;
116     }
117 
118     public void setBibTree(BibId bibTree) {
119         this.bibTree = bibTree;
120     }
121 
122     public String getLinkToOrderOption() {
123         return linkToOrderOption;
124     }
125 
126     public void setLinkToOrderOption(String linkToOrderOption) {
127         this.linkToOrderOption = linkToOrderOption;
128     }
129 
130     public String getOleERSIdentifier() {
131         return oleERSIdentifier;
132     }
133 
134     public void setOleERSIdentifier(String oleERSIdentifier) {
135         this.oleERSIdentifier = oleERSIdentifier;
136     }
137 
138     @Override
139     public String toString() {
140         return "OleOrderRecord{" +
141                 "originalRecord=" + originalRecord +
142                 ", originalEdi=" + originalEdi +
143                 ", oleBibRecord=" + oleBibRecord +
144                 ", oleTxRecord=" + oleTxRecord +
145                 '}';
146     }
147 
148     @Override
149     public boolean equals(Object o) {
150         if (this == o) return true;
151         if (o == null || getClass() != o.getClass()) return false;
152 
153         OleOrderRecord that = (OleOrderRecord) o;
154 
155         if (!agendaName.equals(that.agendaName)) return false;
156         if (!description.equals(that.description)) return false;
157         if (!messageMap.equals(that.messageMap)) return false;
158         if (!oleBibRecord.equals(that.oleBibRecord)) return false;
159         if (!oleOriginalBibRecordFileName.equals(that.oleOriginalBibRecordFileName)) return false;
160         if (!oleTxRecord.equals(that.oleTxRecord)) return false;
161         if (!originalEDIFileName.equals(that.originalEDIFileName)) return false;
162         if (!originalEdi.equals(that.originalEdi)) return false;
163         if (!originalRecord.equals(that.originalRecord)) return false;
164 
165         return true;
166     }
167 
168     @Override
169     public int hashCode() {
170         int result = agendaName.hashCode();
171         result = 31 * result + description.hashCode();
172         result = 31 * result + originalEDIFileName.hashCode();
173         result = 31 * result + oleOriginalBibRecordFileName.hashCode();
174         result = 31 * result + originalEdi.hashCode();
175         result = 31 * result + oleBibRecord.hashCode();
176         result = 31 * result + oleTxRecord.hashCode();
177         result = 31 * result + originalRecord.hashCode();
178         result = 31 * result + messageMap.hashCode();
179         return result;
180     }
181 }
182