view src/main/java/de/mpiwg/gazetteer/db/DBSection.java @ 0:7682c04c63a8

First commit of the source code!
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Tue, 10 Mar 2015 14:50:41 +0100
parents
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.bo.LGBranch;

public class DBSection {

	private Long id;
	private String name;
	private String text;
	
	private String bookId;
	private DBBook book;
	
	private List<LGBranch> branches;
	
	public DBSection(Long id){
		this.id = id;
	}
	
	public DBSection(Long id, String name, String bookId){
		this.id = id;
		this.name = name;
		this.bookId = bookId;
	}
	
	public DBSection(ResultSet rs) throws SQLException{
		this.name = rs.getString("name");
		this.id = rs.getLong("id");
		this.bookId = rs.getString("books_id");
	}
	
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}

	public String getBookId() {
		return bookId;
	}

	public void setBookId(String bookId) {
		this.bookId = bookId;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public DBBook getBook() {
		return book;
	}

	public void setBook(DBBook book) {
		this.book = book;
	}

	public List<LGBranch> getBranches() {
		return branches;
	}

	public void setBranches(List<LGBranch> branches) {
		this.branches = branches;
	}
}