diff src/main/java/de/mpiwg/gazetteer/db/DBBook.java @ 75:e5697f7775b2

Display columns named "source" and "year" and implement filter & sorting on them. Hide the column "Start Year"
author Calvin Yeh <cyeh@mpiwg-berlin.mpg.de>
date Mon, 27 Mar 2017 17:50:58 +0200
parents 9dbbbfd474f4
children 141fa833d126
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/gazetteer/db/DBBook.java	Mon Mar 27 17:11:45 2017 +0200
+++ b/src/main/java/de/mpiwg/gazetteer/db/DBBook.java	Mon Mar 27 17:50:58 2017 +0200
@@ -15,26 +15,27 @@
 	private String edition = "";
 	private String volume = "";
 	private String dynasty = "";
-	
+
 	private String level1 = "";
 	private String level2 = "";
 	private String admin_type = "";
 	private String in_jibengujiku = "";
-	
+
 	private Integer start_year = 0;
 	private Integer end_year = 0;
 	private String comments = "";
 	private String toc_correction = "";
-	
-	
-	
+
+	private Integer year = 0;
+	private Integer source = "";
+
 
 	private DBSectionVersion currentSectionVersion;
-	
+
 	public DBBook() {
-		
+
 	}
-	
+
 	public DBBook(ResultSet rs) throws SQLException{
 		this.name = rs.getString("name");
 		this.id = rs.getString("id");
@@ -44,23 +45,24 @@
 		this.edition = rs.getString("edition");
 		this.volume = rs.getString("volume");
 		this.dynasty = rs.getString("dynasty");
-		
+
 		this.level1 = rs.getString("level1");
 		this.level2 = rs.getString("level2");
-		
+
 		this.admin_type = rs.getString("admin_type");
 		this.in_jibengujiku = rs.getString("in_jibengujiku");
-		
+
 		this.start_year = rs.getInt("start_year");
 		this.end_year = rs.getInt("end_year");
 		this.comments = rs.getString("comments");
-		
+
 		this.toc_correction = rs.getString("toc_correction");
-		
-		
-		
+
+    this.year = rs.getInt("year");
+		this.source = rs.getString("source");
+
 	}
-	
+
 	@Override
 	public int compareTo(DBBook o) {
 		return this.getName().compareTo(o.getName());
@@ -75,7 +77,7 @@
 		this.toc_correction = toc_correction;
 	}
 
-	
+
 	public String getId() {
 		return id;
 	}
@@ -111,8 +113,8 @@
 	public void setComments(String comments){
 		this.comments = comments;
 	}
-	
-	
+
+
 	public String getPeriod() {
 		return period;
 	}
@@ -232,6 +234,22 @@
 		this.currentSectionVersion = currentSectionVersion;
 	}
 
-	
-	
+	public Integer getYear() {
+		return this.year;
+	}
+
+
+	public void setYear(Integer pYear) {
+		this.year = pYear;
+	}
+
+	public String getSource() {
+		return this.source;
+	}
+
+
+	public void setSource(String pSource) {
+		this.source = pSource;
+	}
+
 }