operatorrole.java

来自「一个java权限系统.主要使用j2ee框架实现.」· Java 代码 · 共 71 行

JAVA
71
字号
package com.wxd.common.popedom.domain.entity;

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 OperatorRole implements Serializable {

    /** identifier field */
    private com.wxd.common.popedom.domain.entity.OperatorRolePK comp_id;

    /** nullable persistent field */
    private com.wxd.common.popedom.domain.entity.Role role;

    /** full constructor */
    public OperatorRole(com.wxd.common.popedom.domain.entity.OperatorRolePK comp_id, com.wxd.common.popedom.domain.entity.Role role) {
        this.comp_id = comp_id;
        this.role = role;
    }

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

    /** minimal constructor */
    public OperatorRole(com.wxd.common.popedom.domain.entity.OperatorRolePK comp_id) {
        this.comp_id = comp_id;
    }

    public com.wxd.common.popedom.domain.entity.OperatorRolePK getComp_id() {
        return this.comp_id;
    }

    public void setComp_id(com.wxd.common.popedom.domain.entity.OperatorRolePK comp_id) {
        this.comp_id = comp_id;
    }

    public com.wxd.common.popedom.domain.entity.Role getRole() {
        return this.role;
    }

    public void setRole(com.wxd.common.popedom.domain.entity.Role role) {
        this.role = role;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("comp_id", getComp_id())
            .toString();
    }

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

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

}

⌨️ 快捷键说明

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