diff --git a/pom.xml b/pom.xml
index ca2642b3..940ad405 100644
--- a/pom.xml
+++ b/pom.xml
@@ -67,5 +67,10 @@
3.1.3.RELEASEtest
+
+ org.springframework.data
+ spring-data-commons-core
+ 1.4.0.RELEASE
+
diff --git a/src/main/java/com/couchbase/spring/core/CouchbaseFactory.java b/src/main/java/com/couchbase/spring/core/CouchbaseFactory.java
new file mode 100644
index 00000000..43acd95f
--- /dev/null
+++ b/src/main/java/com/couchbase/spring/core/CouchbaseFactory.java
@@ -0,0 +1,31 @@
+/**
+ * Copyright (C) 2009-2012 Couchbase, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING
+ * IN THE SOFTWARE.
+ */
+
+package com.couchbase.spring.core;
+
+import com.couchbase.client.CouchbaseClient;
+
+public interface CouchbaseFactory {
+
+ CouchbaseClient getDb();
+
+}
diff --git a/src/main/java/com/couchbase/spring/core/convert/AbstractCouchbaseConverter.java b/src/main/java/com/couchbase/spring/core/convert/AbstractCouchbaseConverter.java
new file mode 100644
index 00000000..fbe325e1
--- /dev/null
+++ b/src/main/java/com/couchbase/spring/core/convert/AbstractCouchbaseConverter.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (C) 2009-2012 Couchbase, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING
+ * IN THE SOFTWARE.
+ */
+
+package com.couchbase.spring.core.convert;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.core.convert.ConversionService;
+import org.springframework.core.convert.support.GenericConversionService;
+
+public abstract class AbstractCouchbaseConverter implements CouchbaseConverter,
+ InitializingBean {
+
+ protected final GenericConversionService conversionService;
+
+ public AbstractCouchbaseConverter(
+ GenericConversionService conversionService) {
+ this.conversionService = conversionService;
+ }
+
+ public ConversionService getConversionService() {
+ return conversionService;
+ }
+
+ public void afterPropertiesSet() throws Exception {
+
+ }
+
+}
diff --git a/src/main/java/com/couchbase/spring/core/convert/CouchbaseConverter.java b/src/main/java/com/couchbase/spring/core/convert/CouchbaseConverter.java
new file mode 100644
index 00000000..927c40f6
--- /dev/null
+++ b/src/main/java/com/couchbase/spring/core/convert/CouchbaseConverter.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (C) 2009-2012 Couchbase, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING
+ * IN THE SOFTWARE.
+ */
+
+package com.couchbase.spring.core.convert;
+
+import com.couchbase.spring.core.mapping.CouchbasePersistentEntity;
+import com.couchbase.spring.core.mapping.CouchbasePersistentProperty;
+import org.springframework.data.convert.EntityConverter;
+import org.springframework.data.convert.EntityReader;
+
+public interface CouchbaseConverter extends
+ EntityConverter,
+ CouchbasePersistentProperty, Object, Object>,
+ CouchbaseWriter