MessageBean.java
资源名称:cindyblog.rar [点击查看]
上传用户:cdpainuo
上传日期:2022-07-12
资源大小:5257k
文件大小:2k
源码类别:
Jsp/Servlet
开发平台:
Java
- package com.appspot.cindyblog.pojo;
- import java.util.Date;
- import javax.jdo.annotations.IdGeneratorStrategy;
- import javax.jdo.annotations.IdentityType;
- import javax.jdo.annotations.PersistenceCapable;
- import javax.jdo.annotations.Persistent;
- import javax.jdo.annotations.PrimaryKey;
- import com.appspot.cindyblog.util.DateUtil;
- import com.google.appengine.api.datastore.Text;
- @PersistenceCapable(identityType = IdentityType.APPLICATION)
- public class MessageBean implements BaseBean{
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- private Long id; //id
- @Persistent
- private String email;
- @Persistent
- private String website;
- @Persistent
- private String name; //标题
- @Persistent
- private Date time; //发表时间
- @Persistent(defaultFetchGroup="true")
- private Text content; //发表内容
- public MessageBean(String email, String website, String name,
- Date time, Text content) {
- super();
- this.email = email;
- this.website = website;
- this.name = name;
- this.time = time;
- this.content = content;
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public Date getTime2() {
- return time;
- }
- public String getTime(){
- return DateUtil.getTime(time);
- }
- public void setTime(Date time) {
- this.time = time;
- }
- public Text getContent2() {
- return content;
- }
- public String getContent(){
- return content.getValue();
- }
- public void setContent(Text content) {
- this.content = content;
- }
- public String getEmail() {
- return email;
- }
- public void setEmail(String email) {
- this.email = email;
- }
- public String getWebsite() {
- return website;
- }
- public void setWebsite(String website) {
- this.website = website;
- }
- }