Extracting only date part of a date time column using JPA/Hibernate

I recently had a need where I had to get only the date portion from a column whose data type is “timestamp” (which is mapped using @TimeStamp annotation). After hours of investigation, I found a way to do that using standard jpa/hql queries and hence thought of documenting it in this post. MySQL has a simple “date() function” that would just give the date part from a date time expression. Microsoft SQL Server offers a couple of ways to achieve the same. Unfortunately, I couldn’t find any standard ways provided by jpa/hibernate to achieve this. Interestingly, the closest thing that can be considered as “standard” is the “cast function” which many databases seem to support. This prompted me to go for this solution because I felt this might be clean, as the syntax across different databases are pretty much similar. . . . → Read More: Extracting only date part of a date time column using JPA/Hibernate

NetBeans and Maven – A quick start guide

A few months ago, I was reading the book “Wicket in Action”. I was new to Wicket and Maven then. I followed the instructions given in the book to create a maven project. The book went one step further and explained how to create eclipse and idea projects from the pom, but nothing was mentioned about NetBeans. I felt sad that there is no maven plugin out there to create projects that NetBeans can understand.

But later when I realized that there is no such need to create Netbeans projects from Maven pom, I was thrilled. Maven, is a . . . → Read More: NetBeans and Maven – A quick start guide

Book Review: NetBeans Platform 6.9 Developers Guide

NetBeans has been my IDE of choice for the past few years and to my pleasure, I recently received a copy of NetBeans Platform 6.9 Developers Guide from Packt. So, I thought of coming out with a review of this book.

A bit about the NetBeans Platform

“The NetBeans Platform is a generic framework for Swing applications. It provides the “plumbing” that, before, every developer had to write themselves—saving state, connecting actions to menu items, toolbar items and keyboard shortcuts; window management, and so on. The NetBeans Platform provides all of these out of the box. You don’t . . . → Read More: Book Review: NetBeans Platform 6.9 Developers Guide

What Java Look and Feel do you use?

Quite some time back, I read an article titled “20+ Free Look and Feel Libraries For Java Swing“. I have evaluated most of the libraries mentioned in that article. Personally, IĀ  prefer the System look and feel that is bundled in the JRE. However, I like Substance, PGS and JGoodies as well. Which one do you use? Curious to know.

What Java Look and Feel do you use?

Metal System Look and Feel Nimbus JGoodies Substance Alloy JTattoo Synthetica Liquid PGS Other (Please mention your choice in the comments)

View Results

 Loading …

Developing A Simple Java Application With Spring

Introduction Spring is a powerful application framework that can be used across any layer in your application. For example, you can use Spring to manage only your data access layer or you can use Spring to provide remote services for your swing client. In this article, I will explain how to get started with Spring by developing a simple java application.

Requirements 1. Your favorite IDE 2. Latest Spring framework.

(Note: This article makes use of Spring framework 2.5.6 which is the current production release)

The Application We are going to develop a simple application that fetches and display . . . → Read More: Developing A Simple Java Application With Spring

Developing A Simple Pluggable Java Application

Most of the applications we use on daily basis are pluggable. Popular applications like Firefox, Eclipse, NetBeans, JEdit, WordPress, Hudson are all pluggable. In fact, pluggability has played a major part in the success of most of these applications. Why not make the Java applications we develop pluggable as well? Yes, we get pluggability out of the box, if our applications are based on a rich client platform like NetBeans or Eclipse. But for some reasons if you decide not to use those platforms, it doesn’t mean that they should not be pluggable. In this article, we will learn . . . → Read More: Developing A Simple Pluggable Java Application

Five different uses of Java Applets

In a world where everyone is using technologies like Flash, Silverlight etc to present rich content, are Java Applets still used? Are they still relevant? The answer is – “Yes”. Apart from being used primarily for playing online games, Java Applets are still used in many different ways. Here I would like to highlight a few applications that put Applets to good use.

1. Online Office Suite ThinkFree is a very popular and professional online office suite based on Java Applet and Ajax.

2. Virtualization JPC or Java PC Emulator is a pure java based virtualization software that . . . → Read More: Five different uses of Java Applets

Hudson CI Server – A quick start guide

Introduction

Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. – Martin Fowler

Hudson is a popular open-source continuous integration server used by many organizations like Redhat JBoss. Though there are many well known and well established open-source projects like CruiseControl, Continnum and some commercial offerings like Bamboo, what makes Hudson special is it’s powerful yet easy to use web interface, it’s simplicity and it’s extensible architecture with many plugins.

. . . → Read More: Hudson CI Server – A quick start guide

NetBeans 6.7 – A quick glance

NetBeans 5.0 – Simplified Swing development NetBeans 5.5 – Simplified Java EE development NetBeans 6.0 – Made the NetBeans editor and other core infrastructure on par with competitors NetBeans 6.5 – Looked beyond Java development by supporting languages like PHP NetBeans 7.0 6.7 – Tries to make collaborative team development seamless.

I was quick to download the “All Java” pack of NetBeans IDE for linux. Installation, as usual was pretty smooth on my Ubuntu 9.04. The installation didn’t give me much surprises and it was very much similar to version 6.5. I customized the installer to install Glassfish v2.1 . . . → Read More: NetBeans 6.7 – A quick glance

Ubuntu 8.10 – A Productive Java Development Environment

I recently started using Ubuntu 8.10 at my workplace as well. Till then, I have been using Ubuntu only at home. For me, Ubuntu@Work was very different from Ubuntu@Home. I mostly surf, blog, listen to music and play some games at home. But Ubuntu@Work was a completely different scenario.

Since I’m new to this linux stuff, it took me some time to configure things like static ip address, host names etc. But once everything was setup, things started moving quickly. I initially had doubt in my minds about the font rendering of NetBeans (or any swing app for that . . . → Read More: Ubuntu 8.10 – A Productive Java Development Environment

Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.