{"id":556,"date":"2014-03-04T14:03:38","date_gmt":"2014-03-04T11:03:38","guid":{"rendered":"http:\/\/www.coding-dude.com\/wp\/?p=556"},"modified":"2018-08-22T07:59:32","modified_gmt":"2018-08-22T04:59:32","slug":"hql-date-datetime-quick-tip","status":"publish","type":"post","link":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/","title":{"rendered":"HQL Date and Datetime Comparison Quick Tip"},"content":{"rendered":"<div class=\"9db0862b9cf2e44f8d962262c5a80491\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-3421619882899259\";\r\n\/* Coding Dude Medium Banner *\/\r\ngoogle_ad_slot = \"2969896483\";\r\ngoogle_ad_width = 468;\r\ngoogle_ad_height = 60;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>I&#8217;m a big fan of Hibernate and I often use in my projects HQL queries. In this post I will give you some quick tips regarding the use of date and datetime data types in HQL.\u00a0In a previous post I was looking at the <a href=\"\/\/www.coding-dude.com\/wp\/java\/hibernate-java\/hibernate-hql-between-expression\/\">HQL date operator BETWEEN<\/a>, but in the current post we will be looking at how to correctly bind date and datetime parameters in HQL queries.<\/p>\n<p>The <a title=\"HQL documentation\" href=\"\/\/docs.jboss.org\/hibernate\/orm\/3.3\/reference\/en\/html\/queryhql.html\" target=\"_blank\" rel=\"noopener\">documentation for HQL<\/a> was not really helpful for me in this situation.<\/p>\n<h2>The problem: HQL date vs datetime queries<\/h2>\n<p><a href=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png\"><img decoding=\"async\" class=\"alignnone wp-image-565 size-full\" src=\"\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png\" alt=\"Hibernate HQL date and datetime\" width=\"312\" height=\"92\" srcset=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png 312w, https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo-300x88.png 300w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/a><\/p>\n<p>When you need to do <strong>HQL\u00a0date comparison<\/strong> you need to take into account\u00a0if you\u00a0want to compare dates at day level or at hour\/second level.<\/p>\n<p>Let&#8217;s see an example:<\/p>\n<pre>public class Event{\r\n\r\nint id;\r\n\r\nString name;\r\n\r\nDate eventDate;\r\n\r\n}<\/pre>\n<p>Mapped with Hibernate on a table with the following structure:<\/p>\n<pre>CREATE TABLE IF NOT EXISTS `event` (\r\n`id` int(11) NOT NULL,\r\n`name` varchar(255) NOT NULL,\r\n`event_date` datetime NOT NULL\r\n)<\/pre>\n<p>I tried to run a custom query to show me <strong>all events that happen today<\/strong>. So I&#8217;ve made an query that\u00a0returns all events with the date and time between start of the day today (00:00 in the morning) and today end of the day (23:59:59) .The Java code with the HQL date query looked something like:<\/p>\n<pre>Date today = new Date();\r\nDate todayMorning = DateUtils.truncate(today, Calendar.DATE);\r\nDate todayEvening = DateUtils.addSeconds(DateUtils.addMinutes(DateUtils.addHours(todayMorning, 23), 59), 59);\r\ngetSession().createQuery(\r\n\"from Event e where e.eventDate between :start and :end\"\r\n)\r\n.setDate(\"start\",todayMorning)\r\n.setDate(\"end\",todayEvening)\r\nlist();\/\/not working because setDate truncates the date to day level<\/pre>\n<p>This did not return the correct results.<\/p>\n<p>So, why doesn&#8217;t this work?<\/p>\n<p>Because\u00a0<strong>&#8220;setDate&#8221; will truncate the HQL date value passed as parameter<\/strong>\u00a0and ignore the hours, minutes, seconds. This is <strong>very important<\/strong> to note especially if you\u00a0have an HQL query <strong>checking between dates from different days<\/strong> because\u00a0using &#8220;setDate&#8221; will interpret the date interval as between midnight of the specified dates.<\/p>\n<h2>The solution &#8211; correct HQL date time parameter binding<\/h2>\n<p>In order for the HQL date query to return the correct results the following code worked:<br \/>\n<code class=\"prettyprint lang-java\"><\/code><\/p>\n<pre>Date today = new Date();\r\nDate todayMorning = DateUtils.truncate(today, Calendar.DATE);\r\nDate todayEvening = DateUtils.addSeconds(DateUtils.addMinutes(DateUtils.addHours(todayMorning, 23), 59), 59);\r\ngetSession().createQuery(\r\n\"from Event e where e.eventDate between :start and :end\"\r\n)\r\n.<strong>setParameter<\/strong>(\"start\",todayMorning)\r\n.<strong>setParameter<\/strong>(\"end\",todayEvening)\r\nlist();<\/pre>\n<p>The difference is that we use &#8220;setParameter&#8221; instead of &#8220;setDate&#8221; which causes the HQL date values to be interpreted as dates and times.<\/p>\n<h2>Working With The HQL Current Date<\/h2>\n<p>To directly use the current date in HQL there are 3 HQL functions:<\/p>\n<div class=\"itemizedlist\">\n<ul class=\"itemizedlist\" compact=\"compact\">\n<li class=\"listitem\"><code class=\"literal\">current_date()<\/code><\/li>\n<li class=\"listitem\"><code class=\"literal\">current_time()<\/code><\/li>\n<li class=\"listitem\"><code class=\"literal\">current_timestamp()<\/code><\/li>\n<\/ul>\n<p>So, all these can be used for getting the current date or time in a HQL query, the only difference being the precision. Read more about working with <a href=\"\/\/www.coding-dude.com\/wp\/hibernate\/hql-current-date\/\">HQL current date<\/a>.<\/p>\n<h2>In Oracle You Can Use HQL <code>trunc()<\/code>\u00a0Date Function<\/h2>\n<p>Another function you can use for HQL date comparison queries is the HQL <code>trunc()<\/code> function. This function discards the hour part of the date.<\/p>\n<p>Please note that this will only work when using Hibernate with Oracle and the <code>OracleDialect<\/code>. This works because this dialect maps the\u00a0<code>trunc()<\/code> HQL function to the Oracle\u00a0<code>trunc()<\/code> function.<\/p>\n<\/div>\n<p>Hope you found this short post useful and if you have any questions please do not hesitate to drop me a comment below.<\/p>\n<!--CusAds0-->\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a big fan of Hibernate and I often use in my projects HQL queries. In this post I will give you some quick tips regarding the use of date and datetime data types in HQL.\u00a0In a previous post I was looking at the HQL date operator BETWEEN, but in the current post we will [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":565,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[135],"tags":[94,38,107],"class_list":["post-556","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-date","tag-hql","tag-hql-current-time"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HQL Date and Datetime Comparison Quick Tip<\/title>\n<meta name=\"description\" content=\"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.\" \/>\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.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HQL Date and Datetime Comparison Quick Tip\" \/>\n<meta property=\"og:description\" content=\"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/\" \/>\n<meta property=\"og:site_name\" content=\"Coding Dude\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-04T11:03:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-22T04:59:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"312\" \/>\n\t<meta property=\"og:image:height\" content=\"92\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"John Negoita\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codingdudecom\" \/>\n<meta name=\"twitter:site\" content=\"@codingdudecom\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"John Negoita\" \/>\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:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/\"},\"author\":{\"name\":\"John Negoita\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/person\\\/29b7100b9ec7bb332359bd9fcba98370\"},\"headline\":\"HQL Date and Datetime Comparison Quick Tip\",\"datePublished\":\"2014-03-04T11:03:38+00:00\",\"dateModified\":\"2018-08-22T04:59:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/\"},\"wordCount\":435,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/hibernatelogo.png\",\"keywords\":[\"date\",\"hql\",\"hql current time\"],\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/\",\"name\":\"HQL Date and Datetime Comparison Quick Tip\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/hibernatelogo.png\",\"datePublished\":\"2014-03-04T11:03:38+00:00\",\"dateModified\":\"2018-08-22T04:59:32+00:00\",\"description\":\"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/hibernatelogo.png\",\"contentUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/hibernatelogo.png\",\"width\":312,\"height\":92,\"caption\":\"hibernate and HQL\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/java\\\/hql-date-datetime-quick-tip\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"HQL Date and Datetime Comparison Quick Tip\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#website\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\",\"name\":\"Coding Dude\",\"description\":\"Coding tutorials, tips and tricks\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#organization\",\"name\":\"Coding Dude\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/codingdude-logo-wide.jpg\",\"contentUrl\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/wp-content\\\/uploads\\\/2018\\\/05\\\/codingdude-logo-wide.jpg\",\"width\":226,\"height\":60,\"caption\":\"Coding Dude\"},\"image\":{\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/codingdudecom\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.coding-dude.com\\\/wp\\\/#\\\/schema\\\/person\\\/29b7100b9ec7bb332359bd9fcba98370\",\"name\":\"John Negoita\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g\",\"caption\":\"John Negoita\"},\"description\":\"I'm a Java programmer, been into programming since 1999 and having tons of fun with it.\",\"sameAs\":[\"http:\\\/\\\/www.coding-dude.com\",\"https:\\\/\\\/x.com\\\/codingdudecom\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HQL Date and Datetime Comparison Quick Tip","description":"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.","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.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/","og_locale":"en_US","og_type":"article","og_title":"HQL Date and Datetime Comparison Quick Tip","og_description":"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.","og_url":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/","og_site_name":"Coding Dude","article_published_time":"2014-03-04T11:03:38+00:00","article_modified_time":"2018-08-22T04:59:32+00:00","og_image":[{"width":312,"height":92,"url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","type":"image\/png"}],"author":"John Negoita","twitter_card":"summary_large_image","twitter_creator":"@codingdudecom","twitter_site":"@codingdudecom","twitter_misc":{"Written by":"John Negoita","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#article","isPartOf":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/"},"author":{"name":"John Negoita","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/person\/29b7100b9ec7bb332359bd9fcba98370"},"headline":"HQL Date and Datetime Comparison Quick Tip","datePublished":"2014-03-04T11:03:38+00:00","dateModified":"2018-08-22T04:59:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/"},"wordCount":435,"commentCount":7,"publisher":{"@id":"https:\/\/www.coding-dude.com\/wp\/#organization"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#primaryimage"},"thumbnailUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","keywords":["date","hql","hql current time"],"articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/","url":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/","name":"HQL Date and Datetime Comparison Quick Tip","isPartOf":{"@id":"https:\/\/www.coding-dude.com\/wp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#primaryimage"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#primaryimage"},"thumbnailUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","datePublished":"2014-03-04T11:03:38+00:00","dateModified":"2018-08-22T04:59:32+00:00","description":"Here is a short post describing the solution for using HQL date and datetime queries. Using setDate vs using setParameter really makes the difference.","breadcrumb":{"@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#primaryimage","url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","contentUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","width":312,"height":92,"caption":"hibernate and HQL"},{"@type":"BreadcrumbList","@id":"https:\/\/www.coding-dude.com\/wp\/java\/hql-date-datetime-quick-tip\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.coding-dude.com\/wp\/"},{"@type":"ListItem","position":2,"name":"HQL Date and Datetime Comparison Quick Tip"}]},{"@type":"WebSite","@id":"https:\/\/www.coding-dude.com\/wp\/#website","url":"https:\/\/www.coding-dude.com\/wp\/","name":"Coding Dude","description":"Coding tutorials, tips and tricks","publisher":{"@id":"https:\/\/www.coding-dude.com\/wp\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.coding-dude.com\/wp\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.coding-dude.com\/wp\/#organization","name":"Coding Dude","url":"https:\/\/www.coding-dude.com\/wp\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/logo\/image\/","url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2018\/05\/codingdude-logo-wide.jpg","contentUrl":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2018\/05\/codingdude-logo-wide.jpg","width":226,"height":60,"caption":"Coding Dude"},"image":{"@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/codingdudecom"]},{"@type":"Person","@id":"https:\/\/www.coding-dude.com\/wp\/#\/schema\/person\/29b7100b9ec7bb332359bd9fcba98370","name":"John Negoita","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d51d5d54d4c51f0a7bfe39333bd98cfc5245ab49433be692fce26b741c08181e?s=96&d=mm&r=g","caption":"John Negoita"},"description":"I'm a Java programmer, been into programming since 1999 and having tons of fun with it.","sameAs":["http:\/\/www.coding-dude.com","https:\/\/x.com\/codingdudecom"]}]}},"jetpack_featured_media_url":"https:\/\/www.coding-dude.com\/wp\/wp-content\/uploads\/2014\/03\/hibernatelogo.png","amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/556","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/comments?post=556"}],"version-history":[{"count":21,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/556\/revisions"}],"predecessor-version":[{"id":2898,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/posts\/556\/revisions\/2898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/media\/565"}],"wp:attachment":[{"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/media?parent=556"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/categories?post=556"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coding-dude.com\/wp\/wp-json\/wp\/v2\/tags?post=556"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}