ArticleBean.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 ArticleBean implements BaseBean{
- @PrimaryKey
- @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
- private Long id;
- @Persistent
- private String title;
- @Persistent
- private Date time;
- @Persistent
- private String type;
- @Persistent(defaultFetchGroup="true")
- private Text content;
- @Persistent
- private Integer sayCount;
- public ArticleBean(String title, Date time, String type, Text content,Integer sayCount) {
- super();
- this.title = title;
- this.time = time;
- this.type = type;
- this.content = content;
- this.sayCount = sayCount;
- }
- public ArticleBean() {
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- public String getTitle() {
- return title;
- }
- public void setTitle(String title) {
- this.title = title;
- }
- public Date getTime2() {
- return time;
- }
- public String getTime(){
- return DateUtil.getTime(time);
- }
- public void setTime(Date time) {
- this.time = time;
- }
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
- public Text getContent2() {
- return content;
- }
- public String getContent() {
- return content.getValue();
- }
- public void setContent(Text content) {
- this.content = content;
- }
- public Integer getSayCount() {
- return sayCount;
- }
- public void setSayCount(Integer sayCount) {
- this.sayCount = sayCount;
- }
- }