package com.alcedomoreno.sirme.core.data;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;
import org.hibernate.annotations.Proxy;
@Entity
@Proxy(lazy=true)
@Table(name="report")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
public class ReportData implements Serializable,DataObject {
	
	private static final long serialVersionUID = 1L;
	
	public ReportData() {}
	
	public ReportData(int id) {
		this.idReport = id;
	}
	
	@Column(name="idReport", nullable=false)	
	@Id
	@GeneratedValue(generator="VC0A80160139DDDAA5D008132")	
	@GenericGenerator(name="VC0A80160139DDDAA5D008132", strategy="native")	
	private int idReport;
	
	@Column(name="[nameReport]", nullable=false, unique=true, length=50)	
	private String nameReport;
	
	@Column(name="[titleReport]", nullable=false, unique=true, length=250)	
	private String titleReport;
	
	@Column(name="[fileReport]", nullable=false, unique=true, length=20)	
	private String fileReport;

	@OneToMany(mappedBy="report", targetEntity=QuestionGroupData.class)	
	@Cascade({CascadeType.LOCK})	
	@LazyCollection(LazyCollectionOption.FALSE)	
	private Set<QuestionGroupData> questionGroups = new HashSet<QuestionGroupData>();
	
	public int getIdReport() {
		return idReport;
	}
	public void setIdReport(int idReport) {
		this.idReport = idReport;
	}
	public String getNameReport() {
		return nameReport;
	}
	public void setNameReport(String nameReport) {
		this.nameReport = nameReport;
	}

	public Set<QuestionGroupData> getQuestionGroups() {
		return questionGroups;
	}

	public String getFileReport() {
		return fileReport;
	}

	public void setFileReport(String fileReport) {
		this.fileReport = fileReport;
	}

	public String getTitleReport() {
		return titleReport;
	}

	public void setTitleReport(String titleReport) {
		this.titleReport = titleReport;
	}

	public void setQuestionGroups(Set<QuestionGroupData> questionGroups) {
		this.questionGroups = questionGroups;
	}

}
@@ -1197,17 +1197,16 @@
 n(name=%22
-%5B
 nameRepo
@@ -1203,25 +1203,24 @@
 =%22nameReport
-%5D
 %22, nullable=
@@ -1296,17 +1296,16 @@
 n(name=%22
-%5B
 titleRep
@@ -1299,33 +1299,32 @@
 ame=%22titleReport
-%5D
 %22, nullable=fals
@@ -1402,9 +1402,8 @@
 me=%22
-%5B
 file
@@ -1412,9 +1412,8 @@
 port
-%5D
 %22, n
@@ -2465,8 +2465,9 @@
 s;%0A%09%7D%0A%0A%7D
+%0A

Update ReportData.java