package com.lst.lc.entities; // Generated 2015-7-18 14:55:52 by Hibernate Tools 4.3.1 import java.util.HashSet; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.Table; /** * QuestionTag generated by hbm2java */ @Entity @Table(name = "questionTag", catalog = "LearningCommunity") public class QuestionTag implements java.io.Serializable { private Integer questionTagId; private String tagName; private int number; private Set<Question> questions = new HashSet<Question>(0); public QuestionTag() { } public QuestionTag(String tagName, int number) { this.tagName = tagName; this.number = number; } public QuestionTag(String tagName, int number, Set<Question> questions) { this.tagName = tagName; this.number = number; this.questions = questions; } @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "questionTagId", unique = true, nullable = false) public Integer getQuestionTagId() { return this.questionTagId; } public void setQuestionTagId(Integer questionTagId) { this.questionTagId = questionTagId; } @Column(name = "tagName", nullable = false, length = 50) public String getTagName() { return this.tagName; } public void setTagName(String tagName) { this.tagName = tagName; } @Column(name = "number", nullable = false) public int getNumber() { return this.number; } public void setNumber(int number) { this.number = number; } @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "relQuestionTag", catalog = "LearningCommunity", joinColumns = { @JoinColumn(name = "questionTagId", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "questionId", nullable = false, updatable = false) }) public Set<Question> getQuestions() { return this.questions; } public void setQuestions(Set<Question> questions) { this.questions = questions; } }