229 lines
4.5 KiB
Plaintext
229 lines
4.5 KiB
Plaintext
package com.nationalelectric.greenH5.po;
|
||
//导入 java 类
|
||
import java.io.Serializable;
|
||
import java.sql.Timestamp;
|
||
import java.util.*;
|
||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||
|
||
/**
|
||
* GreenFoodVote的POJO类
|
||
*
|
||
* @author Administrator
|
||
*/
|
||
public class GreenFoodVote implements Serializable{
|
||
/**
|
||
* 序列化
|
||
*/
|
||
private static final long serialVersionUID = 1L;
|
||
|
||
/**
|
||
* 属性id
|
||
*/
|
||
private String id;
|
||
|
||
/**
|
||
* 属性featureId
|
||
*/
|
||
private String featureId;
|
||
|
||
/**
|
||
* 属性voteUser
|
||
*/
|
||
private String voteUser;
|
||
|
||
/**
|
||
* 属性gmtCreated
|
||
*/
|
||
private Timestamp gmtCreated;
|
||
|
||
/**
|
||
* 属性gmtModified
|
||
*/
|
||
private Timestamp gmtModified;
|
||
|
||
/**
|
||
* 属性isDeleted
|
||
*/
|
||
private Character isDeleted = 'N';
|
||
|
||
/**
|
||
* 属性isDeleted
|
||
*/
|
||
private Integer activityNo;
|
||
|
||
/**
|
||
* GreenFoodVote构造函数
|
||
*/
|
||
public GreenFoodVote() {
|
||
super();
|
||
}
|
||
|
||
public Integer getActivityNo() {
|
||
return activityNo;
|
||
}
|
||
|
||
public void setActivityNo(Integer activityNo) {
|
||
this.activityNo = activityNo;
|
||
}
|
||
|
||
/**
|
||
* GreenFoodVote完整的构造函数
|
||
*/
|
||
public GreenFoodVote(String id,String featureId,String voteUser,Timestamp gmtCreated,Timestamp gmtModified,Character isDeleted){
|
||
this.id = id;
|
||
this.featureId = featureId;
|
||
this.voteUser = voteUser;
|
||
this.gmtCreated = gmtCreated;
|
||
this.gmtModified = gmtModified;
|
||
this.isDeleted = isDeleted;
|
||
}
|
||
|
||
/**
|
||
* 属性 主键ID 的get方法
|
||
* @return String
|
||
*/
|
||
public String getId(){
|
||
return id;
|
||
}
|
||
|
||
/**
|
||
* 属性 主键ID 的set方法
|
||
* @return
|
||
*/
|
||
public void setId(String id){
|
||
if(id != null && id.trim().length() == 0){
|
||
this.id = null;
|
||
}else{
|
||
this.id = id;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 属性 推荐菜品id 的get方法
|
||
* @return Long
|
||
*/
|
||
public String getFeatureId(){
|
||
return featureId;
|
||
}
|
||
|
||
/**
|
||
* 属性 推荐菜品id 的set方法
|
||
* @return
|
||
*/
|
||
public void setFeatureId(String featureId){
|
||
this.featureId = featureId;
|
||
}
|
||
|
||
/**
|
||
* 属性 投票人 的get方法
|
||
* @return String
|
||
*/
|
||
public String getVoteUser(){
|
||
return voteUser;
|
||
}
|
||
|
||
/**
|
||
* 属性 投票人 的set方法
|
||
* @return
|
||
*/
|
||
public void setVoteUser(String voteUser){
|
||
this.voteUser = voteUser;
|
||
}
|
||
|
||
/**
|
||
* 属性 创建时间 的get方法
|
||
* @return Timestamp
|
||
*/
|
||
public Timestamp getGmtCreated(){
|
||
return gmtCreated;
|
||
}
|
||
|
||
/**
|
||
* 属性 创建时间 的set方法
|
||
* @return
|
||
*/
|
||
public void setGmtCreated(Timestamp gmtCreated){
|
||
this.gmtCreated = gmtCreated;
|
||
}
|
||
|
||
/**
|
||
* 属性 修改时间 的get方法
|
||
* @return Timestamp
|
||
*/
|
||
public Timestamp getGmtModified(){
|
||
return gmtModified;
|
||
}
|
||
|
||
/**
|
||
* 属性 修改时间 的set方法
|
||
* @return
|
||
*/
|
||
public void setGmtModified(Timestamp gmtModified){
|
||
this.gmtModified = gmtModified;
|
||
}
|
||
|
||
/**
|
||
* 属性 是否删除Y/N,默认N 的get方法
|
||
* @return Character
|
||
*/
|
||
public Character getIsDeleted(){
|
||
return isDeleted;
|
||
}
|
||
|
||
/**
|
||
* 属性 是否删除Y/N,默认N 的set方法
|
||
* @return
|
||
*/
|
||
public void setIsDeleted(Character isDeleted){
|
||
this.isDeleted = isDeleted;
|
||
}
|
||
|
||
/**
|
||
* Hibernate通过该方法判断对象是否相等
|
||
* @return boolean
|
||
*/
|
||
public boolean equals(Object o) {
|
||
if (this == o)
|
||
return true;
|
||
|
||
if (o == null || !(o instanceof GreenFoodVote))
|
||
return false;
|
||
|
||
if(getId() == null)
|
||
return false;
|
||
|
||
GreenFoodVote other = (GreenFoodVote) o;
|
||
return new EqualsBuilder()
|
||
.append(this.getId(), other.getId())
|
||
.isEquals();
|
||
}
|
||
|
||
/**
|
||
* toString方法
|
||
* @return String
|
||
*/
|
||
public String toString(){
|
||
|
||
return new StringBuffer()
|
||
.append("id"+":"+getId())
|
||
.append("featureId"+":"+getFeatureId())
|
||
.append("voteUser"+":"+getVoteUser())
|
||
.append("gmtCreated"+":"+getGmtCreated())
|
||
.append("gmtModified"+":"+getGmtModified())
|
||
.append("isDeleted"+":"+getIsDeleted())
|
||
.toString();
|
||
|
||
}
|
||
|
||
|
||
/**
|
||
* hashcode方法
|
||
* @return int
|
||
*
|
||
*/
|
||
@Override
|
||
public int hashCode(){
|
||
return super.hashCode();
|
||
}
|
||
|
||
} |