Package org.teammach.laddercomp.shared

Source Code of org.teammach.laddercomp.shared.BlogEntry

package org.teammach.laddercomp.shared;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.Text;

@PersistenceCapable(detachable="true")
public class BlogEntry {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

   
    @Persistent
    private Text content;
   
    @Persistent
    private String title;
   
    @Persistent
    private Boolean deleted = false;
   
    public Boolean getDeleted() {
    return deleted;
  }

  public void setDeleted(Boolean deleted) {
    this.deleted = deleted;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  @Persistent
    private Date created;
   
    public BlogEntry(String title, String content) {
      this.title = title;
      this.content = new Text(content);
      this.created = new Date();
    }

  public Key getKey() {
    return key;
  }

  public void setKey(Key key) {
    this.key = key;
  }

  public String getContent() {
 
    return content.getValue();
  }

  public void setContent(String content2) {
    this.content = new Text(content2);
  }
 

  public Date getCreated() {
    return created;
  }

  public void setCreated(Date created) {
    this.created = created;
  }
 
   
}
TOP

Related Classes of org.teammach.laddercomp.shared.BlogEntry

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.