{"id":1848,"date":"2012-09-10T10:00:00","date_gmt":"2012-09-10T10:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/implementing-entity-services-using-nosql-part-3-couchdb.html"},"modified":"2012-10-22T06:57:25","modified_gmt":"2012-10-22T06:57:25","slug":"implementing-entity-services-using_6090","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html","title":{"rendered":"Implementing Entity Services using NoSQL &#8211; Part 3: CouchDB"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">Following on from <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_8619.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 2.\">Part 2 of this series<\/a> where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to work on the NoSQL database aspects of the service implementation.<\/p>\n<p>As I already mentioned in <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_10.html\" title=\"Implementing Entity Services using NoSQL \u2013 Part 1.\">Part 1<\/a>, I\u2019ve already selected <a href=\"http:\/\/couchdb.apache.org\/\" target=\"_blank\">CouchDB <\/a>as my NoSQL database and the <a href=\"http:\/\/ektorp.org\/\" target=\"_blank\">Ektorp library<\/a> as the database driver.         <\/p>\n<p><strong>CouchDB \u2013 The Relaxed Database.<\/strong>        <\/p>\n<p>CouchDB is essentially going to act as my document store. Natively it stores its documents in <a href=\"http:\/\/en.wikipedia.org\/wiki\/JSON\" target=\"_blank\">JSON format<\/a> (actually a binary version called <a href=\"http:\/\/en.wikipedia.org\/wiki\/BSON\" target=\"_blank\">BSON<\/a> I think) and it requires no prior knowledge of the document\u2019s structure. You can pretty much store anything, and even mix documents of different types in the same database if you want to.         <\/p>\n<p>Because there are no prior setup steps such as DDL scripts or XSD schemas, getting started can be very quick. In fact if you can use CURL you don\u2019t need anything, just issue HTTP commands to CouchDB and your stuff gets stored. As it says on the tin \u2013 CouchDB is fairly relaxed. For a fuller explanation on getting started with the basics of CouchDB see <a href=\"http:\/\/guide.couchdb.org\/\" target=\"_blank\">CouchDB: The Definitive Guide<\/a>.         <\/p>\n<p><strong>Getting from Java to JSON format.<\/strong>        <\/p>\n<p>Of course when we\u2019re in Java, JSON as a String based representation isn\u2019t that convenient for us to use. This is where Ektorp steps in, using the <a href=\"http:\/\/jackson.codehaus.org\/\" target=\"_blank\">Jackson Java-to-JSON library<\/a> to smooth things over. Jackson facilitates an out of the box POJO to JSON conversion process behind the scenes within Ektorp.         <\/p>\n<p>Jackson is an important feature for this project because I want to acheive a clean and hassle free development flow from XML to Java Objects to Database Documents and back again. Jackson is a key component in making this work as we\u2019ll see later.         <\/p>\n<p><strong>CouchDB\u2019s Document Storage Pre-Requisites.<\/strong>        <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Although CouchDB doesn\u2019t need a schema, it does need two basic pieces of data for each document: a unique id and a document revision number. These data items help with managing the documents and implementing the idempotency rules that help maintain document integrity in multi user environments. CouchDB expects these fields to be named <em>\u2018_id\u2019<\/em> and <em>\u2018_revision\u2019<\/em>. _id can be assigned by the user or by the database during create operations. _revision is assigned by the database and increments upwards each time a document\u2019s record is updated.         <\/p>\n<p>Now obviously I didn\u2019t want database specific fields to go into my XML documents, so my definition of a product has a field called \u2018Id\u2019 and a field called \u2018Revision\u2019. Unless I do something, this document would not meet the necessary criteria for storage in CouchDB, and strange things would start to happen like extra _id and _revision fields being added to the database records at runtime that didn\u2019t match the Id and Revision of the XML document I asked CouchDB to store. I don\u2019t want to change my XML schema for a Product in order to add these database specific fields, so what do I do?         <\/p>\n<p>Cleverly, Jackson can be configured to rectify this problem without touching the Java\/JaxB definition of the \u2018Product\u2019 object that is derived from the Product XML schema. It can be told to remap the Product\u2019s \u2018Id\u2019 and \u2018Revision\u2019 fields to the CouchDb \u2018_id\u2019 and \u2018_revision\u2019 fields at runtime. This maintains a degree of loose coupling but allows me to use the same JaxB generated Java objects throughout my code saving a lot of time and effort.         <\/p>\n<p><strong>Accessing the Database.<\/strong>        <\/p>\n<p>CouchDB is not accessed via JDBC and it doesn\u2019t have a traditional JDBC driver. Instead it uses a REST interface (http based GET, PUT, POST, DELETE, etc.) and communicates using JSON formatted content.         <\/p>\n<p><a href=\"http:\/\/ektorp.org\/\" target=\"_blank\">Ektorp<\/a> provides some helper classes to help you work with the CouchDB database. There is a <a href=\"http:\/\/ektorp.org\/javadoc\/ektorp\/1.2.2\/org\/ektorp\/CouchDbConnector.html\" target=\"_blank\">Connector<\/a> class that can be instantiated to establish a workable connection to the database, and a customisable <a href=\"http:\/\/ektorp.org\/javadoc\/ektorp\/1.2.2\/org\/ektorp\/support\/CouchDbRepositorySupport.html\" target=\"_blank\">RepositorySupport<\/a> class that offers type-safe convenience methods for interacting with the database and its records.         <\/p>\n<p><strong>Creating a DAO.<\/strong>        <\/p>\n<p>Once correctly customised by extension and class-typing, the RepositorySupport class can be used for all your basic <a href=\"http:\/\/java.sun.com\/blueprints\/corej2eepatterns\/Patterns\/DataAccessObject.html\" target=\"_blank\">Data Access Object<\/a> requirements such as Get, Create, Update and Remove operations. It can also generate CouchDB views automatically based purely on the name of the methods you add to it (as long as they follow certain rules). This makes it easy to add \u2018find\u2019 methods to your DAO such as \u2018findByManufacturerName\u2019 or \u2018findByCategoryId\u2019. Finally, if you need more sophisticated views or map\/reduce queries, it can help with those too.         <\/p>\n<p><strong>Pulling it all together.<\/strong>        <\/p>\n<p>By configuring Jackson and by using Ektorp to create a DAO, it\u2019s now just a case of writing some integration tests to make sure it all hangs together. The tests I used initially are quite simple, I asked my DAO to\u2026         <\/p>\n<ol>\n<li><em><strong>create<\/strong> <\/em>a fresh JaxB Product object and assign it an ID<\/li>\n<li>save it to my CouchDB \u2018Product\u2019 database<\/li>\n<li><em><strong>read<\/strong><\/em> the Product object from the \u2018Product\u2019 database using it\u2019s ID<\/li>\n<li>modify the Product object &amp; <em><strong>update<\/strong> <\/em>it<\/li>\n<li>retrieve it once more, checking the revision was increased<\/li>\n<li>finally, <em><strong>delete<\/strong> <\/em>the Product object &amp; check that attempts to read it now fail<\/li>\n<\/ol>\n<p>If the DAO code can do all these things, then I have the basic behaviours that I need for my Product Entity Service implementation. However, because it\u2019s an integration test, I need a working CouchDB service to be available during the testing cycle. <a href=\"http:\/\/maven.apache.org\/\" target=\"_blank\">Maven <\/a>can help with integration testing by using the <a href=\"http:\/\/maven.apache.org\/plugins\/maven-failsafe-plugin\/\" target=\"_blank\">Maven Failsafe plugin<\/a> to bind these kinds of tests to the integration-testing specific parts of the Maven build lifecycle. This prevents mixing integration tests in with normal unit tests which usually have fewer dependencies and runtime requirements.         <\/p>\n<p>Getting CouchDB working locally is pretty simple, but it\u2019s also possible to use a <a href=\"http:\/\/www.iriscouch.com\/\" target=\"_blank\">free cloud hosted CouchDB development instance<\/a> if you can\u2019t be bothered with the install and set-up process. I\u2019ve tried both, and they work equally well.         <\/p>\n<p><strong>What\u2019s next?<\/strong>        <\/p>\n<p>Now my CouchDB DAO is complete it\u2019s time to move into the final stages of the project where I\u2019ll link up the DAO behaviours to the Web Service capabilities I created earlier. To do this I\u2019ll be using Java Enterprise Edition 6.         <\/p>\n<p>If you\u2019d like an email notification when the next instalment is published then follow the link on the right to subscribe.         <\/p>\n<p>Continue to <a href=\"http:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_389.html\">Part 4<\/a>.<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/benwilcock.wordpress.com\/2012\/07\/18\/implementing-entity-services-using-nosql-part-3\/\">Implementing Entity Services using NoSQL \u2013 Part 3: CouchDB<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Ben Wilcock at the <a href=\"http:\/\/benwilcock.wordpress.com\/\">SOA, BPM, Agile &amp; Java<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to work on the NoSQL database aspects of the service implementation. As I already mentioned in Part 1, I\u2019ve already selected CouchDB as my NoSQL database and the Ektorp library &hellip;<\/p>\n","protected":false},"author":268,"featured_media":57,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[116,113,433],"class_list":["post-1848","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-couchdb","tag-nosql","tag-soa"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-09-10T10:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T06:57:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"136\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Ben Wilcock\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ben Wilcock\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html\"},\"author\":{\"name\":\"Ben Wilcock\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2d350b077826f7d46a210509a397f080\"},\"headline\":\"Implementing Entity Services using NoSQL &#8211; Part 3: CouchDB\",\"datePublished\":\"2012-09-10T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:57:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html\"},\"wordCount\":1092,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"keywords\":[\"Apache CouchDB\",\"NoSQL\",\"SOA\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html\",\"name\":\"Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"datePublished\":\"2012-09-10T10:00:00+00:00\",\"dateModified\":\"2012-10-22T06:57:25+00:00\",\"description\":\"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-couchdb-logo.jpg\",\"width\":150,\"height\":136},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/09\\\/implementing-entity-services-using_6090.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Implementing Entity Services using NoSQL &#8211; Part 3: CouchDB\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2d350b077826f7d46a210509a397f080\",\"name\":\"Ben Wilcock\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g\",\"caption\":\"Ben Wilcock\"},\"sameAs\":[\"http:\\\/\\\/benwilcock.wordpress.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Ben-Wilcock\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks","description":"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html","og_locale":"en_US","og_type":"article","og_title":"Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks","og_description":"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to","og_url":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-09-10T10:00:00+00:00","article_modified_time":"2012-10-22T06:57:25+00:00","og_image":[{"width":150,"height":136,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","type":"image\/jpeg"}],"author":"Ben Wilcock","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Ben Wilcock","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html"},"author":{"name":"Ben Wilcock","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2d350b077826f7d46a210509a397f080"},"headline":"Implementing Entity Services using NoSQL &#8211; Part 3: CouchDB","datePublished":"2012-09-10T10:00:00+00:00","dateModified":"2012-10-22T06:57:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html"},"wordCount":1092,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","keywords":["Apache CouchDB","NoSQL","SOA"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html","url":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html","name":"Implementing Entity Services using NoSQL - Part 3: CouchDB - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","datePublished":"2012-09-10T10:00:00+00:00","dateModified":"2012-10-22T06:57:25+00:00","description":"Following on from Part 2 of this series where I created and deployed the Product Entity Service using the SOA \u2018contract-first\u2019 technique, I\u2019m now going to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-couchdb-logo.jpg","width":150,"height":136},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/09\/implementing-entity-services-using_6090.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Implementing Entity Services using NoSQL &#8211; Part 3: CouchDB"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2d350b077826f7d46a210509a397f080","name":"Ben Wilcock","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/56494aa90104dce5c0d913dc53446ba80d85fd0c49e799cc026cc39b0c521c98?s=96&d=mm&r=g","caption":"Ben Wilcock"},"sameAs":["http:\/\/benwilcock.wordpress.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Ben-Wilcock"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1848","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/268"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1848"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1848\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/57"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1848"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1848"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1848"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}