answernotifypk.java

来自「javaBB,一套很不錯的JSP源碼,特共享給大家」· Java 代码 · 共 77 行

JAVA
77
字号
package org.javabb.vo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** @author Hibernate CodeGenerator */
public class AnswerNotifyPK implements Serializable {

    /** identifier field */
    private Long idTopic;

    /** identifier field */
    private Long idUser;

    /** full constructor */
    public AnswerNotifyPK(Long idTopic, Long idUser) {
        this.idTopic = idTopic;
        this.idUser = idUser;
    }

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

    /** 
     *                @hibernate.property
     *                 column="id_topic"
     *             
     */
    public Long getIdTopic() {
        return this.idTopic;
    }

    public void setIdTopic(Long idTopic) {
        this.idTopic = idTopic;
    }

    /** 
     *                @hibernate.property
     *                 column="id_user"
     *             
     */
    public Long getIdUser() {
        return this.idUser;
    }

    public void setIdUser(Long idUser) {
        this.idUser = idUser;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("idTopic", getIdTopic())
            .append("idUser", getIdUser())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof AnswerNotifyPK) ) return false;
        AnswerNotifyPK castOther = (AnswerNotifyPK) other;
        return new EqualsBuilder()
            .append(this.getIdTopic(), castOther.getIdTopic())
            .append(this.getIdUser(), castOther.getIdUser())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getIdTopic())
            .append(getIdUser())
            .toHashCode();
    }

}

⌨️ 快捷键说明

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