abstractcollectionid.java
来自「在线书库系统 查看图书 编写文章 管理员管理」· Java 代码 · 共 76 行
JAVA
76 行
package StoryManage.Dal;
/**
* AbstractCollectionId entity provides the base persistence definition of the
* CollectionId entity.
*
* @author MyEclipse Persistence Tools
*/
public abstract class AbstractCollectionId implements java.io.Serializable {
// Fields
private Integer userId;
private Integer storyId;
// Constructors
/** default constructor */
public AbstractCollectionId() {
}
/** full constructor */
public AbstractCollectionId(Integer userId, Integer storyId) {
this.userId = userId;
this.storyId = storyId;
}
// Property accessors
public Integer getUserId() {
return this.userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public Integer getStoryId() {
return this.storyId;
}
public void setStoryId(Integer storyId) {
this.storyId = storyId;
}
public boolean equals(Object other) {
if ((this == other))
return true;
if ((other == null))
return false;
if (!(other instanceof AbstractCollectionId))
return false;
AbstractCollectionId castOther = (AbstractCollectionId) other;
return ((this.getUserId() == castOther.getUserId()) || (this
.getUserId() != null
&& castOther.getUserId() != null && this.getUserId().equals(
castOther.getUserId())))
&& ((this.getStoryId() == castOther.getStoryId()) || (this
.getStoryId() != null
&& castOther.getStoryId() != null && this.getStoryId()
.equals(castOther.getStoryId())));
}
public int hashCode() {
int result = 17;
result = 37 * result
+ (getUserId() == null ? 0 : this.getUserId().hashCode());
result = 37 * result
+ (getStoryId() == null ? 0 : this.getStoryId().hashCode());
return result;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?