⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 course.java

📁 RESIN 3.2 最新源码
💻 JAVA
字号:
package example;import javax.persistence.*;/** * Local interface for a course taught at Hogwarts, providing * methods to view and change it. * * <code><pre> * CREATE TABLE amber_basic_courses ( *   id INTEGER PRIMARY KEY auto_increment *   course VARCHAR(250) UNIQUE, *   teacher VARCHAR(250), *  *   PRIMARY KEY(course_id) * ); * </pre></code> */@Entity@Table(name="amber_create_courses")public class Course {  private int _id;  private String _course;  private String _teacher;  /**   * Null-arg constructor.   */  public Course()  {  }  /**   * Null-arg constructor.   */  public Course(String course, String teacher)  {    _course = course;    _teacher = teacher;  }    /**   * Returns the ID of the course.   */  @Id  @Column(name="id")  @GeneratedValue  public int getId()  {    return _id;  }    public void setId(int id)  {    _id = id;  }  /**   * Returns the course name.   */  @Basic  @Column(unique=true)  public String getCourse()  {    return _course;  }  /**   * Sets the course name.   */  public void setCourse(String course)  {    _course = course;  }  /**   * Returns the teacher name.   */  @Basic  public String getTeacher()  {    return _teacher;  }  /**   * Sets the teacher name.   */  public void setTeacher(String teacher)  {    _teacher = teacher;  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -