📄 basemodule.java
字号:
package com.wxd.common.popedom.persistence.entity.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the tb_com_module table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="tb_com_module"
*/
public abstract class BaseModule implements Serializable {
public static String REF = "Module";
public static String PROP_MODULE_NAME = "ModuleName";
public static String PROP_PARENT_ID = "ParentId";
public static String PROP_HASCHILD = "Haschild";
public static String PROP_ID = "Id";
// constructors
public BaseModule () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseModule (java.lang.Integer id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseModule (
java.lang.Integer id,
java.lang.String moduleName,
java.lang.Integer parentId,
java.lang.String haschild) {
this.setId(id);
this.setModuleName(moduleName);
this.setParentId(parentId);
this.setHaschild(haschild);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private java.lang.Integer id;
// fields
private java.lang.String moduleName;
private java.lang.Integer parentId;
private java.lang.String haschild;
// collections
private java.util.Set<com.wxd.common.popedom.persistence.entity.Action> actions;
/**
* Return the unique identifier of this class
* @hibernate.id
* generator-class="native"
* column="module_no"
*/
public java.lang.Integer getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (java.lang.Integer id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: module_name
*/
public java.lang.String getModuleName () {
return moduleName;
}
/**
* Set the value related to the column: module_name
* @param moduleName the module_name value
*/
public void setModuleName (java.lang.String moduleName) {
this.moduleName = moduleName;
}
/**
* Return the value associated with the column: parent_id
*/
public java.lang.Integer getParentId () {
return parentId;
}
/**
* Set the value related to the column: parent_id
* @param parentId the parent_id value
*/
public void setParentId (java.lang.Integer parentId) {
this.parentId = parentId;
}
/**
* Return the value associated with the column: haschild
*/
public java.lang.String getHaschild () {
return haschild;
}
/**
* Set the value related to the column: haschild
* @param haschild the haschild value
*/
public void setHaschild (java.lang.String haschild) {
this.haschild = haschild;
}
/**
* Return the value associated with the column: Actions
*/
public java.util.Set<com.wxd.common.popedom.persistence.entity.Action> getActions () {
return actions;
}
/**
* Set the value related to the column: Actions
* @param actions the Actions value
*/
public void setActions (java.util.Set<com.wxd.common.popedom.persistence.entity.Action> actions) {
this.actions = actions;
}
public void addToActions (com.wxd.common.popedom.persistence.entity.Action action) {
if (null == getActions()) setActions(new java.util.TreeSet<com.wxd.common.popedom.persistence.entity.Action>());
getActions().add(action);
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.wxd.common.popedom.persistence.entity.Module)) return false;
else {
com.wxd.common.popedom.persistence.entity.Module module = (com.wxd.common.popedom.persistence.entity.Module) obj;
if (null == this.getId() || null == module.getId()) return false;
else return (this.getId().equals(module.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -