atreeid.java

来自「使用spring ,hibernate 框架的稽查管理系统」· Java 代码 · 共 73 行

JAVA
73
字号
package com.je.ims.hibernate;



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

public class AtreeId  implements java.io.Serializable {


    // Fields    

     private Long year;
     private String nodeId;


    // Constructors

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

    public AtreeId(String nodeId,Long year){
    	this.year = year;
    	this.nodeId = nodeId;
    }

   
    // Property accessors

    public Long getYear() {
        return this.year;
    }
    
    public void setYear(Long year) {
        this.year = year;
    }

    public String getNodeId() {
        return this.nodeId;
    }
    
    public void setNodeId(String nodeId) {
        this.nodeId = nodeId;
    }
   



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





}

⌨️ 快捷键说明

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