From 1e3752dfeef2609768df43edebc3b3950cc116c3 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer <paul-christian.volkmer@mni.thm.de> Date: Mon, 3 Mar 2014 15:08:12 +0100 Subject: [PATCH] Ignore courseSession property in JSON serialization --- src/main/java/de/thm/arsnova/entities/Session.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main/java/de/thm/arsnova/entities/Session.java b/src/main/java/de/thm/arsnova/entities/Session.java index fde730e38..1bbf8ad0f 100644 --- a/src/main/java/de/thm/arsnova/entities/Session.java +++ b/src/main/java/de/thm/arsnova/entities/Session.java @@ -21,6 +21,8 @@ package de.thm.arsnova.entities; import java.io.Serializable; import java.util.List; +import com.fasterxml.jackson.annotation.JsonIgnore; + public class Session implements Serializable { private static final long serialVersionUID = 1L; @@ -110,7 +112,7 @@ public class Session implements Serializable { public String get_rev() { return _rev; } - + public void set_conflicts(List<String> conflicts) { _conflicts = conflicts; } @@ -139,14 +141,11 @@ public class Session implements Serializable { this.courseId = courseId; } + @JsonIgnore public boolean isCourseSession() { return (this.getCourseId() != null) && (!this.getCourseId().isEmpty()); } - - public void setCourseSession() { - // no op! - } - + @Override public String toString() { return "User [keyword=" + keyword+ ", type=" + type + "]"; -- GitLab