Android Open Source - note-pad Note






From Project

Back to project page note-pad.

License

The source code is released under:

GNU General Public License

If you think the Android project note-pad listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/**
 * // w w  w .j  a v a  2  s  . com
 */
package in.anandm.apps.notepad.domain.model.note;

import java.io.Serializable;

/**
 * @author anandm
 *
 */
public class Note implements Serializable {

  /**
   * 
   */
  private static final long serialVersionUID = 1L;

  private String title;
  private String note;
  private Long createdOn;
  private Long lastModified;

  public Note(String title, String note) {
    super();
    this.title = title;
    this.note = note;
    createdOn = System.currentTimeMillis();
    lastModified = System.currentTimeMillis();
  }

  public void changeTitle(String newTitle){
    title = newTitle;
    lastModified = System.currentTimeMillis();
  }

  public void changeNote(String newNote){
    note = newNote;
    lastModified = System.currentTimeMillis();;
  }

  public String getTitle(){
    return title;
  }
  public String getNote(){
    return note;
  }
  public Long getCreationTimeStamp(){
    return createdOn;
  }
  public Long getLastModifiedTimeStamp(){
    return lastModified;
  }

  private Long id;


  
  public Long getCreatedOn() {
    return createdOn;
  }

  public void setCreatedOn(Long createdOn) {
    this.createdOn = createdOn;
  }

  public Long getLastModified() {
    return lastModified;
  }

  public void setLastModified(Long lastModified) {
    this.lastModified = lastModified;
  }

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

  public void setNote(String note) {
    this.note = note;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Note() {
    super();
  }

}




Java Source Code List

in.anandm.apps.notepad.domain.model.note.INoteRepository.java
in.anandm.apps.notepad.domain.model.note.Note.java
in.anandm.apps.notepad.infrastructure.persistence.inmemory.NoteRepository.java
in.anandm.apps.notepad.infrastructure.persistence.sqlite.NoteRepository.java
in.anandm.apps.notepad.interfaces.NoteActivity.java
in.anandm.apps.notepad.interfaces.NoteAdapter.java
in.anandm.apps.notepad.interfaces.NotePadMainActivity.java