Commonly used Generators in ‘Hibernate’

Generator Description
increment It generates identifiers of type long, short or int that are unique only when no other process is inserting data into the same table. It should not the used in the clustered environment.
identity It supports identity columns in DB2, MySQL, MS SQL Server, Sybase and HypersonicSQL. The returned identifier is of type long, short or int.
sequence The sequence generator uses a sequence in DB2, PostgreSQL, Oracle, SAP DB, McKoi or a generator in Interbase. The returned identifier is of type long, short or int
hilo The hilo generator uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a table and column (by default hibernate_unique_key and next_hi respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with connections enlisted with JTA or with a user-supplied connection.
seqhilo The seqhilo generator uses a hi/lo algorithm to efficiently generate identifiers of type long, short or int, given a named database sequence.
uuid The uuid generator uses a 128-bit UUID algorithm to generate identifiers of type string, unique within a network (the IP address is used). The UUID is encoded as a string of hexadecimal digits of length 32.
guid It uses a database-generated GUID string on MS SQL Server and MySQL.
native It picks identity, sequence or hilo depending upon the capabilities of the underlying database.
assigned lets the application to assign an identifier to the object before save() is called. This is the default strategy if no <generator> element is specified.
select retrieves a primary key assigned by a database trigger by selecting the row by some unique key and retrieving the primary key value.
foreign uses the identifier of another associated object. Usually used in conjunction with a <one-to-one> primary key association.

Technorati tags: Hibernate Generators, ORM
Source: For the complete Hibernate tutorial Visit Here

Advertisements

The new version of Compass is released

The third milestone release of version 1.1 ( version 1.1 M3) of COMPASS is released. It includes the following major features…

  • Support for polymorphic relationships
  • Better cyclic mappings support
  • FS Transactional Log
  • Runtime Settings
  • JdbcDirectory support Oracle 9
  • Initial XA Support
  • Performance Improvement

At the same time one other important news is that, hibernate is already started to add more features which will helpful to integrate Lucene directly to an application without using Compass framework.

Read more about this from it’s founder’s blog
Related post : Compass- a java search engine framework build on lucene
Technorati tags: Compass, Hibernate

jTrac : a lightweight Bug tracking system build on Spring

Have you ever used jTrac? … If you want to track the errors and issues causing with in the development or testing environment then, I am sure this will be better option for you. jTrac is a web-based application ideal for issue tracking with built-in workflow. It is a lightweight J2EE application built on the Spring Framework and Hibernate. This is designed to be generic, you can customize fields to track items (like bugs) & allocate tasks etc. It has a simple user interface and using a small database called HSQLDB. To use the jTrac we just have to do the following. Copy the war file to the servlet-engine then start it 🙂 . HSQLDB will automatically starts at the time of engines startup.

Some features of the jTrac are listed below

  • Add custom fields and drop downs
  • Per-project customizable workflow
  • Field-level permissions
  • Detailed history view
  • E-mail notifications
  • File attachments
  • Full text search
  • Search and filter even on custom fields
  • Dashboard view of statistics
  • Export data and search results to Excel
  • Support for anonymous browsing of projects
  • Relate items to each other, e.g. “duplicate of”, “depends on” etc.
  • Support for all popular databases
  • Database upgrade and migration scripts available
  • Embedded database and web-app server – download and start using right away!

If you want to refer more about its features then please visit here
You can download it from here and the newest version available is 2.0-RC3-update1.

Reference: jTrack Home

Technorati Tags: jTrack, Bug tracking, Spring Framework, HSQLDB