userskey.java
来自「j2ee源码」· Java 代码 · 共 47 行
JAVA
47 行
package com.leeman.wkexs.master.users.dao;
/**
* Key class for Entity Bean: Users
*/
public class UsersKey implements java.io.Serializable {
static final long serialVersionUID = 3206093459760846163L;
/**
* Implementation field for persistent attribute: company_id
*/
public java.lang.String company_id;
/**
* Implementation field for persistent attribute: user_id
*/
public java.lang.String user_id;
/**
* Creates an empty key for Entity Bean: Users
*/
public UsersKey() {
}
/**
* Creates a key for Entity Bean: Users
*/
public UsersKey(java.lang.String company_id, java.lang.String user_id) {
this.company_id = company_id;
this.user_id = user_id;
}
/**
* Returns true if both keys are equal.
*/
public boolean equals(java.lang.Object otherKey) {
if (otherKey instanceof com.leeman.wkexs.master.users.dao.UsersKey) {
com.leeman.wkexs.master.users.dao.UsersKey o =
(com.leeman.wkexs.master.users.dao.UsersKey) otherKey;
return (
(this.company_id.equals(o.company_id))
&& (this.user_id.equals(o.user_id)));
}
return false;
}
/**
* Returns the hash code for the key.
*/
public int hashCode() {
return (company_id.hashCode() + user_id.hashCode());
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?