DepartmentTermForm.java

/*
 * +====================================================================+
 * |         Copyright (C) 2015 Rochester Institute of Technology,      |
 * |            103 Lomb Memorial Drive, Rochester, NY - 14623          |
 * |                        All Rights Reserved.                        |
 * +====================================================================+
 *   FILENAME
 *    DepartmentTermForm.java
 *
 *   AUTHOR
 *    @author mhickson
 *
 * =====================================================================
 */

package edu.rit.coopeval.model;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonView;
import edu.rit.coopeval.viewmodel.JsonViewer;

@Entity
@Table(name = "DEPARTMENTTERMFORM")
//@JsonIdentityInfo(property = "departmentTermFormId", generator = ObjectIdGenerators.PropertyGenerator.class)
public class DepartmentTermForm extends AuditableEntity {

    @Id
    @Column(name = "DEPARTMENTTERMFORMID", nullable = false, insertable = true, updatable = true, precision = 0)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_TDAI_DEPARTMENTTERMFORM18")
    @SequenceGenerator(name = "SEQ_TDAI_DEPARTMENTTERMFORM18", sequenceName = "SEQ_TDAI_DEPARTMENTTERMFORM18", allocationSize = 1)
    @JsonView(JsonViewer.Summary.class)
    private long departmentTermFormId;

    @ManyToOne
    @JoinColumn(name = "DEPARTMENTID")
    @JsonView(JsonViewer.Summary.class)
    private Department department;

    @ManyToOne
    @JoinColumn(name = "STUDENTFORMID")
    @JsonView(JsonViewer.Summary.class)
    private Form formByStudentFormId;

    @ManyToOne
    @JoinColumn(name = "EMPLOYERFORMID")
    @JsonView(JsonViewer.Summary.class)
    private Form formByEmployerFormId;

    @ManyToOne
    @JoinColumn(name = "TERMID")
    @JsonView(JsonViewer.Summary.class)
    private Term termByTermId;

    public long getDepartmentTermFormId() {
        return departmentTermFormId;
    }

    public void setDepartmentTermFormId(long departmentTermFormId) {
        this.departmentTermFormId = departmentTermFormId;
    }

    public Department getDepartment() {
        return department;
    }

    public void setDepartment(Department department) {
        this.department = department;
    }

    public Form getFormByStudentFormId() {
        return formByStudentFormId;
    }

    public void setFormByStudentFormId(Form formByStudentFormId) {
        this.formByStudentFormId = formByStudentFormId;
    }

    public Form getFormByEmployerFormId() {
        return formByEmployerFormId;
    }

    public void setFormByEmployerFormId(Form formByEmployerFormId) {
        this.formByEmployerFormId = formByEmployerFormId;
    }

    public Term getTermByTermId() {
        return termByTermId;
    }

    public void setTermByTermId(Term termByTermId) {
        this.termByTermId = termByTermId;
    }
}