]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
Rename into Core
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / structure / SimpleSElement.java
diff --git a/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java b/org.argeo.slc.core/src/main/java/org/argeo/slc/core/structure/SimpleSElement.java
new file mode 100644 (file)
index 0000000..8681865
--- /dev/null
@@ -0,0 +1,45 @@
+package org.argeo.slc.core.structure;\r
+\r
+\r
+/**\r
+ * Basic implementation of <code>StructureElement</code>.\r
+ * \r
+ * @see TreeSPath\r
+ */\r
+public class SimpleSElement implements StructureElement {\r
+       /** For ORM */\r
+       private Long tid;\r
+       private String description;\r
+\r
+       /** For ORM */\r
+       public SimpleSElement() {\r
+       }\r
+\r
+       /** Constructor */\r
+       public SimpleSElement(String description) {\r
+               this.description = description;\r
+       }\r
+\r
+       /** Constructor */\r
+       public SimpleSElement(String description, String defaultDescription) {\r
+               this(description != null ? description : defaultDescription);\r
+       }\r
+\r
+       public String getDescription() {\r
+               return description;\r
+       }\r
+\r
+       /** Sets the description. */\r
+       public void setDescription(String description) {\r
+               this.description = description;\r
+       }\r
+\r
+       Long getTid() {\r
+               return tid;\r
+       }\r
+\r
+       void setTid(Long tid) {\r
+               this.tid = tid;\r
+       }\r
+\r
+}\r