diff --git a/.idea/libraries/formdev_flatlaf.xml b/.idea/libraries/formdev_flatlaf.xml
new file mode 100644
index 0000000..de16dd7
--- /dev/null
+++ b/.idea/libraries/formdev_flatlaf.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Library/src/main/java/com/cfive/classroom/library/database/DatabaseHelper.java b/Library/src/main/java/com/cfive/classroom/library/database/DatabaseHelper.java
index 38e3035..42cf504 100644
--- a/Library/src/main/java/com/cfive/classroom/library/database/DatabaseHelper.java
+++ b/Library/src/main/java/com/cfive/classroom/library/database/DatabaseHelper.java
@@ -133,7 +133,7 @@ public class DatabaseHelper {
return ClassOA.selectAll();
}
- public static AClass selectFromClass(int classID) throws NoConfigException, SQLException {
+ public static AClass selectFromClass(long classID) throws NoConfigException, SQLException {
return ClassOA.select(classID);
}
@@ -157,7 +157,7 @@ public class DatabaseHelper {
return ClassOA.insert(classID, majorName, grade, classNum);
}
- public static boolean isExistsInClass(int classID) throws NoConfigException, SQLException {
+ public static boolean isExistsInClass(long classID) throws NoConfigException, SQLException {
return ClassOA.isExists(classID);
}
@@ -165,7 +165,7 @@ public class DatabaseHelper {
return ClassOA.isExists(majorID, grade, classNum);
}
- public static boolean deleteFromClass(int classID) throws NoConfigException, SQLException {
+ public static boolean deleteFromClass(long classID) throws NoConfigException, SQLException {
return ClassOA.delete(classID);
}
@@ -177,7 +177,7 @@ public class DatabaseHelper {
return StudentOA.selectAll();
}
- public static Student selectFromStudent(int stuID) throws NoConfigException, SQLException {
+ public static Student selectFromStudent(long stuID) throws NoConfigException, SQLException {
return StudentOA.select(stuID);
}
@@ -185,11 +185,11 @@ public class DatabaseHelper {
return StudentOA.insert(stuID, stuName, gender, classID, passwd, salt);
}
- public static boolean isExistsInStudent(int stuID) throws NoConfigException, SQLException {
+ public static boolean isExistsInStudent(long stuID) throws NoConfigException, SQLException {
return StudentOA.isExists(stuID);
}
- public static boolean deleteFromStudent(int stuID) throws NoConfigException, SQLException {
+ public static boolean deleteFromStudent(long stuID) throws NoConfigException, SQLException {
return StudentOA.delete(stuID);
}
@@ -205,11 +205,11 @@ public class DatabaseHelper {
return TeacherOA.insert(tchID, tchName, gender, facID, passwd, salt);
}
- public static boolean isExistsInTeacher(int tchID) throws NoConfigException, SQLException {
+ public static boolean isExistsInTeacher(long tchID) throws NoConfigException, SQLException {
return TeacherOA.isExists(tchID);
}
- public static boolean deleteFromTeacher(int tchID) throws NoConfigException, SQLException {
+ public static boolean deleteFromTeacher(long tchID) throws NoConfigException, SQLException {
return TeacherOA.delete(tchID);
}
@@ -217,7 +217,7 @@ public class DatabaseHelper {
return CourseOA.selectAll();
}
- public static Course selectFromCourse(int courID) throws NoConfigException, SQLException {
+ public static Course selectFromCourse(long courID) throws NoConfigException, SQLException {
return CourseOA.select(courID);
}
@@ -225,11 +225,11 @@ public class DatabaseHelper {
return CourseOA.insert(courID, subID, tchID, courTimeStart, courTimeEnd);
}
- public static boolean isExistsInCourse(int courID) throws NoConfigException, SQLException {
+ public static boolean isExistsInCourse(long courID) throws NoConfigException, SQLException {
return CourseOA.isExists(courID);
}
- public static boolean deleteFromCourse(int courID) throws NoConfigException, SQLException {
+ public static boolean deleteFromCourse(long courID) throws NoConfigException, SQLException {
return CourseOA.delete(courID);
}
@@ -253,6 +253,12 @@ public class DatabaseHelper {
return AttendanceOA.delete(attID);
}
+ public static boolean queryCourses(long tchID) throws NoConfigException, SQLException, DependenciesNotFoundException {
+ if (isExistsInTeacher(tchID)) throw new DependenciesNotFoundException();
+ // TODO: Query Courses
+ return false;
+ }
+
public static void close() {
PoolHelper.close();
}
diff --git a/Student/src/main/ClassroomInteraction.Student.main.iml b/Student/src/main/ClassroomInteraction.Student.main.iml
index 094a601..518b675 100644
--- a/Student/src/main/ClassroomInteraction.Student.main.iml
+++ b/Student/src/main/ClassroomInteraction.Student.main.iml
@@ -12,5 +12,6 @@
+
\ No newline at end of file
diff --git a/Student/src/test/ClassroomInteraction.Student.test.iml b/Student/src/test/ClassroomInteraction.Student.test.iml
index 6c4c600..6c5c32b 100644
--- a/Student/src/test/ClassroomInteraction.Student.test.iml
+++ b/Student/src/test/ClassroomInteraction.Student.test.iml
@@ -14,5 +14,6 @@
+
\ No newline at end of file
diff --git a/Teacher/src/main/ClassroomInteraction.Teacher.main.iml b/Teacher/src/main/ClassroomInteraction.Teacher.main.iml
index 094a601..518b675 100644
--- a/Teacher/src/main/ClassroomInteraction.Teacher.main.iml
+++ b/Teacher/src/main/ClassroomInteraction.Teacher.main.iml
@@ -12,5 +12,6 @@
+
\ No newline at end of file
diff --git a/Teacher/src/test/ClassroomInteraction.Teacher.test.iml b/Teacher/src/test/ClassroomInteraction.Teacher.test.iml
index 023a09e..c53f364 100644
--- a/Teacher/src/test/ClassroomInteraction.Teacher.test.iml
+++ b/Teacher/src/test/ClassroomInteraction.Teacher.test.iml
@@ -14,5 +14,6 @@
+
\ No newline at end of file
diff --git a/lib/flatlaf-1.2.jar b/lib/flatlaf-1.2.jar
new file mode 100644
index 0000000..39ed9c8
Binary files /dev/null and b/lib/flatlaf-1.2.jar differ