java网上考试系统
源代码在线查看: classes.java
/*
* @(#)Classes.java Dec 14, 2006
* Copyright 2006 qingdaosoftware, Inc. All rights reserved
*/
package com.qrsx.exam.model;
import java.util.Set;
/**
*
* 功能:
*
*
* View Source
*
*
* Company : QingdaoSoftware
* Author : WangXitao
* Version : 1.0
* Date : Dec 14, 2006
*
* @hibernate.class table="class"
*
* @hibernate.query name="getTeacherNotInClasses"
* query="from Classes where id not in ( select t.classes.id from Teacher t where t.id=:teacherid )"
*
* @struts.form name="classesForm" extends="com.qrsx.exam.struts.form.BaseForm"
*
*/
public class Classes extends Base {
/**
* The Generated serial Version UID
*/
private static final long serialVersionUID = 3662683386669296609L;
/**
* @hibernate.property column="TITLE"
*/
private String title;
/**
* @hibernate.set table="TEACHER_CLASS" lazy="true" cascade="all"
* @hibernate.key column="CLASS_ID"
* @hibernate.many-to-many class="com.qrsx.exam.model.Teacher"
* column="TEACHER_ID"
*/
private Set teachers;
/**
* @hibernate.set inverse="true"
* @hibernate.key column="CLASS_ID"
* @hibernate.one-to-many class="com.qrsx.exam.model.Student"
*/
private Set students;
/**
* Get the class name
*
* @struts.form-field form-name="classesForm"
*
* @struts.validator type="required"
*
* @return Returns the title.
*/
public String getTitle() {
return title;
}
/**
* @param title
* The title to set.
*/
public void setTitle(String title) {
this.title = title;
}
/**
* @return Returns the teachers.
*/
public Set getTeachers() {
return teachers;
}
/**
* @param teachers
* The teachers to set.
*/
public void setTeachers(Set teachers) {
this.teachers = teachers;
}
/**
* @return Returns the students.
*/
public Set getStudents() {
return students;
}
/**
* @param students
* The students to set.
*/
public void setStudents(Set students) {
this.students = students;
}
}