Java tutorial
package com.newline.view.company.entity; import java.util.Set; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; import org.apache.commons.lang3.StringUtils; import org.hibernate.annotations.OrderBy; import org.hibernate.annotations.Where; import org.springframework.format.annotation.DateTimeFormat; import com.alibaba.fastjson.annotation.JSONField; import com.newline.core.dict.Dictionary; import com.newline.core.dict.model.DictType; import com.newline.core.language.model.LanguageType; /** * @Title: Entity * @Description: nl_company * @author * @date 2015-08-23 15:40:24 * @version V1.0 * */ @Entity @Table(name = "nl_company") @SuppressWarnings("serial") public class NlCompanyEntity implements java.io.Serializable { private java.lang.Integer id;// ??ID private java.lang.Integer memberid;// ID private java.lang.String realname;// ??() private java.lang.String position;// ??? private java.lang.String name;// ??? private java.lang.String telephone;// ?? private java.lang.String email;// private java.lang.String yyname;// ? private java.lang.String yycompany;// ? private java.lang.String yyaddress;// ?? private java.lang.String yytelephone;// ? private java.lang.String yyemail;// private java.lang.String logo;// logo private java.lang.String description;// ???(???) private java.lang.String album;// ???? private java.lang.String companydesc;// ?? private java.util.Date establishtime;// ? private java.lang.String address;// ?? private java.lang.Integer orcount;// private java.lang.String orname;// ? ? alibaba? ? private java.lang.String city;// private java.lang.String size;// ?? private java.lang.String website;// ? private java.lang.String foreigndisplay;// ?(??) private java.lang.Integer industryid;// ID(?) private java.lang.Integer isauth;// ?? 01?23 private java.lang.String license;// ? private java.util.Date createdtime;// private java.util.Date updatetime;// // *****************************************??******************************************** private java.lang.String telephoneHead;// ?? private java.lang.String telephoneend;// ?? private java.lang.String province;// ? private java.lang.String pcity;// private java.lang.String area;// private java.lang.String postName; // ???? private java.lang.String postEducatereq; // ? private java.lang.String postWorkexp; // ?? private java.lang.String postPosttypeid; // ?? private java.lang.String postDescription; // ???? private java.lang.Integer postSalarystart;// private java.lang.Integer postSalaryend;// private java.lang.String postUpdateTimeBegin;//??() private java.lang.String postUpdateTimeEnd;//??(?) private java.lang.String postArea;//???? private java.lang.String postId; // ??Id // **************************************??************************************* private java.lang.String postEducatereqStr; // ? private java.lang.String postWorkexpStr; // ?? private java.lang.String postPosttypeidStr; // ?? private java.lang.String[] ornameArrays;//? private java.lang.String[] albumArrays;//? @Transient public java.lang.String getPostArea() { return postArea; } public void setPostArea(java.lang.String postArea) { this.postArea = postArea; } @Transient public java.lang.String getPostUpdateTimeBegin() { return postUpdateTimeBegin; } public void setPostUpdateTimeBegin(java.lang.String postUpdateTimeBegin) { this.postUpdateTimeBegin = postUpdateTimeBegin; } @Transient public java.lang.String getPostUpdateTimeEnd() { return postUpdateTimeEnd; } public void setPostUpdateTimeEnd(java.lang.String postUpdateTimeEnd) { this.postUpdateTimeEnd = postUpdateTimeEnd; } @Transient public java.lang.Integer getPostSalarystart() { return postSalarystart; } public void setPostSalarystart(java.lang.Integer postSalarystart) { this.postSalarystart = postSalarystart; } @Transient public java.lang.Integer getPostSalaryend() { return postSalaryend; } public void setPostSalaryend(java.lang.Integer postSalaryend) { this.postSalaryend = postSalaryend; } @Transient public java.lang.String[] getOrnameArrays() { return ornameArrays; } public void setOrnameArrays(java.lang.String[] ornameArrays) { this.ornameArrays = ornameArrays; } @Transient public java.lang.String[] getAlbumArrays() { return albumArrays; } public void setAlbumArrays(java.lang.String[] albumArrays) { this.albumArrays = albumArrays; } @Transient public java.lang.String getPostEducatereqStr() { return postEducatereqStr; } public void setPostEducatereqStr(java.lang.String postEducatereqStr) { this.postEducatereqStr = postEducatereqStr; } @Transient public java.lang.String getPostWorkexpStr() { return postWorkexpStr; } public void setPostWorkexpStr(java.lang.String postWorkexpStr) { this.postWorkexpStr = postWorkexpStr; } @Transient public java.lang.String getPostPosttypeidStr() { return postPosttypeidStr; } public void setPostPosttypeidStr(java.lang.String postPosttypeidStr) { this.postPosttypeidStr = postPosttypeidStr; } // **************************************???************************************* @Transient public java.lang.String getPostName() { return postName; } public void setPostName(java.lang.String postName) { this.postName = postName; } @Transient public java.lang.String getPostEducatereq() { return postEducatereq; } public void setPostEducatereq(java.lang.String postEducatereq) { this.postEducatereq = postEducatereq; if (StringUtils.isNotBlank(postEducatereq)) { String postEducatereqMiddle = Dictionary.getDictValue(LanguageType.getLanguageType(), DictType.CUSTOMER_EDUCATION, postEducatereq); if (StringUtils.isNotBlank(postEducatereqMiddle)) { this.setPostEducatereqStr(postEducatereqMiddle); } } } @Transient public java.lang.String getPostWorkexp() { return postWorkexp; } public void setPostWorkexp(java.lang.String postWorkexp) { this.postWorkexp = postWorkexp; if (StringUtils.isNotBlank(postWorkexp.trim())) { String postWorkexpMiddle = Dictionary.getDictValue(LanguageType.getLanguageType(), DictType.POST_WORKEXP, postWorkexp.trim()); if (StringUtils.isNotBlank(postWorkexpMiddle)) { this.setPostWorkexpStr(postWorkexpMiddle); } } } @Transient public java.lang.String getPostPosttypeid() { return postPosttypeid; } public void setPostPosttypeid(java.lang.String postPosttypeid) { this.postPosttypeid = postPosttypeid; if (StringUtils.isNotBlank(postPosttypeid)) { String postPosttypeidMiddle = Dictionary.getPostValue(postPosttypeid); if (StringUtils.isNotBlank(postPosttypeidMiddle)) { this.setPostPosttypeidStr(postPosttypeidMiddle); } } } @Transient public java.lang.String getPostDescription() { return postDescription; } public void setPostDescription(java.lang.String postDescription) { this.postDescription = postDescription; } @Transient public java.lang.String getPostId() { return postId; } public void setPostId(java.lang.String postId) { this.postId = postId; } @Transient public java.lang.String getTelephoneHead() { return telephoneHead; } public void setTelephoneHead(java.lang.String telephoneHead) { this.telephoneHead = telephoneHead; } @Transient public java.lang.String getTelephoneend() { return telephoneend; } public void setTelephoneend(java.lang.String telephoneend) { this.telephoneend = telephoneend; } @Transient public java.lang.String getProvince() { return province; } public void setProvince(java.lang.String province) { this.province = province; } @Transient public java.lang.String getPcity() { return pcity; } public void setPcity(java.lang.String pcity) { this.pcity = pcity; } @Transient public java.lang.String getArea() { return area; } public void setArea(java.lang.String area) { this.area = area; } // *****************************************???******************************************** // ****************************************************** private java.lang.String cityStr;// ? private java.lang.String sizeStr;// ? private java.lang.String industryidStr;// ? @Transient public java.lang.String getCityStr() { return cityStr; } public void setCityStr(java.lang.String cityStr) { this.cityStr = cityStr; } @Transient public java.lang.String getSizeStr() { return sizeStr; } public void setSizeStr(java.lang.String sizeStr) { this.sizeStr = sizeStr; } @Transient public java.lang.String getIndustryidStr() { return industryidStr; } public void setIndustryidStr(java.lang.String industryidStr) { this.industryidStr = industryidStr; } // **************************?**************************** // ***************************?****************************************** private Set<NlPostEntity> posts;// ??? private Set<NlResumecollectEntity> resumecollects;// ? @OneToMany(fetch = FetchType.LAZY) @JoinColumn(name = "COMPANYID", insertable = false, updatable = false) @Where(clause = "ISDEL=0") @OrderBy(clause = "CREATEDTIME DESC ") public Set<NlPostEntity> getPosts() { return posts; } public void setPosts(Set<NlPostEntity> posts) { this.posts = posts; } @OneToMany(fetch = FetchType.LAZY) @JoinColumn(name = "COMPANYID", insertable = false, updatable = false) @OrderBy(clause = "CREATEDTIME DESC ") public Set<NlResumecollectEntity> getResumecollects() { return resumecollects; } public void setResumecollects(Set<NlResumecollectEntity> resumecollects) { this.resumecollects = resumecollects; } // ***************************??*************************************** /** * : ?java.lang.Integer * * @return: java.lang.Integer ??ID */ @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "ID", nullable = false, length = 10) public java.lang.Integer getId() { return this.id; } /** * : java.lang.Integer * * @param: java.lang.Integer ??ID */ public void setId(java.lang.Integer id) { this.id = id; } /** * : ?java.lang.Integer * * @return: java.lang.Integer ID */ @Column(name = "MEMBERID", nullable = true, length = 10) public java.lang.Integer getMemberid() { return this.memberid; } /** * : java.lang.Integer * * @param: java.lang.Integer ID */ public void setMemberid(java.lang.Integer memberid) { this.memberid = memberid; } /** * : ?java.lang.String * * @return: java.lang.String ??() */ @Column(name = "REALNAME", nullable = true, length = 100) public java.lang.String getRealname() { return this.realname; } /** * : java.lang.String * * @param: java.lang.String ??() */ public void setRealname(java.lang.String realname) { this.realname = realname; } /** * : ?java.lang.String * * @return: java.lang.String ??? */ @Column(name = "POSITION", nullable = true, length = 100) public java.lang.String getPosition() { return this.position; } /** * : java.lang.String * * @param: java.lang.String ??? */ public void setPosition(java.lang.String position) { this.position = position; } /** * : ?java.lang.String * * @return: java.lang.String ??? */ @Column(name = "NAME", nullable = true, length = 500) public java.lang.String getName() { return this.name; } /** * : java.lang.String * * @param: java.lang.String ??? */ public void setName(java.lang.String name) { this.name = name; } /** * : ?java.lang.String * * @return: java.lang.String ?? */ @Column(name = "TELEPHONE", nullable = true, length = 500) public java.lang.String getTelephone() { return this.telephone; } /** * : java.lang.String * * @param: java.lang.String ?? */ public void setTelephone(java.lang.String telephone) { this.telephone = telephone; } /** * : ?java.lang.String * * @return: java.lang.String */ @Column(name = "EMAIL", nullable = true, length = 100) public java.lang.String getEmail() { return this.email; } /** * : java.lang.String * * @param: java.lang.String */ public void setEmail(java.lang.String email) { this.email = email; } /** * : ?java.lang.String * * @return: java.lang.String ? */ @Column(name = "YYNAME", nullable = true, length = 100) public java.lang.String getYyname() { return this.yyname; } /** * : java.lang.String * * @param: java.lang.String ? */ public void setYyname(java.lang.String yyname) { this.yyname = yyname; } /** * : ?java.lang.String * * @return: java.lang.String ? */ @Column(name = "YYCOMPANY", nullable = true, length = 500) public java.lang.String getYycompany() { return this.yycompany; } /** * : java.lang.String * * @param: java.lang.String ? */ public void setYycompany(java.lang.String yycompany) { this.yycompany = yycompany; } /** * : ?java.lang.String * * @return: java.lang.String ?? */ @Column(name = "YYADDRESS", nullable = true, length = 500) public java.lang.String getYyaddress() { return this.yyaddress; } /** * : java.lang.String * * @param: java.lang.String ?? */ public void setYyaddress(java.lang.String yyaddress) { this.yyaddress = yyaddress; } /** * : ?java.lang.Integer * * @return: java.lang.Integer ? */ @Column(name = "YYTELEPHONE", nullable = true, length = 100) public java.lang.String getYytelephone() { return this.yytelephone; } /** * : java.lang.Integer * * @param: java.lang.Integer ? */ public void setYytelephone(java.lang.String yytelephone) { this.yytelephone = yytelephone; } /** * : ?java.lang.String * * @return: java.lang.String */ @Column(name = "YYEMAIL", nullable = true, length = 100) public java.lang.String getYyemail() { return this.yyemail; } /** * : java.lang.String * * @param: java.lang.String */ public void setYyemail(java.lang.String yyemail) { this.yyemail = yyemail; } /** * : ?java.lang.String * * @return: java.lang.String logo */ @Column(name = "LOGO", nullable = true, length = 200) public java.lang.String getLogo() { return this.logo; } /** * : java.lang.String * * @param: java.lang.String logo */ public void setLogo(java.lang.String logo) { this.logo = logo; } /** * : ?java.lang.String * * @return: java.lang.String ???(???) */ @Column(name = "DESCRIPTION", nullable = true, length = 65535) public java.lang.String getDescription() { return this.description; } /** * : java.lang.String * * @param: java.lang.String ???(???) */ public void setDescription(java.lang.String description) { this.description = description; } /** * : ?java.lang.String * * @return: java.lang.String ?? */ @Column(name = "COMPANYDESC", nullable = true, length = 65535) public java.lang.String getCompanydesc() { return this.companydesc; } /** * : java.lang.String * * @param: java.lang.String ?? */ public void setCompanydesc(java.lang.String companydesc) { this.companydesc = companydesc; } /** * : ?java.util.Date * * @return: java.util.Date ? */ @Column(name = "ESTABLISHTIME", nullable = true) @Temporal(TemporalType.DATE) @JSONField(format = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd") public java.util.Date getEstablishtime() { return this.establishtime; } /** * : java.util.Date * * @param: java.util.Date ? */ public void setEstablishtime(java.util.Date establishtime) { this.establishtime = establishtime; } /** * : ?java.lang.String * * @return: java.lang.String ?? */ @Column(name = "ADDRESS", nullable = true, length = 500) public java.lang.String getAddress() { return this.address; } /** * : java.lang.String * * @param: java.lang.String ?? */ public void setAddress(java.lang.String address) { this.address = address; } /** * : ?java.lang.Integer * * @return: java.lang.Integer */ @Column(name = "ORCOUNT", nullable = true, length = 10) public java.lang.Integer getOrcount() { return this.orcount; } /** * : java.lang.Integer * * @param: java.lang.Integer */ public void setOrcount(java.lang.Integer orcount) { this.orcount = orcount; } /** * : ?java.lang.String * * @return: java.lang.String ? ? alibaba? ? */ @Column(name = "ORNAME", nullable = true, length = 100) public java.lang.String getOrname() { return this.orname; } /** * : java.lang.String * * @param: java.lang.String ? ? alibaba? ? */ public void setOrname(java.lang.String orname) { this.orname = orname; if (StringUtils.isNotBlank(orname)) { String[] ornameMiddleArrays = orname.split(","); if (ornameMiddleArrays != null && ornameMiddleArrays.length != 0) { this.setOrnameArrays(ornameMiddleArrays); } } } /** * : ?java.lang.String * * @return: java.lang.String */ @Column(name = "CITY", nullable = true, length = 100) public java.lang.String getCity() { return this.city; } /** * : java.lang.String * * @param: java.lang.String */ public void setCity(java.lang.String city) { this.city = city; if (StringUtils.isNotBlank(city)) { String cityMiddle = Dictionary.getAreas(city, 3); if (cityMiddle != null) { this.setCityStr(cityMiddle); } } } /** * : ?java.lang.String * * @return: java.lang.String ?? */ @Column(name = "SIZE", nullable = true, length = 100) public java.lang.String getSize() { return this.size; } /** * : java.lang.String * * @param: java.lang.String ?? */ public void setSize(java.lang.String size) { this.size = size; if (StringUtils.isNotBlank(size)) { String sizeMiddle = Dictionary.getDictValue(LanguageType.getLanguageType(), DictType.COMPANY_COMPANYSIZE, size); if (sizeMiddle != null) { this.setSizeStr(sizeMiddle); } } } /** * : ?java.lang.String * * @return: java.lang.String ? */ @Column(name = "WEBSITE", nullable = true, length = 500) public java.lang.String getWebsite() { return this.website; } /** * : java.lang.String * * @param: java.lang.String ? */ public void setWebsite(java.lang.String website) { this.website = website; } /** * : ?java.lang.String * * @return: java.lang.String ?(??) */ @Column(name = "FOREIGNDISPLAY", nullable = true, length = 500) public java.lang.String getForeigndisplay() { return this.foreigndisplay; } /** * : java.lang.String * * @param: java.lang.String ?(??) */ public void setForeigndisplay(java.lang.String foreigndisplay) { this.foreigndisplay = foreigndisplay; } /** * : ?java.lang.Integer * * @return: java.lang.Integer ID(?) */ @Column(name = "INDUSTRYID", nullable = true, length = 10) public java.lang.Integer getIndustryid() { return this.industryid; } /** * : java.lang.Integer * * @param: java.lang.Integer ID(?) */ public void setIndustryid(java.lang.Integer industryid) { this.industryid = industryid; if (industryid != null) { String industryidMiddle = Dictionary.getDictValue(LanguageType.getLanguageType(), DictType.COMPANY_INDUSTRYID, industryid.toString()); if (industryidMiddle != null) { this.setIndustryidStr(industryidMiddle); } } } @Column(name = "ALBUM", nullable = true, length = 65535) public java.lang.String getAlbum() { return album; } public void setAlbum(java.lang.String album) { this.album = album; if (StringUtils.isNotBlank(album)) { String[] albumMiddleArrays = album.split(","); if (albumMiddleArrays != null && albumMiddleArrays.length != 0) { this.setAlbumArrays(albumMiddleArrays); } } } /** * : ?java.lang.Integer * * @return: java.lang.Integer ?? 01?23 */ @Column(name = "ISAUTH", nullable = true, length = 3) public java.lang.Integer getIsauth() { return this.isauth; } /** * : java.lang.Integer * * @param: java.lang.Integer ?? 01?23 */ public void setIsauth(java.lang.Integer isauth) { this.isauth = isauth; } /** * : ?java.lang.String * * @return: java.lang.String ? */ @Column(name = "LICENSE", nullable = true, length = 500) public java.lang.String getLicense() { return this.license; } /** * : java.lang.String * * @param: java.lang.String ? */ public void setLicense(java.lang.String license) { this.license = license; } @Column(name = "CREATEDTIME", nullable = true) @Temporal(TemporalType.TIMESTAMP) @JSONField(format = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") public java.util.Date getCreatedtime() { return createdtime; } public void setCreatedtime(java.util.Date createdtime) { this.createdtime = createdtime; } @Column(name = "UPDATETIME", nullable = true) @Temporal(TemporalType.TIMESTAMP) @JSONField(format = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") public java.util.Date getUpdatetime() { return updatetime; } public void setUpdatetime(java.util.Date updatetime) { this.updatetime = updatetime; } }