[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xindice-dev
Subject:    svn commit: r571953 -
From:       vgritsenko () apache ! org
Date:       2007-09-02 11:04:38
Message-ID: 20070902110439.2845C1A9832 () eris ! apache ! org
[Download RAW message or body]

Author: vgritsenko
Date: Sun Sep  2 04:04:38 2007
New Revision: 571953

URL: http://svn.apache.org/viewvc?rev=571953&view=rev
Log:
remove unused methods

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/data/Record.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/data/Record.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/data/Record.java?rev=571953&r1=571952&r2=571953&view=diff
 ==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/data/Record.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/data/Record.java Sun Sep  2 \
04:04:38 2007 @@ -19,40 +19,37 @@
 
 package org.apache.xindice.core.data;
 
+import java.util.Collections;
 import java.util.Map;
 
 /**
- * Record is a container for Key/Value pair.  Record also provides
- * metadata for a Value stored in the database.
+ * Record is a container for key/value pairs and all meta data stored
+ * with this record in the database.
  *
  * @version $Revision$, $Date$
  */
 public final class Record {
-    public static final String CREATED = "created";
+    public static final String CREATED  = "created";
     public static final String MODIFIED = "modified";
+
     public static final String OWNER = "owner";
     public static final String GROUP = "group";
 
     private final Key key;
-    private Value value;
+    private final Value value;
     private final Map meta;
 
 
-    public Record() {
-        this.key = null;
-        this.meta = null;
-    }
-
-    public Record(Key key, Value value, Map meta) {
+    public Record(Key key, Value value) {
         this.key = key;
         this.value = value;
-        this.meta = meta;
+        this.meta = Collections.EMPTY_MAP;
     }
 
-    public Record(Key key, Value value) {
+    public Record(Key key, Value value, Map meta) {
         this.key = key;
         this.value = value;
-        this.meta = null;
+        this.meta = meta;
     }
 
     /**
@@ -65,24 +62,6 @@
     }
 
     /**
-     * setValue sets the Record's Value.
-     *
-     * @param value The new Value
-     */
-    public void setValue(Value value) {
-        this.value = value;
-    }
-
-    /**
-     * setValue sets the Record's Value.
-     *
-     * @param value The new Value
-     */
-    public void setValue(String value) {
-        this.value = new Value(value);
-    }
-
-    /**
      * getValue returns the Record's Value.
      *
      * @return The Record's Value
@@ -98,6 +77,6 @@
      * @return The metadata value
      */
     public Object getMetaData(Object name) {
-        return meta != null ? meta.get(name) : null;
+        return meta.get(name);
     }
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic