svn commit: r929809 - in /ofbiz/trunk: LICENSE framework/base/lib/jdbm-1.0-SNAPSHOT.jar framework/base/lib/jdbm-1.0.jar framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r929809 - in /ofbiz/trunk: LICENSE framework/base/lib/jdbm-1.0-SNAPSHOT.jar framework/base/lib/jdbm-1.0.jar framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java

doogie-3
Author: doogie
Date: Thu Apr  1 04:26:40 2010
New Revision: 929809

URL: http://svn.apache.org/viewvc?rev=929809&view=rev
Log:
Upgrade jdbm to a snapshop from svn, version 38; this new version
finally supports generics markup.

Added:
    ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar
Removed:
    ofbiz/trunk/framework/base/lib/jdbm-1.0.jar
Modified:
    ofbiz/trunk/LICENSE
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java

Modified: ofbiz/trunk/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/trunk/LICENSE?rev=929809&r1=929808&r2=929809&view=diff
==============================================================================
--- ofbiz/trunk/LICENSE (original)
+++ ofbiz/trunk/LICENSE Thu Apr  1 04:26:40 2010
@@ -1940,7 +1940,7 @@ JPython version 1.1.x
 =========================================================================
 The JDBM library is licensed under the JDBM LICENSE v1.00 as follows.
 This license is nearly equivalent to the BSD License.
-ofbiz/trunk/framework/base/lib/jdbm-1.0.jar
+ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar
 =========================================================================
 /**
  * JDBM LICENSE v1.00

Added: ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar?rev=929809&view=auto
==============================================================================
Files ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar (added) and ofbiz/trunk/framework/base/lib/jdbm-1.0-SNAPSHOT.jar Thu Apr  1 04:26:40 2010 differ

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java?rev=929809&r1=929808&r2=929809&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmRecordManager.java Thu Apr  1 04:26:40 2010
@@ -21,6 +21,7 @@ package org.ofbiz.base.util.cache;
 import java.io.IOException;
 
 import jdbm.RecordManager;
+import jdbm.helper.ISerializationHandler;
 import jdbm.helper.Serializer;
 import jdbm.recman.BaseRecordManager;
 
@@ -31,13 +32,25 @@ import jdbm.recman.BaseRecordManager;
 public class JdbmRecordManager implements RecordManager {
 
     protected BaseRecordManager manager = null;
-    protected Serializer serial = null;
+    protected JdbmSerializer serial = null;
 
     public JdbmRecordManager(String name) throws IOException {
         manager = new BaseRecordManager(name);
         serial = new JdbmSerializer();
     }
 
+    public ISerializationHandler getSerializationHandler() {
+        return serial;
+    }
+
+    public RecordManager getBaseRecordManager() {
+        return manager;
+    }
+
+    public RecordManager getRecordManager() {
+        return this;
+    }
+
     public long insert(Object o) throws IOException {
         return manager.insert(o, serial);
     }

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java?rev=929809&r1=929808&r2=929809&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/JdbmSerializer.java Thu Apr  1 04:26:40 2010
@@ -21,6 +21,7 @@ package org.ofbiz.base.util.cache;
 import java.io.IOException;
 
 import jdbm.RecordManager;
+import jdbm.helper.ISerializationHandler;
 import jdbm.helper.Serializer;
 
 import org.ofbiz.base.util.UtilObject;
@@ -31,13 +32,21 @@ import org.ofbiz.base.util.UtilObject;
  *
  */
 @SuppressWarnings("serial")
-public class JdbmSerializer implements Serializer {
+public class JdbmSerializer implements Serializer, ISerializationHandler {
 
     public byte[] serialize(Object o) throws IOException {
         return UtilObject.getBytes(o);
     }
 
+    public byte[] serialize(RecordManager recman, long recid, Object o) throws IOException {
+        return UtilObject.getBytes(o);
+    }
+
     public Object deserialize(byte[] bytes) throws IOException {
         return UtilObject.getObject(bytes);
     }
+
+    public Object deserialize(RecordManager recman, long recid, byte[] bytes) throws IOException {
+        return UtilObject.getObject(bytes);
+    }
 }