]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - cms/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java
Clarify SLC project structure.
[gpl/argeo-slc.git] / cms / org.argeo.slc.support / src / org / argeo / slc / diff / DiffIssueKey.java
diff --git a/cms/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java b/cms/org.argeo.slc.support/src/org/argeo/slc/diff/DiffIssueKey.java
new file mode 100644 (file)
index 0000000..c9dde85
--- /dev/null
@@ -0,0 +1,37 @@
+package org.argeo.slc.diff;
+
+/** Intermediate class that can hold the key to be displayed. */
+public abstract class DiffIssueKey extends DiffIssue {
+       /** The position of this issue. */
+       protected DiffKey key;
+
+       /** Constructor without key */
+       public DiffIssueKey(DiffPosition position) {
+               super(position);
+       }
+
+       /** Constructor with key */
+       public DiffIssueKey(DiffPosition position, DiffKey key) {
+               super(position);
+               this.key = key;
+       }
+
+       public Object getKey() {
+               return key;
+       }
+
+       @Override
+       public String toString() {
+               if (key != null) {
+                       return key.toString();
+               } else {
+                       return "";
+               }
+       }
+
+       // Hibernate
+       @SuppressWarnings("unused")
+       private void setKey(DiffKey key) {
+               this.key = key;
+       }
+}