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

📄 studyid.java

📁 使用hibernate
💻 JAVA
字号:
package com.hibernate.bean;



/**
 * StudyId generated by MyEclipse - Hibernate Tools
 */

public class StudyId  implements java.io.Serializable {


    // Fields    

     private Student student;
     private Course course;


    // Constructors

    /** default constructor */
    public StudyId() {
    }

    
    /** full constructor */
    public StudyId(Student student, Course course) {
        this.student = student;
        this.course = course;
    }

   
    // Property accessors

    public Student getStudent() {
        return this.student;
    }
    
    public void setStudent(Student student) {
        this.student = student;
    }

    public Course getCourse() {
        return this.course;
    }
    
    public void setCourse(Course course) {
        this.course = course;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof StudyId) ) return false;
		 StudyId castOther = ( StudyId ) other; 
         
		 return ( (this.getStudent()==castOther.getStudent()) || ( this.getStudent()!=null && castOther.getStudent()!=null && this.getStudent().equals(castOther.getStudent()) ) ) && ( (this.getCourse()==castOther.getCourse()) || ( this.getCourse()!=null && castOther.getCourse()!=null && this.getCourse().equals(castOther.getCourse()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getStudent() == null ? 0 : this.getStudent().hashCode() );
         result = 37 * result + ( getCourse() == null ? 0 : this.getCourse().hashCode() );
         return result;
   }   





}

⌨️ 快捷键说明

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