Java Code Geeks » Lukas Eder http://www.javacodegeeks.com/ Java 2 Java Developers Resource Center Wed, 01 Apr 2015 08:00:56 +0000 en-US hourly 1 http://wordpress.org/?v=4.1.1 Hack up a Simple JDBC ResultSet Cache Using jOOQ’s MockDataProviderhttp://www.javacodegeeks.com/2015/03/hack-up-a-simple-jdbc-resultset-cache-using-jooqs-mockdataprovider.html http://www.javacodegeeks.com/2015/03/hack-up-a-simple-jdbc-resultset-cache-using-jooqs-mockdataprovider.html#comments Fri, 27 Mar 2015 14:00:06 +0000 http://www.javacodegeeks.com/?p=38693 Some queries shouldn’t hit the database all the time. When you query for master data (such as system settings, languages, translations, etc.), for instance, you may want to avoid sending the same silly query (and the results) over the wire all the time. For example: SELECT * FROM languages Most databases maintain buffer caches to ...

 

]]>
http://www.javacodegeeks.com/2015/03/hack-up-a-simple-jdbc-resultset-cache-using-jooqs-mockdataprovider.html/feed/ 0
jOOQ vs. Hibernate: When to Choose Whichhttp://www.javacodegeeks.com/2015/03/jooq-vs-hibernate-when-to-choose-which.html http://www.javacodegeeks.com/2015/03/jooq-vs-hibernate-when-to-choose-which.html#comments Wed, 25 Mar 2015 05:40:50 +0000 http://www.javacodegeeks.com/?p=38578 Hibernate has become a de-facto standard in the Java ecosystem, and after the fact, also an actual JavaEE standard implementation if standards matter to you, and if you put the JCP on the same level with ISO, ANSI, IEEE, etc. This article does not intended to discuss standards, but visions. Hibernate shares JPA’s vision of ...

 

]]>
http://www.javacodegeeks.com/2015/03/jooq-vs-hibernate-when-to-choose-which.html/feed/ 4
One Year After Java 8’s Release, IDEs and Compilers are not Fully Ready Yethttp://www.javacodegeeks.com/2015/03/one-year-after-java-8s-release-ides-and-compilers-are-not-fully-ready-yet.html http://www.javacodegeeks.com/2015/03/one-year-after-java-8s-release-ides-and-compilers-are-not-fully-ready-yet.html#comments Fri, 20 Mar 2015 05:46:26 +0000 http://www.javacodegeeks.com/?p=38400 One year ago, on March 18, 2014, Java SE 8 was released, and with it, the bliss of functional programming through lambda expressions and the streams API. These were great news for all of our Java ecosystem, and many people have already upgraded to Java 8. Stack Overflow already yields almost 2500 questions about Java ...

 

]]>
http://www.javacodegeeks.com/2015/03/one-year-after-java-8s-release-ides-and-compilers-are-not-fully-ready-yet.html/feed/ 0
The 10 Things Everyone does Wrong when Committing Pull Requestshttp://www.javacodegeeks.com/2015/03/the-10-things-everyone-does-wrong-when-committing-pull-requests.html http://www.javacodegeeks.com/2015/03/the-10-things-everyone-does-wrong-when-committing-pull-requests.html#comments Thu, 19 Mar 2015 11:00:05 +0000 http://www.javacodegeeks.com/?p=38315 So, you’ve found a nice Open Source project that has added great value to your own work and you want to give back. Before we move on, let me stress that this isn’t anything personal. This article doesn’t criticise anyone particular, and the ranty tone is just for your reading entertainment. I do not want ...

 

]]>
http://www.javacodegeeks.com/2015/03/the-10-things-everyone-does-wrong-when-committing-pull-requests.html/feed/ 1
10 Java Articles Everyone Must Readhttp://www.javacodegeeks.com/2015/03/10-java-articles-everyone-must-read.html http://www.javacodegeeks.com/2015/03/10-java-articles-everyone-must-read.html#comments Tue, 17 Mar 2015 05:00:24 +0000 http://www.javacodegeeks.com/?p=38144 One month ago, we’ve published a list of 10 SQL Articles Everyone Must Read. A list of articles that we believe would add exceptional value to our readers on the jOOQ blog. The jOOQ blog is a blog focusing on both Java and SQL, so it is only natural that today, one month later, we’re ...

 

]]>
http://www.javacodegeeks.com/2015/03/10-java-articles-everyone-must-read.html/feed/ 0
Yak Shaving is a Good Way to Improve an APIhttp://www.javacodegeeks.com/2015/03/yak-shaving-is-a-good-way-to-improve-an-api.html http://www.javacodegeeks.com/2015/03/yak-shaving-is-a-good-way-to-improve-an-api.html#comments Thu, 12 Mar 2015 23:00:49 +0000 http://www.javacodegeeks.com/?p=37940 Yak Shaving (uncountable): (idiomatic) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem. (idiomatic) A less useful activity done to consciously or unconsciously procrastinate about a larger but more useful task. Both interpretations of the term Yak Shaving as explained by Wiktionary are absolutely accurate ...

 

]]>
http://www.javacodegeeks.com/2015/03/yak-shaving-is-a-good-way-to-improve-an-api.html/feed/ 0
Integrating jOOQ with Grails Featuring the UWS-jOOQ Pluginhttp://www.javacodegeeks.com/2015/03/integrating-jooq-with-grails-featuring-the-uws-jooq-plugin.html http://www.javacodegeeks.com/2015/03/integrating-jooq-with-grails-featuring-the-uws-jooq-plugin.html#comments Thu, 12 Mar 2015 14:00:07 +0000 http://www.javacodegeeks.com/?p=37967 Introduction Grails is a web framework aimed to boost development productivity. One of the main features is domain centric database schema generation. Applications built with Grails are able to update existing schema just before they start. To do this, Grails is using built-in domain mappers or migrations in more advanced cases. The goal of the ...

 

]]>
http://www.javacodegeeks.com/2015/03/integrating-jooq-with-grails-featuring-the-uws-jooq-plugin.html/feed/ 0
The Java Legacy is Constantly Growinghttp://www.javacodegeeks.com/2015/03/the-java-legacy-is-constantly-growing.html http://www.javacodegeeks.com/2015/03/the-java-legacy-is-constantly-growing.html#comments Mon, 09 Mar 2015 11:00:13 +0000 http://www.javacodegeeks.com/?p=37849 I’ve recently stumbled upon a very interesting caveat of the JDK APIs, the Class.getConstructors() method. Its method signature is this:                   Constructor<?>[] getConstructors() The interesting thing here is that Class.getConstructor(Class...) returns a Constructor<T>, with <T> being maintained: Constructor<T> getConstructor(Class<?>... parameterTypes) Why is there a difference, i.e. why ...

 

]]>
http://www.javacodegeeks.com/2015/03/the-java-legacy-is-constantly-growing.html/feed/ 0
Avoid Recursion in ConcurrentHashMap.computeIfAbsent()http://www.javacodegeeks.com/2015/03/avoid-recursion-in-concurrenthashmap-computeifabsent.html http://www.javacodegeeks.com/2015/03/avoid-recursion-in-concurrenthashmap-computeifabsent.html#comments Sun, 08 Mar 2015 23:00:19 +0000 http://www.javacodegeeks.com/?p=37814 Sometimes we give terrible advice. Like in that article about how to use Java 8 for a cached, functional approach to calculating fibonacci numbers. As Matthias, one of our readers, noticed in the comments, the proposed algorithm may just never halt. Consider the following program:               public class Test ...

 

]]>
http://www.javacodegeeks.com/2015/03/avoid-recursion-in-concurrenthashmap-computeifabsent.html/feed/ 0
How to use SQL PIVOT to Compare Two Tables in Your Databasehttp://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html http://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html#comments Wed, 04 Mar 2015 08:00:14 +0000 http://www.javacodegeeks.com/?p=37667 This can happen ever so easily. You adapt a table by adding a new column:                     ALTER TABLE payments ADD code NUMBER(3); You go on, implementing your business logic – absolutely no problem. But then, later on (perhaps in production), some batch job fails because it ...

 

]]>
http://www.javacodegeeks.com/2015/03/how-to-use-sql-pivot-to-compare-two-tables-in-your-database.html/feed/ 0