exsrafif

mode_Kategori

Dec 12th, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. package com.cybermandiri.projectandroid.model;
  2.  
  3. import androidx.annotation.NonNull;
  4. import androidx.room.ColumnInfo;
  5. import androidx.room.Entity;
  6. import androidx.room.Index;
  7. import androidx.room.PrimaryKey;
  8.  
  9. @Entity(tableName = "kategori",
  10. indices = {
  11.         @Index("id")
  12.     }
  13. )
  14. public class Kategori {
  15.  
  16.     @PrimaryKey(autoGenerate = true)
  17.     @NonNull
  18.     @ColumnInfo(name = "id")
  19.     private Integer id;
  20.  
  21.     @NonNull
  22.     @ColumnInfo(name = "nama")
  23.     private String nama;
  24.  
  25.     @NonNull
  26.     public Integer getId() {
  27.         return id;
  28.     }
  29.  
  30.     public void setId(@NonNull Integer id) {
  31.         this.id = id;
  32.     }
  33.  
  34.     @NonNull
  35.     public String getNama() {
  36.         return nama;
  37.     }
  38.  
  39.     public void setNama(@NonNull String nama) {
  40.         this.nama = nama;
  41.     }
  42. }
Add Comment
Please, Sign In to add comment