Mercurial > hg > LGServices
view 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 |
line wrap: on
line source
package de.mpiwg.gazetteer.db; import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; import de.mpiwg.gazetteer.utils.DBService; public class DBContents implements Comparable<DBContents>{ private Long id; private String bookId = ""; private Integer page = 0; private String content = ""; private DBSection section = null; // section already contain DBBook private Integer inx = null; // local index for each row private DBCoordinatesBook coordinatesBook = null; private boolean isRemoved = false; public DBContents(){ } public DBContents(ResultSet rs) throws SQLException{ this.id = rs.getLong("id"); this.bookId = rs.getString("books_id"); this.page = rs.getInt("line"); this.content = rs.getString("content"); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getBookId() { return bookId; } public void setBookId(String bookId) { this.bookId = bookId; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public DBSection getSection() { return section; } public void setSection(DBSection section) { this.section = section; } public Integer getPage() { return page; } public void setPage(Integer page) { this.page = page; } public Integer getInx() { return inx; } public void setInx(Integer inx) { this.inx = inx; } public DBCoordinatesBook getCoordinatesBook() { return coordinatesBook; } public void setCoordinatesBook(DBCoordinatesBook coordinatesBook) { this.coordinatesBook = coordinatesBook; } public boolean isRemoved() { return isRemoved; } public void setRemoved(boolean isRemoved) { this.isRemoved = isRemoved; } @Override public int compareTo(DBContents o) { return this.getId().compareTo(o.getId()); } }