openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r423328 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
Date Wed, 19 Jul 2006 01:37:08 GMT
Author: pcl
Date: Tue Jul 18 18:37:08 2006
New Revision: 423328

URL: http://svn.apache.org/viewvc?rev=423328&view=rev
Log:
added forgotten new file

Added:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
  (with props)

Added: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java?rev=423328&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
(added)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
Tue Jul 18 18:37:08 2006
@@ -0,0 +1,24 @@
+package org.apache.openjpa.conf;
+
+import java.util.HashMap;
+import java.util.Map;
+
+
+/**
+ * Repository of store-specific facade classes. This is used by facade 
+ * implementations to wrap store-specific components without knowing 
+ * about all possible back-ends.
+ */
+public class StoreFacadeTypeRegistry {
+
+    private Map _impls = new HashMap();
+
+    public void registerImplementation(Class facadeType, 
+        Class implType) {
+        _impls.put(facadeType, implType);
+    }
+    
+    public Class getImplementation(Class facadeType) {
+        return (Class) _impls.get(facadeType);
+    }
+}

Propchange: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/StoreFacadeTypeRegistry.java
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message