aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/com/example/wiimmterfaceandroid/database/FriendCodeDao.java
blob: e9762fdd5d64672d7710d71cc0b77f86fd550d5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.example.wiimmterfaceandroid.database;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.example.wiimmterfaceandroid.model.FriendCode;

import java.util.List;

@Dao
public interface FriendCodeDao {

    @Query("SELECT * FROM friendcode")
    public List<FriendCode> getAll();

    @Query("SELECT * FROM friendcode")
    public FriendCode findByCode(String friendCode);

    @Insert
    public void insert(FriendCode friendCode);

    @Update
    public void update(FriendCode friendCode);

    @Delete
    public void delete(FriendCode friendCode);
}