document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. package com.mochamadahya.notesapp;
  2.  
  3. public class Note {
  4.     public static final String TABLE_NAME = "notes";
  5.  
  6.     public static final String COLUMN_ID = "id";
  7.     public static final String COLUMN_NOTE = "note";
  8.     public static final String COLUMN_TIMESTAMP = "timestamp";
  9.  
  10.     private int id;
  11.     private String note;
  12.     private String timestamp;
  13.  
  14.  
  15.     // Create table SQL query
  16.     public static final String CREATE_TABLE =
  17.             "CREATE TABLE " + TABLE_NAME + "("
  18.                     + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
  19.                     + COLUMN_NOTE + " TEXT,"
  20.                     + COLUMN_TIMESTAMP + " DATETIME DEFAULT CURRENT_TIMESTAMP"
  21.                     + ")";
  22.  
  23.     public Note() {
  24.     }
  25.  
  26.     public Note(int id, String note, String timestamp) {
  27.         this.id = id;
  28.         this.note = note;
  29.         this.timestamp = timestamp;
  30.     }
  31.  
  32.     public int getId() {
  33.         return id;
  34.     }
  35.  
  36.     public String getNote() {
  37.         return note;
  38.     }
  39.  
  40.     public void setNote(String note) {
  41.         this.note = note;
  42.     }
  43.  
  44.     public String getTimestamp() {
  45.         return timestamp;
  46.     }
  47.  
  48.     public void setId(int id) {
  49.         this.id = id;
  50.     }
  51.  
  52.     public void setTimestamp(String timestamp) {
  53.         this.timestamp = timestamp;
  54.     }
  55. }
');