JavaBeat Feeds
|
|
|
|
|
|
|
Pages :
1
2
3
4
5
[Total Tips : 48]
|
Configure MySql database with Hibernate mappings
Author :
JavaBeat
Date : Tue Jul 29th, 2008
Configuring MySql database with hibernate is the same as with other databasses.The only difference will be connection url and the database dialect to be specified in the configuration file. This tips provides a basic example configuration file for configuaring the MySql with hibernate. But it doesnot explain you installing the MySql database.
Collection Mapping in Hibernate : one-to-many
Author :
JavaBeat
Date : Tue Jul 29th, 2008
This article explains how to map two classes in collection mapping. In this example one Author object has the list of
Book objects. Both the classes are mapped and will be inserted together into the database. Here this example uses Bag as the
collection type. Other collection types available are Set,List,Array. Look into the example programs for more detail.
Comparison operators in Hibernate
Author :
JavaBeat
Date : Sat Jul 26th, 2008
HQL supports all the operators used in the SQL language. But, Criteria API doesn't support the
arithmetic expressions. Apart from that, it is easy to use other operators in the Criteria API itself.
This tips provides few basic example programs on using the operators.
NULL and NOT NULL comparison in the Hibernate API
Author :
JavaBeat
Date : Sat Jul 26th, 2008
While checking for the null and not null values in the Hibernate API, we have to be careful and there
is chance for misunderstanding. This tips explains how to compare the null values in the Hibernate query.
How to use named parameters and named query in Hibernate?
Author :
JavaBeat
Date : Sat Jul 26th, 2008
There is two types of query parameters binding in the Hibernate Query. One is positioned parameter and
another one is named parameters. But, hibernate recommend to use the named parameters since it is
more flexible and powerful compare to the positioned parameter.
Pagination in Hibernate Query API
Author :
JavaBeat
Date : Sat Jul 26th, 2008
Pagination is the very common problem for the most of the eneterprise applications.
When we are retrieving thousands of records from the database, it is not good idea to retrieve
all the records at the same time. So, we have to implement some sort of pagination concept in your application
to restrict the number of rows to be fetched from the database.
Three ways to create query in Hibernate
Author :
JavaBeat
Date : Sat Jul 26th, 2008
To create query in the Hibernate ORM framework, there is three different types. The folloing are the
three ways to create query instance:
How to use Initialization callback methods while creating Spring bean?
Author :
JavaBeat
Date : Thu Jul 24th, 2008
Springframework provides flexibility to initialize its Beans using the user defined methods. There is some scenario
where application developer want to initialize the beans properties after setting all the values. The following example
program demonstrates by defining a custom method to initialize the calues.
StringBuilder class in Java 5.0
Author :
JavaBeat
Date : Thu Jul 24th, 2008
StringBuilder class is introduced in Java 5.0 version. This class is replacement for the
existing StringBuffer class. If you look into the operations of the both the classes,
there is no difference.
Writing simple ANT build script
Author :
JavaBeat
Date : Thu Jul 24th, 2008
This article explains how to write a very basic ANT build script. This does not
explain indepth knowledge on building your project using ANT script. But, this writeup will be
more useful for the beginners who haben't writen any ANT script before. Before start writing the script,
lets look into how to install the ANT in your machine.
|
|
|
|
|
Pages :
1
2
3
4
5
|
|
|
|