transient注解没有生效
package cn.easycms.model;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.beans.Transient;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by hackingwu on 2014/4/23.
*/
@Entity
public class Mail {
private String id;
private String unitId;
private String userId;
private String mailType;
private String title;
private String writer;
private String tel;
private String email;
private String isOpen;
private String content;
private String quryCode;
private String addTime;
private String ip;
private String state;
private String reContent;
private Date reTime;//replyTime
private String proFlow;
private String unitIds;
private String unitName;
private String userName;
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
private String addTimeStr;
private String reTimeStr;
private String stateStr;
@Id
@GeneratedValue(generator = "system-uuid")
@GenericGenerator(name = "system-uuid",strategy = "uuid")
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Column(name = "unitId")
public String getUnitId() {
return unitId;
}
public void setUnitId(String unitId) {
this.unitId = unitId;
}
@Column(name="userId")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@Column(name="mailType")
public String getMailType() {
return mailType;
}
public void setMailType(S