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  
31      public String getBibId() {
32          return bibId;
33      }
34  
35      public void setBibId(String bibId) {
36          this.bibId = bibId;
37      }
38  
39      private Map<String, Object> messageMap = new HashMap();
40  
41      public OleBibRecord getOleBibRecord() {
42          return oleBibRecord;
43      }
44  
45      public void setOleBibRecord(OleBibRecord oleBibRecord) {
46          this.oleBibRecord = oleBibRecord;
47      }
48  
49      public OleTxRecord getOleTxRecord() {
50          return oleTxRecord;
51      }
52  
53      public void setOleTxRecord(OleTxRecord oleTxRecord) {
54          this.oleTxRecord = oleTxRecord;
55      }
56  
57      public BibMarcRecord getOriginalRecord() {
58          return originalRecord;
59      }
60  
61      public void setOriginalRecord(BibMarcRecord originalRecord) {
62          this.originalRecord = originalRecord;
63      }
64  
65      public EDIOrder getOriginalEdi() {
66          return originalEdi;
67      }
68  
69      public void setOriginalEdi(EDIOrder originalEdi) {
70          this.originalEdi = originalEdi;
71      }
72  
73      public void addMessageToMap(String key, Object value) {
74          messageMap.put(key, value);
75      }
76  
77      public Map<String, Object> getMessageMap() {
78          return messageMap;
79      }
80  
81      public String getAgendaName() {
82          return agendaName;
83      }
84  
85      public void setAgendaName(String agendaName) {
86          this.agendaName = agendaName;
87      }
88  
89      public String getOriginalEDIFileName() {
90          return originalEDIFileName;
91      }
92  
93      public void setOriginalEDIFileName(String originalEDIFileName) {
94          this.originalEDIFileName = originalEDIFileName;
95      }
96  
97      public String getOleOriginalBibRecordFileName() {
98          return oleOriginalBibRecordFileName;
99      }
100 
101     public void setOleOriginalBibRecordFileName(String oleOriginalBibRecordFileName) {
102         this.oleOriginalBibRecordFileName = oleOriginalBibRecordFileName;
103     }
104 
105     public String getDescription() {
106         return description;
107     }
108 
109     public void setDescription(String description) {
110         this.description = description;
111     }
112 
113     public BibId getBibTree() {
114         return bibTree;
115     }
116 
117     public void setBibTree(BibId bibTree) {
118         this.bibTree = bibTree;
119     }
120 
121     public String getLinkToOrderOption() {
122         return linkToOrderOption;
123     }
124 
125     public void setLinkToOrderOption(String linkToOrderOption) {
126         this.linkToOrderOption = linkToOrderOption;
127     }
128 
129     @Override
130     public String toString() {
131         return "OleOrderRecord{" +
132                 "originalRecord=" + originalRecord +
133                 ", originalEdi=" + originalEdi +
134                 ", oleBibRecord=" + oleBibRecord +
135                 ", oleTxRecord=" + oleTxRecord +
136                 '}';
137     }
138 
139     @Override
140     public boolean equals(Object o) {
141         if (this == o) return true;
142         if (o == null || getClass() != o.getClass()) return false;
143 
144         OleOrderRecord that = (OleOrderRecord) o;
145 
146         if (!agendaName.equals(that.agendaName)) return false;
147         if (!description.equals(that.description)) return false;
148         if (!messageMap.equals(that.messageMap)) return false;
149         if (!oleBibRecord.equals(that.oleBibRecord)) return false;
150         if (!oleOriginalBibRecordFileName.equals(that.oleOriginalBibRecordFileName)) return false;
151         if (!oleTxRecord.equals(that.oleTxRecord)) return false;
152         if (!originalEDIFileName.equals(that.originalEDIFileName)) return false;
153         if (!originalEdi.equals(that.originalEdi)) return false;
154         if (!originalRecord.equals(that.originalRecord)) return false;
155 
156         return true;
157     }
158 
159     @Override
160     public int hashCode() {
161         int result = agendaName.hashCode();
162         result = 31 * result + description.hashCode();
163         result = 31 * result + originalEDIFileName.hashCode();
164         result = 31 * result + oleOriginalBibRecordFileName.hashCode();
165         result = 31 * result + originalEdi.hashCode();
166         result = 31 * result + oleBibRecord.hashCode();
167         result = 31 * result + oleTxRecord.hashCode();
168         result = 31 * result + originalRecord.hashCode();
169         result = 31 * result + messageMap.hashCode();
170         return result;
171     }
172 }
173