From fd7fb7bd0146847445980c7e5e4ea555570feb4c Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Mon, 18 Apr 2016 07:41:33 +0200 Subject: [PATCH 1/2] make use of the existencechecking annotation for targetrolloutgroup Signed-off-by: Michael Hirsch --- .../eclipse/hawkbit/repository/model/RolloutTargetGroup.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java index f1d4fe718..28a07f061 100644 --- a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java +++ b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java @@ -24,6 +24,9 @@ import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.Table; +import org.eclipse.persistence.annotations.ExistenceChecking; +import org.eclipse.persistence.annotations.ExistenceType; + /** * @author Michael Hirsch * @@ -31,6 +34,7 @@ import javax.persistence.Table; @IdClass(RolloutTargetGroupId.class) @Entity @Table(name = "sp_rollouttargetgroup") +@ExistenceChecking(ExistenceType.ASSUME_NON_EXISTENCE) public class RolloutTargetGroup implements Serializable { private static final long serialVersionUID = 1L; From 8eac737219a84c9e22fbcbe866cf62aad5060d7f Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Mon, 18 Apr 2016 07:47:23 +0200 Subject: [PATCH 2/2] update javadoc and remove author from it Signed-off-by: Michael Hirsch --- .../eclipse/hawkbit/repository/model/RolloutTargetGroup.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java index 28a07f061..7a46b15b1 100644 --- a/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java +++ b/hawkbit-repository/src/main/java/org/eclipse/hawkbit/repository/model/RolloutTargetGroup.java @@ -28,8 +28,9 @@ import org.eclipse.persistence.annotations.ExistenceChecking; import org.eclipse.persistence.annotations.ExistenceType; /** - * @author Michael Hirsch - * + * Entity with JPA annotation to store the information which {@link Target} is + * in a specific {@link RolloutGroup}. + * */ @IdClass(RolloutTargetGroupId.class) @Entity