From 274bc2e6b718fd172d2cc7a71de1653eecab6963 Mon Sep 17 00:00:00 2001 From: Thomas Rausch Date: Wed, 4 Apr 2018 04:08:05 +0200 Subject: [PATCH] Prepare existing modules for next assignment --- ass1-jpa/pom.xml | 4 ++ .../java/dst/ass1/jpa/util/Constants.java | 2 - .../dst/ass1/jpa/tests/Ass1_2_1cTest.java | 1 + .../java/dst/ass1/jpa/tests/TestData.java | 6 +++ pom.xml | 39 ++++++++++++++++++- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/ass1-jpa/pom.xml b/ass1-jpa/pom.xml index adf9c1c..b191c60 100644 --- a/ass1-jpa/pom.xml +++ b/ass1-jpa/pom.xml @@ -22,6 +22,10 @@ org.hibernate hibernate-core + + org.hibernate + hibernate-validator + com.h2database h2 diff --git a/ass1-jpa/src/main/java/dst/ass1/jpa/util/Constants.java b/ass1-jpa/src/main/java/dst/ass1/jpa/util/Constants.java index 039d5af..1079b1d 100644 --- a/ass1-jpa/src/main/java/dst/ass1/jpa/util/Constants.java +++ b/ass1-jpa/src/main/java/dst/ass1/jpa/util/Constants.java @@ -2,8 +2,6 @@ package dst.ass1.jpa.util; public final class Constants { - // FIXME: update according to model updates (membership, enrollment, course capacity, ...) - public static final String JPA_PERSISTENCE_UNIT = "dst_pu"; /* TYPES (CLASSES) */ diff --git a/ass1-jpa/src/test/java/dst/ass1/jpa/tests/Ass1_2_1cTest.java b/ass1-jpa/src/test/java/dst/ass1/jpa/tests/Ass1_2_1cTest.java index 0ca54ee..ad7b7f7 100644 --- a/ass1-jpa/src/test/java/dst/ass1/jpa/tests/Ass1_2_1cTest.java +++ b/ass1-jpa/src/test/java/dst/ass1/jpa/tests/Ass1_2_1cTest.java @@ -27,6 +27,7 @@ public class Ass1_2_1cTest extends Ass1_TestBase { assertEquals(testData.lecturer2Id, result.get(0).getId()); } + @SuppressWarnings("unchecked") @Test public void namedQuery_withAdditionalAssociation_returnsCorrectResult() throws Exception { ILesson lesson2 = daoFactory.createLessonDAO().findById(testData.lesson2Id); diff --git a/ass1-jpa/src/test/java/dst/ass1/jpa/tests/TestData.java b/ass1-jpa/src/test/java/dst/ass1/jpa/tests/TestData.java index e5075b1..416fff0 100644 --- a/ass1-jpa/src/test/java/dst/ass1/jpa/tests/TestData.java +++ b/ass1-jpa/src/test/java/dst/ass1/jpa/tests/TestData.java @@ -74,6 +74,9 @@ public class TestData implements ITestData { public Long lecturer3Id; public Long participant1Id; public Long participant2Id; + public Long membership1Id; + public Long membership2Id; + public Long membership3Id; public Long lesson1Id; public Long lesson2Id; public Long lesson3Id; @@ -462,6 +465,9 @@ public class TestData implements ITestData { lecturer3Id = lecturer3.getId(); participant1Id = participant1.getId(); participant2Id = participant2.getId(); + membership1Id = membership1.getId(); + membership2Id = membership2.getId(); + membership3Id = membership3.getId(); lesson1Id = lesson1.getId(); lesson2Id = lesson2.getId(); lesson3Id = lesson3.getId(); diff --git a/pom.xml b/pom.xml index 98887aa..b27e897 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ - true + false @@ -111,6 +111,31 @@ ${project.build.directory}/lib + + kr.motd.maven + os-maven-plugin + ${os-maven-plugin.version} + + + org.xolstice.maven.plugins + protobuf-maven-plugin + ${protobuf-maven-plugin.version} + + com.google.protobuf:protoc:3.5.1-1:exe:${os.detected.classifier} + + grpc-java + io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} + + + + + + compile + compile-custom + + + + @@ -178,6 +203,17 @@ + + org.hibernate + hibernate-validator + ${hibernate-validator.version} + + + javax.validation + validation-api + + + com.h2database h2 @@ -261,6 +297,7 @@ 1.3 5.2.13.Final + 5.3.6.Final 2.9.0 3.20.0-GA 1.4.196 -- 2.43.0