From c1f561e0059872a4692e562a0944cddb30e468b7 Mon Sep 17 00:00:00 2001 From: nemukemo Date: Mon, 8 Jul 2024 11:41:12 +0900 Subject: [PATCH] =?UTF-8?q?SetUpTableDao=E3=81=AB=E6=97=A2=E5=AD=98?= =?UTF-8?q?=E6=83=85=E5=A0=B1=E3=81=AE=E5=91=BC=E3=81=B3=E5=87=BA=E3=81=97?= =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/example/oplogy/SetUpTableDao.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/example/oplogy/SetUpTableDao.java b/app/src/main/java/com/example/oplogy/SetUpTableDao.java index 5c21478..f0a0aa4 100644 --- a/app/src/main/java/com/example/oplogy/SetUpTableDao.java +++ b/app/src/main/java/com/example/oplogy/SetUpTableDao.java @@ -13,20 +13,24 @@ public interface SetUpTableDao { //更新処理 @Update void update(SetUpTable setUpTable); - //名前が一致しているかの確認 - //削除処理 @Query("DELETE FROM SetUpTable") void deleteAll(); //全件取得 @Query("SELECT * FROM SetUpTable") List getAll(); - + //教師名で検索 @Query("SELECT * FROM SetUpTable WHERE teacherName = :name LIMIT 1") SetUpTable findByName(String name); - + //教師名の取得 + @Query("SELECT teacherName FROM SetUpTable") + String getTeacherName(); + //生徒数の取得 @Query("SELECT totalStudent FROM SetUpTable") int getTotalStudent(); + //addressの取得 + @Query("SELECT startPoint FROM SetUpTable") + String getAddress(); //開始時間と終了時間の取得 @Query("SELECT startTime FROM SetUpTable") String getStartTime();