
net.eulerframework.web.module.basic.entity.DictionaryCode Maven / Gradle / Ivy
package net.eulerframework.web.module.basic.entity;
import java.io.Serializable;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import net.eulerframework.web.core.base.entity.NonIDEntity;
/**
* CODE_TABLE
* 用来存储JS字典数据或系统配置参数
* @author cFrost
*
*/
@SuppressWarnings("serial")
@Entity
@Table(name = "SYS_DICT_CODE")
public class DictionaryCode extends NonIDEntity {
@Id
@Column(name = "CODE")
private String code;
@Column(name = "NAME", nullable = false, unique = true)
private String name;
@OneToMany(cascade=CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name="CODE")
@OrderBy(value="showOrder ASC")
private List dictionarys;
@Override
public String getId() {
return code;
}
@Override
public void setSerializableId(Serializable id) {
this.setCode((String) id);
}
@Override
public int compareTo(DictionaryCode o) {
return this.getId().compareTo(o.getId());
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List getDictionarys() {
return dictionarys;
}
public void setDictionarys(List dictionarys) {
this.dictionarys = dictionarys;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy