{"id":1179,"date":"2012-06-01T13:00:00","date_gmt":"2012-06-01T13:00:00","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/2012\/10\/registering-entity-types-with-openjpa-programmatically.html"},"modified":"2012-10-22T04:57:49","modified_gmt":"2012-10-22T04:57:49","slug":"registering-entity-types-with-openjpa","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html","title":{"rendered":"Registering entity types with OpenJPA programmatically"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align: left\">I\u2019ve just started work on <a href=\"https:\/\/issues.apache.org\/jira\/browse\/ISIS-48\">an OpenJPA objectstore<\/a> for <a href=\"http:\/\/www.blogger.com\/incubator.apache.org\/isis\" target=\"_blank\">Isis<\/a>. In the normal scheme of things, one would register the entity types within the <tt>persistence.xml<\/tt> file. However, Isis is a framework that builds its own metamodel, and can figure out for itself which classes constitute entities. I therefore didn\u2019t want to have to force the developer to <a href=\"http:\/\/en.wikipedia.org\/wiki\/Don't_repeat_yourself\" target=\"_blank\">repeat themselves<\/a>, so the puzzle became how to register the entity types programmatically within the Isis code.<\/p>\n<p>It turns out to be pretty simple, if a little ugly. OpenJPA allows implementations of certain key components to be defined programmatically; these are specified in a properties map that is then passed through to <tt>javax.persistence.Persistence.createEntityManager(null, props)<\/tt>. But it also supports a syntax that can be used to initialize those components through setter injection.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>In my case the component of interest is the <tt>openjpa.MetaDataFactory<\/tt>. At one point I thought I\u2019d be writing my own implementation; but it turns out that the standard implementation does what I need, because it allows the types to be injected through its <tt>setTypes(List&lt;String&gt;)<\/tt> mutator. The list of strings is passed into that property as a ;-delimited list.   <\/p>\n<p>So, here\u2019s what I\u2019ve ended up with:<\/p>\n<pre class=\"brush:java\">final Map&lt;String, String&gt; props = Maps.newHashMap();\r\n\r\nfinal String typeList = entityTypeList();\r\nprops.put(\"openjpa.MetaDataFactory\",\r\n  \"org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory(types=\" + typeList + \")\");\r\n\r\n\/\/ ... then add in regular properties such as \r\n\/\/ openjpa.ConnectionURL, openjpa.ConnectionDriverName etc...\r\n            \r\nentityManagerFactory = Persistence.createEntityManagerFactory(null, props);<\/pre>\n<p>where <tt>entityTypeList()<\/tt> in my case looks something like:<\/p>\n<pre class=\"brush:java\">private String entityTypeList() {\r\n    final StringBuilder buf = new StringBuilder();\r\n    \/\/ loop thru Isis' metamodel looking for types that have been annotated using @Entity\r\n    final Collection&lt;ObjectSpecification&gt; allSpecifications = \r\n        getSpecificationLoader().allSpecifications();\r\n    for(ObjectSpecification objSpec: allSpecifications) {\r\n        if(objSpec.containsFacet(JpaEntityFacet.class)) {\r\n            final String fqcn = objSpec.getFullIdentifier();\r\n            buf.append(fqcn).append(\";\");\r\n        }\r\n    }\r\n    final String typeList = buf.toString();\r\n    return typeList;\r\n}<\/pre>\n<p>Comments welcome, as ever<\/p>\n<p><strong><i>Reference: <\/i><\/strong><a href=\"http:\/\/danhaywood.com\/2012\/05\/30\/registering-entity-types-with-openjpa-programmatically\/\">Registering entity types with OpenJPA programmatically<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Dan Haywood at the <a href=\"http:\/\/danhaywood.com\/\">Dan Haywood blog<\/a> blog.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml file. However, Isis is a framework that builds its own metamodel, and can figure out for itself which classes constitute entities. I therefore didn\u2019t want to have to force the &hellip;<\/p>\n","protected":false},"author":125,"featured_media":75,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[471,33],"class_list":["post-1179","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-apache-openjpa","tag-jpa"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Registering entity types with OpenJPA programmatically - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml\" \/>\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\/06\/registering-entity-types-with-openjpa.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Registering entity types with OpenJPA programmatically - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.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-06-01T13:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2012-10-22T04:57:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Dan Haywood\" \/>\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=\"Dan Haywood\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html\"},\"author\":{\"name\":\"Dan Haywood\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/097f2a343c5a25f5902838872b9a3c46\"},\"headline\":\"Registering entity types with OpenJPA programmatically\",\"datePublished\":\"2012-06-01T13:00:00+00:00\",\"dateModified\":\"2012-10-22T04:57:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html\"},\"wordCount\":245,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-openjpa-logo.jpg\",\"keywords\":[\"Apache OpenJPA\",\"JPA\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html\",\"name\":\"Registering entity types with OpenJPA programmatically - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-openjpa-logo.jpg\",\"datePublished\":\"2012-06-01T13:00:00+00:00\",\"dateModified\":\"2012-10-22T04:57:49+00:00\",\"description\":\"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-openjpa-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/apache-openjpa-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2012\\\/06\\\/registering-entity-types-with-openjpa.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\":\"Registering entity types with OpenJPA programmatically\"}]},{\"@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\\\/097f2a343c5a25f5902838872b9a3c46\",\"name\":\"Dan Haywood\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g\",\"caption\":\"Dan Haywood\"},\"sameAs\":[\"http:\\\/\\\/danhaywood.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Dan-Haywood\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Registering entity types with OpenJPA programmatically - Java Code Geeks","description":"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml","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\/06\/registering-entity-types-with-openjpa.html","og_locale":"en_US","og_type":"article","og_title":"Registering entity types with OpenJPA programmatically - Java Code Geeks","og_description":"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml","og_url":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-06-01T13:00:00+00:00","article_modified_time":"2012-10-22T04:57:49+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg","type":"image\/jpeg"}],"author":"Dan Haywood","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Dan Haywood","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html"},"author":{"name":"Dan Haywood","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/097f2a343c5a25f5902838872b9a3c46"},"headline":"Registering entity types with OpenJPA programmatically","datePublished":"2012-06-01T13:00:00+00:00","dateModified":"2012-10-22T04:57:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html"},"wordCount":245,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg","keywords":["Apache OpenJPA","JPA"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html","url":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html","name":"Registering entity types with OpenJPA programmatically - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg","datePublished":"2012-06-01T13:00:00+00:00","dateModified":"2012-10-22T04:57:49+00:00","description":"I\u2019ve just started work on an OpenJPA objectstore for Isis. In the normal scheme of things, one would register the entity types within the persistence.xml","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/apache-openjpa-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2012\/06\/registering-entity-types-with-openjpa.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":"Registering entity types with OpenJPA programmatically"}]},{"@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\/097f2a343c5a25f5902838872b9a3c46","name":"Dan Haywood","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f2802d65ad9600e86cb3c09b9183ffaaa1a819d8b245682055e4728b3b03af9c?s=96&d=mm&r=g","caption":"Dan Haywood"},"sameAs":["http:\/\/danhaywood.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Dan-Haywood"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1179","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\/125"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=1179"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/1179\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/75"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}