view src/main/java/de/mpiwg/gazetteer/utils/SelectableObject.java @ 88:f4242db6206b

Refactoring : replace getCurrentSession with openSession for nested transaction exception
author Calvin Yeh <cyeh@mpipw-berlin.mpg.com>
date Wed, 21 Jun 2017 05:56:02 +0200
parents 3e62083dbcbf
children
line wrap: on
line source

package de.mpiwg.gazetteer.utils;

import java.io.Serializable;

public class SelectableObject<N> implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private boolean selected;
	private N obj;
	private String label;
	
	public SelectableObject(N obj){
		this.obj = obj;
		this.selected = false;
	}
	
	public SelectableObject(N obj, String label){
		this.obj = obj;
		this.selected = false;
		this.label = label;
	}
	
	public boolean isSelected() {
		return selected;
	}
	public void setSelected(boolean selected) {
		this.selected = selected;
	}
	public N getObj() {
		return obj;
	}
	public void setObj(N obj) {
		this.obj = obj;
	}
	public String getLabel() {
		return label;
	}
	public void setLabel(String label) {
		this.label = label;
	}
}