diff artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java @ 277:0a579b71496b

Facets have indices now. artifacts/trunk@2125 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 15 Jun 2011 14:16:04 +0000
parents 41404961c804
children 7fbe674d758a
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java	Thu Jun 09 09:33:29 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java	Wed Jun 15 14:16:04 2011 +0000
@@ -8,6 +8,9 @@
  */
 public class DefaultFacet implements Facet {
 
+    /** The index of this facet.*/
+    protected int index;
+
     /** The name of this facet.*/
     protected String name;
 
@@ -22,11 +25,29 @@
      * @param description The description of this new facet.
      */
     public DefaultFacet(String name, String description) {
+        this(0, name, description);
+    }
+
+
+    /**
+     * The default constructor to create new Facet objects.
+     *
+     * @param index The index of this new facet.
+     * @param name The name of this new facet.
+     * @param description The description of this new facet.
+     */
+    public DefaultFacet(int index, String name, String description) {
+        this.index       = index;
         this.name        = name;
         this.description = description;
     }
 
 
+    public int getIndex() {
+        return index;
+    }
+
+
     public String getName() {
         return name;
     }

http://dive4elements.wald.intevation.org