package com.mossle.report.persistence.domain;

// Generated by Hibernate Tools
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * ReportQuery .
 * 
 * @author Lingo
 */
@Entity
@Table(name = "REPORT_QUERY")
public class ReportQuery implements java.io.Serializable {
    private static final long serialVersionUID = 0L;

    /** null. */
    private Long id;

    /** null. */
    private ReportSubject reportSubject;

    /** null. */
    private String name;

    /** null. */
    private String description;

    /** null. */
    private String content;

    /** null. */
    private Integer priority;

    /** . */
    private Set<ReportInfo> reportInfos = new HashSet<ReportInfo>(0);

    /** . */
    private Set<ReportDim> reportDims = new HashSet<ReportDim>(0);

    public ReportQuery() {
    }

    public ReportQuery(Long id) {
        this.id = id;
    }

    public ReportQuery(Long id, ReportSubject reportSubject, String name,
            String description, String content, Integer priority,
            Set<ReportInfo> reportInfos, Set<ReportDim> reportDims) {
        this.id = id;
        this.reportSubject = reportSubject;
        this.name = name;
        this.description = description;
        this.content = content;
        this.priority = priority;
        this.reportInfos = reportInfos;
        this.reportDims = reportDims;
    }

    /** @return null. */
    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return this.id;
    }

    /**
     * @param id
     *            null.
     */
    public void setId(Long id) {
        this.id = id;
    }

    /** @return null. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SUBJECT_ID")
    public ReportSubject getReportSubject() {
        return this.reportSubject;
    }

    /**
     * @param reportSubject
     *            null.
     */
    public void setReportSubject(ReportSubject reportSubject) {
        this.reportSubject = reportSubject;
    }

    /** @return null. */
    @Column(name = "NAME", length = 200)
    public String getName() {
        return this.name;
    }

    /**
     * @param name
     *            null.
     */
    public void setName(String name) {
        this.name = name;
    }

    /** @return null. */
    @Column(name = "DESCRIPTION", length = 200)
    public String getDescription() {
        return this.description;
    }

    /**
     * @param description
     *            null.
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /** @return null. */
    @Column(name = "CONTENT", length = 200)
    public String getContent() {
        return this.content;
    }

    /**
     * @param content
     *            null.
     */
    public void setContent(String content) {
        this.content = content;
    }

    /** @return null. */
    @Column(name = "PRIORITY")
    public Integer getPriority() {
        return this.priority;
    }

    /**
     * @param priority
     *            null.
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "reportQuery")
    public Set<ReportInfo> getReportInfos() {
        return this.reportInfos;
    }

    /**
     * @param reportInfos
     *            .
     */
    public void setReportInfos(Set<ReportInfo> reportInfos) {
        this.reportInfos = reportInfos;
    }

    /** @return . */
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "reportQuery")
    public Set<ReportDim> getReportDims() {
        return this.reportDims;
    }

    /**
     * @param reportDims
     *            .
     */
    public void setReportDims(Set<ReportDim> reportDims) {
        this.reportDims = reportDims;
    }
}
