Friday, March 12, 2010

Posts Tagged ‘hibernate’

hibernate tip: smart id generator

hibernate tip: smart id generator

Tuesday, March 3, 2009 8:00

A small tip to generate more meaningful Id. Instead of 32 for OrderID use O000000032. [caption id="attachment_356" align="alignright" width="173" caption="Use smart and meaningful ids "][/caption] Simple implementations: SmartIdTableGenerator SmartIdSequenceGenerator

This was posted under category: HowTo & Tutorial  |  Read Full Story  |  1 Comment
Tagged with: , ,

Clean database schema with inheritance

Tuesday, February 10, 2009 8:00

It is very common way of usage that  when ever you need some new attribute for your model objects/table you add a new column to the related database table.  After several requirements you will notice:

This was posted under category: Notes  |  Read Full Story  |  2 Comments

Grails Days 1: GORM-CRUD

Friday, December 26, 2008 8:00

Image via Wikipedia It has been more than a week since I downloaded Grails, Although my first Grails impressions are not so well, I am playing with Grails with lots of curiosity and joy,

This was posted under category: HowTo & Tutorial  |  Read Full Story  |  0 Comments

Grails, First Impressions

Wednesday, December 17, 2008 8:00

Image via Wikipedia Since SpringSource acquires the Grails I was willing to test this framework and make a dummy project but first I should read some books:)

This was posted under category: Notes  |  Read Full Story  |  8 Comments

More Runtime Java Stack

Tuesday, December 9, 2008 10:44

Image via Wikipedia More java framework and APIs that I have been using. you can find the first part this article here: java runtime stack

This was posted under category: HowTo & Tutorial  |  Read Full Story  |  0 Comments

Runtime Java Stack

Friday, November 28, 2008 3:26

Image by Neil T via Flickr I have been developing java application for more then 6 years. Most of these years I have used and evaluated open source projects. Here I'll try to explain my open source java stack.

This was posted under category: HowTo & Tutorial  |  Read Full Story  |  0 Comments

Why ORM? ’cause:

Wednesday, October 22, 2008 3:18

Hi again, a few hours ago I have read a question about ORM mapping for java . He wonders why  and when this technology is chosen. Disclaimer: I am omitting the case, when your database is just a storage for a CRUD apps. I am talking about complex applications, when stored procedures are used very extensively, like Oracle's PL/SQL.

This was posted under category: Notes  |  Read Full Story  |  3 Comments
Tagged with: ,

hibernate native Id generator tip

Tuesday, October 14, 2008 16:38

if you are working with more than one db vendor (mysql/postgresql/oracle ,vs...) both at the same project. you may like this a lot :) the configuration sample below allow to run your hibernate application at two or more database vendors without changing any code

This was posted under category: HowTo & Tutorial  |  Read Full Story  |  2 Comments
Tagged with:

who needs implementations?

Thursday, October 2, 2008 7:08

At least for some common patterns like DAOs. As a popular manner, most of the java applications have at least three layers like UI, Service and DAO. For each layer you probably have interface and a single or more implementation classes.  And while UI layer has some really complex businesses for effective UI experience, DAO layer is only related with CRUD operations for a single or a group of beans. Here is the routine that you can get rid of

This was posted under category: Notes  |  Read Full Story  |  3 Comments

Annotations have been more successful than XML

Monday, March 10, 2008 1:25

Annotations came to JDK with JDK5 (2004) since then they evaluated and are accepted so widely and even became more powerful and useful than XML in just 4 years. While you are developing a project with java at any scale you'll need a very large number of XML files defined in very different API's and DTD/XSDs. Which makes configuration very complex. eg:struts.xml,tiles.xml,validation.xml,hibernate.cfg.xml,spring-context.xml,web.xml,and so on Although it is easy to read and modify there are lots files :( Now with annotations:

This was posted under category: Notes  |  Read Full Story  |  2 Comments
Tagged with: , , ,