chinwag-android/app/src/main/java/com/keylesspalace/tusky/db/TootDao.java

34 lines
649 B
Java
Raw Normal View History

2017-06-29 03:33:20 +10:00
package com.keylesspalace.tusky.db;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
2017-06-29 20:01:14 +10:00
import android.arch.persistence.room.Update;
2017-06-29 03:33:20 +10:00
import java.util.List;
/**
* Created by cto3543 on 28/06/2017.
2017-06-29 20:01:14 +10:00
* crud interface on this Toot DB
2017-06-29 03:33:20 +10:00
*/
@Dao
public interface TootDao {
2017-06-29 20:01:14 +10:00
// c
@Insert
long insert(TootEntity users);
// r
2017-06-29 03:33:20 +10:00
@Query("SELECT * FROM TootEntity")
List<TootEntity> loadAll();
2017-06-29 20:01:14 +10:00
// u
@Update
void updateToot(TootEntity toot);
2017-06-29 03:33:20 +10:00
2017-06-29 20:01:14 +10:00
// d
2017-06-29 03:33:20 +10:00
@Delete
2017-07-06 00:35:15 +10:00
int delete(TootEntity user);
2017-06-29 03:33:20 +10:00
}