{"id":737,"date":"2012-11-11T19:48:32","date_gmt":"2012-11-11T19:48:32","guid":{"rendered":"http:\/\/ilias-laptop\/examples\/enterprise-java\/jpa\/persist-object-with-jpa\/"},"modified":"2019-02-27T14:51:57","modified_gmt":"2019-02-27T12:51:57","slug":"persist-object-with-jpa","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/","title":{"rendered":"Persist object with JPA"},"content":{"rendered":"<p>With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an object\/relational mapping facility for managing relational data in Java applications.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<p>&nbsp;<br \/>\nHere, we are using JPA to persist an object, as shown below:<\/p>\n<h3>The PersistObjectWithJPA class<\/h3>\n<p>In <code>PersistObjectWithJPA<\/code> class we create an <code>EntityManagerFactory<\/code> interface to interact with the entity manager factory for <code>MyPeristenceUnit<\/code>, that is defined in <code>persistence.xml<\/code> file. We create an EntityManager, using the <code>createEntityManager()<\/code> API method. Then, we create a new <code>ProjectManager<\/code> object. The new object is writen to the database, using the <code>persist(java.lang.Object entity)<\/code> API method of <code>EntityManager<\/code>. The <code>getTransaction().begin()<\/code> and <code>getTransaction().commit()<\/code> methods are used before and after the <code>EntityManager<\/code> invokes a method so that a transaction begins and ends.<\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise;\n\nimport java.util.Date;\n\nimport javax.persistence.EntityManager;\nimport javax.persistence.EntityManagerFactory;\nimport javax.persistence.Persistence;\n\npublic class PersistObjectWithJPA {\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"MyPersistenceUnit\");\n\t\t\n\t\tEntityManager em = emf.createEntityManager();\n\t\t\n\t\tem.getTransaction().begin();\n\t\t\n\t\tEmployee employee = new Employee();\n\t\temployee.setName(\"Jack\");\n\t\temployee.setSurname(\"Thomson\");\n\t\temployee.setTitle(\"QA Engineer\");\n\t\temployee.setCreated(new Date());\n\t\t\n\t\tem.persist(employee);\n\t\t\n\t\tem.getTransaction().commit();\n\t\t\n\t\tem.close();\n\t    emf.close();\n\n\t}\n\t\n}\n<\/pre>\n<h3>Employee Class<\/h3>\n<p>The <code>Employee<\/code> class is an entity class, annotated with the <code>javax.persistence.Entity<\/code> annotation. It uses the <code>@Id<\/code> annotation to define its id property, and the <code>@GeneratedValue<\/code> annotation with strategy set to <code>GenerationType.AUTO<\/code> so that the id gets auto-generated values.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">package com.javacodegeeks.snippets.enterprise;\n\nimport java.util.Date;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport javax.persistence.Id;\n\n@Entity\npublic class Employee {\n\t\n\t@Id\n\t@GeneratedValue(strategy=GenerationType.AUTO)\n\tprivate Long id;\n    private String name;\n    private String surname;\n    private String title;\n    private Date created;\n    \n\tpublic Long getId() {\n\t\treturn id;\n\t}\n\tpublic void setId(Long id) {\n\t\tthis.id = id;\n\t}\n\t\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\t\n\tpublic String getSurname() {\n\t\treturn surname;\n\t}\n\tpublic void setSurname(String surname) {\n\t\tthis.surname = surname;\n\t}\n\t\n\tpublic String getTitle() {\n\t\treturn title;\n\t}\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\n\t}\n\t\n\tpublic Date getCreated() {\n\t\treturn created;\n\t}\n\tpublic void setCreated(Date created) {\n\t\tthis.created = created;\n\t}\n\t\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", surname=\" + surname\n\t\t\t\t+ \", title=\" + title + \"]\";\n\t}\n\n}\n<\/pre>\n<p><b>persistence.xml<\/b>[ulp id=&#8217;WII99u1JyPvMb8sP&#8217;]<\/p>\n<pre class=\"brush:xml\">&lt;persistence xmlns=\"http:\/\/java.sun.com\/xml\/ns\/persistence\"\n    xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n    xsi:schemaLocation=\"http:\/\/java.sun.com\/xml\/ns\/persistence http:\/\/java.sun.com\/xml\/ns\/persistence\/persistence_2_0.xsd\"\n    version=\"2.0\"&gt;\n\t\n\t&lt;persistence-unit name=\"MyPersistenceUnit\" transaction-type=\"RESOURCE_LOCAL\"&gt;\n\t\t&lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;\/provider&gt;\n\t\t&lt;properties&gt;\n\t\t\t&lt;property name=\"hibernate.dialect\" value=\"org.hibernate.dialect.MySQL5InnoDBDialect\" \/&gt;\n\t\t\t&lt;property name=\"hibernate.hbm2ddl.auto\" value=\"update\" \/&gt;\n\t\t\t&lt;property name=\"hibernate.connection.driver_class\" value=\"com.mysql.jdbc.Driver\" \/&gt;\n\t\t\t&lt;property name=\"hibernate.connection.username\" value=\"jcg\" \/&gt;\n\t\t\t&lt;property name=\"hibernate.connection.password\" value=\"jcg\" \/&gt;\n\t\t\t&lt;property name=\"hibernate.connection.url\" value=\"jdbc:mysql:\/\/localhost\/companydb\" \/&gt;\n\t\t&lt;\/properties&gt;\n\t&lt;\/persistence-unit&gt;\n\t\n&lt;\/persistence&gt;\n<\/pre>\n<p>&nbsp;<br \/>\nThis was an example of how to persist an object using the JPA.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an object\/relational mapping facility for managing relational data in Java applications. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Here, we are using JPA to persist an object, as &hellip;<\/p>\n","protected":false},"author":6,"featured_media":1240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[198,1028],"class_list":["post-737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jpa","tag-enterprise-java-2","tag-jpa"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Persist object with JPA - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Persist object with JPA - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-11T19:48:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-27T12:51:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-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=\"Byron Kiourtzoglou\" \/>\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=\"Byron Kiourtzoglou\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\"},\"author\":{\"name\":\"Byron Kiourtzoglou\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\"},\"headline\":\"Persist object with JPA\",\"datePublished\":\"2012-11-11T19:48:32+00:00\",\"dateModified\":\"2019-02-27T12:51:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\"},\"wordCount\":187,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"keywords\":[\"enterprise java\",\"jpa\"],\"articleSection\":[\"jpa\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\",\"name\":\"Persist object with JPA - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"datePublished\":\"2012-11-11T19:48:32+00:00\",\"dateModified\":\"2019-02-27T12:51:57+00:00\",\"description\":\"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"jpa\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jpa\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Persist object with JPA\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015\",\"name\":\"Byron Kiourtzoglou\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg\",\"caption\":\"Byron Kiourtzoglou\"},\"description\":\"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.\",\"sameAs\":[\"https:\/\/www.pivotalgamers.com\/\",\"https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Persist object with JPA - Java Code Geeks","description":"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an","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:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/","og_locale":"en_US","og_type":"article","og_title":"Persist object with JPA - Java Code Geeks","og_description":"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an","og_url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2012-11-11T19:48:32+00:00","article_modified_time":"2019-02-27T12:51:57+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Byron Kiourtzoglou","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Byron Kiourtzoglou","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/"},"author":{"name":"Byron Kiourtzoglou","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015"},"headline":"Persist object with JPA","datePublished":"2012-11-11T19:48:32+00:00","dateModified":"2019-02-27T12:51:57+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/"},"wordCount":187,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","keywords":["enterprise java","jpa"],"articleSection":["jpa"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/","url":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/","name":"Persist object with JPA - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","datePublished":"2012-11-11T19:48:32+00:00","dateModified":"2019-02-27T12:51:57+00:00","description":"With this example we are going to demonstrate how to persist an object using the JPA. The Java Persistence API provides Java developers with an","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/enterprise-java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-development\/enterprise-java\/jpa\/persist-object-with-jpa\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/"},{"@type":"ListItem","position":4,"name":"jpa","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/enterprise-java\/jpa\/"},{"@type":"ListItem","position":5,"name":"Persist object with JPA"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/3b111ec1048740c68c9e709ff6240015","name":"Byron Kiourtzoglou","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2013\/10\/Byron-Kiourtzoglou-96x96.jpg","caption":"Byron Kiourtzoglou"},"description":"Byron is a master software engineer working in the IT and Telecom domains. He is an applications developer in a wide variety of applications\/services. He is currently acting as the team leader and technical architect for a proprietary service creation and integration platform for both the IT and Telecom industries in addition to a in-house big data real-time analytics solution. He is always fascinated by SOA, middleware services and mobile development. Byron is co-founder and Executive Editor at Java Code Geeks.","sameAs":["https:\/\/www.pivotalgamers.com\/","https:\/\/www.linkedin.com\/in\/byron-kiourtzoglou-530ab222"],"url":"https:\/\/examples.javacodegeeks.com\/author\/byron-kiourtzoglou\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=737"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/737\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1240"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}