01: package org.contineo.core.searchengine;
02:
03: /**
04: * Created on 08.12.2004
05: * @author Michael Scholz
06: */
07: public class SearchDocument {
08: private int luceneId;
09: private int menuId;
10: private String index;
11:
12: /**
13: *
14: */
15: public SearchDocument() {
16: luceneId = 0;
17: menuId = 0;
18: index = "english";
19: } // end ctor SearchDocument
20:
21: /**
22: * @return Returns the luceneId.
23: * @uml.property name="luceneId"
24: */
25: public int getLuceneId() {
26: return luceneId;
27: } // end method getLuceneId
28:
29: /**
30: * @param luceneId The luceneId to set.
31: * @uml.property name="luceneId"
32: */
33: public void setLuceneId(int luceneId) {
34: this .luceneId = luceneId;
35: } // end method setLuceneId
36:
37: /**
38: * @return Returns the menuId.
39: * @uml.property name="menuId"
40: */
41: public int getMenuId() {
42: return menuId;
43: } // end method getMenuId
44:
45: /**
46: * @param menuId The menuId to set.
47: * @uml.property name="menuId"
48: */
49: public void setMenuId(int menuId) {
50: this .menuId = menuId;
51: } // end method setMenuId
52:
53: /**
54: * @return Returns the index.
55: * @uml.property name="index"
56: */
57: public String getIndex() {
58: return index;
59: } // end method getIndex
60:
61: /**
62: * @param index The index to set.
63: * @uml.property name="index"
64: */
65: public void setIndex(String index) {
66: this .index = index;
67: } // end method setIndex
68:
69: @Override
70: public boolean equals(Object obj) {
71: if (!(obj instanceof SearchDocument))
72: return false;
73: SearchDocument other = (SearchDocument) obj;
74: return other.getLuceneId() == this .getLuceneId();
75: }
76:
77: @Override
78: public int hashCode() {
79: return new Integer(luceneId).hashCode();
80: }
81:
82: } // end class SearchDocument
|