package xn.xxp.room.dao;

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

import java.util.List;

import xn.xxp.room.bean.NoticeSummary;

@Dao
public interface NoticeSummaryDao {
    @Query("SELECT * FROM noticesummary")
    List<NoticeSummary> getAll();

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(NoticeSummary... noticeSummaries);

    @Delete
    void delete(NoticeSummary noticesummary);

    @Query("DELETE FROM noticesummary")
    void clear();
}
