📄 basebo.java
字号:
package com.wondersgroup.core;
import java.io.Serializable;
import com.wondersgroup.framework.core.bo.AbstractBaseBO;
public abstract class BaseBo implements Serializable{
public abstract long getId();
/**
* 标记这个BO是否是已经被删除了
*/
public int removed;
/**
* @return return removed.
*
* @hibernate.property
* column = "REMOVED"
* length = "1"
*/
public int getRemoved() {
return removed;
}
/**
* @param removed The removed to set.
*/
public void setRemoved(int removed) {
this.removed = removed;
}
/**
* 判断是否此数据实体是被逻辑删除了
* @return
*/
public boolean isEntityRemoved(){
if (this.removed == 1){
return true;
}
return false;
}
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(Object object){
if (this.getClass().isInstance(object)){
AbstractBaseBO bo = (AbstractBaseBO)object;
if (bo.getId() == this.getId()){
return true;
}
}
return false;
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode(){
return (int) this.getId();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -