diff --git a/.gradle/7.4.1/executionHistory/executionHistory.bin b/.gradle/7.4.1/executionHistory/executionHistory.bin index 6a5abacec1e01c962f9e865967656c47a6c8307d..33281a827a1b87bd1ff8b9b1371e512c7774ef43 100644 Binary files a/.gradle/7.4.1/executionHistory/executionHistory.bin and b/.gradle/7.4.1/executionHistory/executionHistory.bin differ diff --git a/.gradle/7.4.1/executionHistory/executionHistory.lock b/.gradle/7.4.1/executionHistory/executionHistory.lock index 9e92eff14d6d9dfc9e1d9fe596dbedd78fdbd043..90fe1561897ebc7d8478c93c4adb84017c56b910 100644 Binary files a/.gradle/7.4.1/executionHistory/executionHistory.lock and b/.gradle/7.4.1/executionHistory/executionHistory.lock differ diff --git a/.gradle/7.4.1/fileHashes/fileHashes.bin b/.gradle/7.4.1/fileHashes/fileHashes.bin index 47a0a14192137e4720d21fe46b31d7edb12e4096..8f22a82777db9ee57577a7a7eab15ccb7a8df76e 100644 Binary files a/.gradle/7.4.1/fileHashes/fileHashes.bin and b/.gradle/7.4.1/fileHashes/fileHashes.bin differ diff --git a/.gradle/7.4.1/fileHashes/fileHashes.lock b/.gradle/7.4.1/fileHashes/fileHashes.lock index bd47d07372b9b6b5f0d866f7a95e180693754e6e..436baac4e24dc27fb8563085be0c7e3e52d5e7bc 100644 Binary files a/.gradle/7.4.1/fileHashes/fileHashes.lock and b/.gradle/7.4.1/fileHashes/fileHashes.lock differ diff --git a/.gradle/7.4.1/fileHashes/resourceHashesCache.bin b/.gradle/7.4.1/fileHashes/resourceHashesCache.bin index e184cc028f7af7e6ff394fd045d7f6725256ed57..f6443d81301f847d291054a4ebea1c053862f4b9 100644 Binary files a/.gradle/7.4.1/fileHashes/resourceHashesCache.bin and b/.gradle/7.4.1/fileHashes/resourceHashesCache.bin differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 963cc8681fd7747f60f8721adf561cf8efa077b5..be4cdd413b3d952cee1d3b821d31c47765aa0645 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/bin/default/src/com/uca/StartServer.class b/bin/default/src/com/uca/StartServer.class new file mode 100644 index 0000000000000000000000000000000000000000..59832dce19f567b9d4dba6c1d1b0c357679ce174 Binary files /dev/null and b/bin/default/src/com/uca/StartServer.class differ diff --git a/bin/default/src/com/uca/core/EleveCore.class b/bin/default/src/com/uca/core/EleveCore.class new file mode 100644 index 0000000000000000000000000000000000000000..1ed39a3137ca963555c4af27e89bcb8575476bf1 Binary files /dev/null and b/bin/default/src/com/uca/core/EleveCore.class differ diff --git a/bin/default/src/com/uca/core/GommetteAttribCore.class b/bin/default/src/com/uca/core/GommetteAttribCore.class new file mode 100644 index 0000000000000000000000000000000000000000..572fa911429b568b75cfac4f5bba92a7c08eed9b Binary files /dev/null and b/bin/default/src/com/uca/core/GommetteAttribCore.class differ diff --git a/bin/default/src/com/uca/core/GommetteCore.class b/bin/default/src/com/uca/core/GommetteCore.class new file mode 100644 index 0000000000000000000000000000000000000000..7bb6713b110333cb28a4db71e4e7f18baae02131 Binary files /dev/null and b/bin/default/src/com/uca/core/GommetteCore.class differ diff --git a/bin/default/src/com/uca/core/ProfCore.class b/bin/default/src/com/uca/core/ProfCore.class new file mode 100644 index 0000000000000000000000000000000000000000..594f98f2947f07c591dde6c69b46a85cdd8e6c37 Binary files /dev/null and b/bin/default/src/com/uca/core/ProfCore.class differ diff --git a/bin/default/src/com/uca/core/UserCore.class b/bin/default/src/com/uca/core/UserCore.class new file mode 100644 index 0000000000000000000000000000000000000000..a15e1cd0ef8cdeb79af9ef60c10bdd1965291831 Binary files /dev/null and b/bin/default/src/com/uca/core/UserCore.class differ diff --git a/bin/default/src/com/uca/dao/EleveDAO.class b/bin/default/src/com/uca/dao/EleveDAO.class new file mode 100644 index 0000000000000000000000000000000000000000..b8eb9684fe66f806b40572eae66c40f36d289c50 Binary files /dev/null and b/bin/default/src/com/uca/dao/EleveDAO.class differ diff --git a/bin/default/src/com/uca/dao/GommetteAttribDAO.class b/bin/default/src/com/uca/dao/GommetteAttribDAO.class new file mode 100644 index 0000000000000000000000000000000000000000..7a5248649fb5ba48dc3936d5948f82ce5d2a2328 Binary files /dev/null and b/bin/default/src/com/uca/dao/GommetteAttribDAO.class differ diff --git a/bin/default/src/com/uca/dao/GommetteDAO.class b/bin/default/src/com/uca/dao/GommetteDAO.class new file mode 100644 index 0000000000000000000000000000000000000000..e4a66fd23569fccbf58c6664ecd5cab9ee3fb191 Binary files /dev/null and b/bin/default/src/com/uca/dao/GommetteDAO.class differ diff --git a/bin/default/src/com/uca/dao/ProfDAO.class b/bin/default/src/com/uca/dao/ProfDAO.class new file mode 100644 index 0000000000000000000000000000000000000000..f5c57013cddeb469190cd535eaccabb858302fbd Binary files /dev/null and b/bin/default/src/com/uca/dao/ProfDAO.class differ diff --git a/bin/default/src/com/uca/dao/UserDAO.class b/bin/default/src/com/uca/dao/UserDAO.class new file mode 100644 index 0000000000000000000000000000000000000000..cd4aa4dff5850fd209116aee607f77bc16524696 Binary files /dev/null and b/bin/default/src/com/uca/dao/UserDAO.class differ diff --git a/bin/default/src/com/uca/dao/_Connector.class b/bin/default/src/com/uca/dao/_Connector.class new file mode 100644 index 0000000000000000000000000000000000000000..ae923f0f5663badbebde9535da56b832e45429ec Binary files /dev/null and b/bin/default/src/com/uca/dao/_Connector.class differ diff --git a/bin/default/src/com/uca/dao/_Generic.class b/bin/default/src/com/uca/dao/_Generic.class new file mode 100644 index 0000000000000000000000000000000000000000..22080ea8cd3b6e4a28db3ee4b20efd22d71fb538 Binary files /dev/null and b/bin/default/src/com/uca/dao/_Generic.class differ diff --git a/bin/default/src/com/uca/dao/_Initializer.class b/bin/default/src/com/uca/dao/_Initializer.class new file mode 100644 index 0000000000000000000000000000000000000000..de96891d15d1744dda564565c3db0eb26dd2ce91 Binary files /dev/null and b/bin/default/src/com/uca/dao/_Initializer.class differ diff --git a/bin/default/src/com/uca/entity/Couleur.class b/bin/default/src/com/uca/entity/Couleur.class new file mode 100644 index 0000000000000000000000000000000000000000..6fd271cfecf6731b9ec93ff837f003c89eae9a9d Binary files /dev/null and b/bin/default/src/com/uca/entity/Couleur.class differ diff --git a/bin/default/src/com/uca/entity/EleveEntity.class b/bin/default/src/com/uca/entity/EleveEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..7d3520247500c9362c871616e51b7e8ac50a44a0 Binary files /dev/null and b/bin/default/src/com/uca/entity/EleveEntity.class differ diff --git a/bin/default/src/com/uca/entity/GommetteAttribEntity.class b/bin/default/src/com/uca/entity/GommetteAttribEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..f64c6e144ca13176864fd7bc87b60337fc04cc34 Binary files /dev/null and b/bin/default/src/com/uca/entity/GommetteAttribEntity.class differ diff --git a/bin/default/src/com/uca/entity/GommetteEntity.class b/bin/default/src/com/uca/entity/GommetteEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..1426ad709a6eca5a6fa808c8e09aa905e7bad254 Binary files /dev/null and b/bin/default/src/com/uca/entity/GommetteEntity.class differ diff --git a/bin/default/src/com/uca/entity/ProfEntity.class b/bin/default/src/com/uca/entity/ProfEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..2e14a3a4c17768ba33b877c3a9187badaf209889 Binary files /dev/null and b/bin/default/src/com/uca/entity/ProfEntity.class differ diff --git a/bin/default/src/com/uca/entity/UserEntity.class b/bin/default/src/com/uca/entity/UserEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..497d13bfc4cd1ea4bdb8501ad37f965bd5647237 Binary files /dev/null and b/bin/default/src/com/uca/entity/UserEntity.class differ diff --git a/bin/default/src/com/uca/gui/DefaultGUI.class b/bin/default/src/com/uca/gui/DefaultGUI.class new file mode 100644 index 0000000000000000000000000000000000000000..43c6dadfc89ea0c511da14b1c8757d808bf70ad8 Binary files /dev/null and b/bin/default/src/com/uca/gui/DefaultGUI.class differ diff --git a/bin/default/src/com/uca/gui/ProfGUI.class b/bin/default/src/com/uca/gui/ProfGUI.class new file mode 100644 index 0000000000000000000000000000000000000000..ddf3d5bca9190dcbc13b0430e876dc4b42d69663 Binary files /dev/null and b/bin/default/src/com/uca/gui/ProfGUI.class differ diff --git a/bin/default/src/com/uca/gui/UserGUI.class b/bin/default/src/com/uca/gui/UserGUI.class new file mode 100644 index 0000000000000000000000000000000000000000..9801019584b4ac48d7e083c0dd1459e430526e21 Binary files /dev/null and b/bin/default/src/com/uca/gui/UserGUI.class differ diff --git a/bin/default/src/com/uca/gui/_FreeMarkerInitializer.class b/bin/default/src/com/uca/gui/_FreeMarkerInitializer.class new file mode 100644 index 0000000000000000000000000000000000000000..ad6ffc28ef0b627f98a53826927fbeb22ecf7ad0 Binary files /dev/null and b/bin/default/src/com/uca/gui/_FreeMarkerInitializer.class differ diff --git a/build/classes/java/main/com/uca/StartServer.class b/build/classes/java/main/com/uca/StartServer.class index 5f00f206253702eb628c8e5cdc2de6884e67a769..bd6b2567c3379e7177da62ebc9e2113485313247 100644 Binary files a/build/classes/java/main/com/uca/StartServer.class and b/build/classes/java/main/com/uca/StartServer.class differ diff --git a/build/classes/java/main/com/uca/dao/ProfDAO.class b/build/classes/java/main/com/uca/dao/ProfDAO.class index af93647a5b60ccc5990e4e8098cac6db5d925fa8..d39c00811d7dc32349cad736154724cdde1f0756 100644 Binary files a/build/classes/java/main/com/uca/dao/ProfDAO.class and b/build/classes/java/main/com/uca/dao/ProfDAO.class differ diff --git a/build/tmp/compileJava/previous-compilation-data.bin b/build/tmp/compileJava/previous-compilation-data.bin index 7b3b34f13279121e2f2df56a7f7643285a21c15d..2526640093f2179b84d6239c0f5162966e490bc2 100644 Binary files a/build/tmp/compileJava/previous-compilation-data.bin and b/build/tmp/compileJava/previous-compilation-data.bin differ diff --git a/src/com/uca/StartServer.java b/src/com/uca/StartServer.java index 0dbad57888c6f7b834d495f87553c339e4bd8881..86883139fd3ecad06b2ce5af089c404b129ec945 100644 --- a/src/com/uca/StartServer.java +++ b/src/com/uca/StartServer.java @@ -8,6 +8,11 @@ import static spark.Spark.*; public class StartServer { //.\gradlew run + + public static void displayLocalHost(int portNb, String suffix) + { + System.out.println("http://localhost:"+portNb+"/"+suffix); + } public static void main(String[] args) { int portNb = 8081; @@ -15,13 +20,20 @@ public class StartServer { staticFiles.location("/static/"); port(portNb); - System.out.println("http://localhost:"+portNb+"/users"); + + _Initializer.Init(); //Defining our routes + displayLocalHost(portNb, "users"); get("/users", (req, res) -> { return UserGUI.getAllUsers(); }); + + displayLocalHost(portNb, "profs"); + get("/profs", (req, res) -> { + return ProfGUI.getAllProfs(); + }); } } \ No newline at end of file diff --git a/src/com/uca/dao/ProfDAO.java b/src/com/uca/dao/ProfDAO.java index 19bbca5d1bc62aeccbb6728ff4b494d9f831ea9b..31b93e0431b22fac731ee3c5c3f399d187a469d6 100644 --- a/src/com/uca/dao/ProfDAO.java +++ b/src/com/uca/dao/ProfDAO.java @@ -29,7 +29,17 @@ public class ProfDAO extends _Generic<ProfEntity> { @Override public ProfEntity create(ProfEntity obj) { - // TODO ! + try { + PreparedStatement stmt = this.connect.prepareStatement("insert into profs (id, firstName, lastName, userName) values (?, ?, ?, ?);"); + int idx = 1; + stmt.setInt (idx++, obj.getId()); + stmt.setString(idx++, obj.getFirstName()); + stmt.setString(idx++, obj.getLastName()); + stmt.setString(idx++, obj.getUserName()); + ResultSet rs = stmt.executeQuery() ; + } catch (SQLException e) { + e.printStackTrace(); + } return null; }