Mercurial > hg > LGServices
annotate src/main/java/de/mpiwg/gazetteer/db/DBContents.java @ 49:7c2e1b14b77d
new: load existing full text searching result into searching table
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 26 Jan 2016 11:46:10 +0100 |
parents | 35ed4e650a53 |
children |
rev | line source |
---|---|
39 | 1 package de.mpiwg.gazetteer.db; |
2 | |
3 import java.sql.ResultSet; | |
4 import java.sql.SQLException; | |
5 import java.util.List; | |
6 | |
7 import de.mpiwg.gazetteer.utils.DBService; | |
8 | |
9 | |
10 | |
11 public class DBContents implements Comparable<DBContents>{ | |
12 | |
13 private Long id; | |
14 | |
40
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
15 private String bookId = ""; |
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
16 private Integer page = 0; |
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
17 private String content = ""; |
39 | 18 |
40
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
19 private DBSection section = null; // section already contain DBBook |
39 | 20 private Integer inx = null; // local index for each row |
21 | |
22 private DBCoordinatesBook coordinatesBook = null; | |
23 | |
24 private boolean isRemoved = false; | |
25 | |
49
7c2e1b14b77d
new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
40
diff
changeset
|
26 public DBContents(){ |
7c2e1b14b77d
new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
40
diff
changeset
|
27 |
7c2e1b14b77d
new: load existing full text searching result into searching table
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
40
diff
changeset
|
28 } |
39 | 29 |
30 public DBContents(ResultSet rs) throws SQLException{ | |
31 | |
32 this.id = rs.getLong("id"); | |
33 this.bookId = rs.getString("books_id"); | |
34 this.page = rs.getInt("line"); | |
35 this.content = rs.getString("content"); | |
36 | |
37 } | |
38 | |
39 | |
40 public Long getId() { | |
41 return id; | |
42 } | |
43 public void setId(Long id) { | |
44 this.id = id; | |
45 } | |
46 | |
47 | |
48 public String getBookId() { | |
49 return bookId; | |
50 } | |
51 | |
52 public void setBookId(String bookId) { | |
53 this.bookId = bookId; | |
54 } | |
55 | |
56 | |
57 | |
58 public String getContent() { | |
59 return content; | |
60 } | |
61 | |
62 | |
63 public void setContent(String content) { | |
64 this.content = content; | |
65 } | |
66 | |
67 | |
68 public DBSection getSection() { | |
69 return section; | |
70 } | |
71 | |
72 | |
73 public void setSection(DBSection section) { | |
74 this.section = section; | |
75 } | |
76 | |
77 | |
78 | |
79 public Integer getPage() { | |
80 return page; | |
81 } | |
82 | |
83 | |
84 public void setPage(Integer page) { | |
85 this.page = page; | |
86 } | |
87 | |
88 | |
89 public Integer getInx() { | |
90 return inx; | |
91 } | |
92 | |
93 | |
94 public void setInx(Integer inx) { | |
95 this.inx = inx; | |
96 } | |
97 | |
98 | |
99 | |
100 public DBCoordinatesBook getCoordinatesBook() { | |
101 return coordinatesBook; | |
102 } | |
103 | |
104 | |
105 public void setCoordinatesBook(DBCoordinatesBook coordinatesBook) { | |
106 this.coordinatesBook = coordinatesBook; | |
107 } | |
108 | |
109 | |
110 public boolean isRemoved() { | |
111 return isRemoved; | |
112 } | |
113 | |
114 | |
115 public void setRemoved(boolean isRemoved) { | |
116 this.isRemoved = isRemoved; | |
117 } | |
118 | |
119 | |
40
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
120 |
39 | 121 @Override |
122 public int compareTo(DBContents o) { | |
40
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
123 return this.getId().compareTo(o.getId()); |
39 | 124 } |
40
35ed4e650a53
bug fixed: full text search when section not found in section_index table. add paginator
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
39
diff
changeset
|
125 |
39 | 126 } |