Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
There are so many ways of generating Ids in
Hibernate , but the following are
mostly used
increment
Generates
identifiers of type long, short or int that are unique only when
no other
process is inserting data into the same table.
Do not use in a cluster.
identity
Supports identity columns in DB2, MySQL, MS SQL Server, Sybase and
HypersonicSQL.
The returned identifier is of type long,
short or int.
sequence
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
<id name="id"
type="long"
column="cat_id">
<generator
class="org.hibernate.id.TableHiLoGenerator">
<param
name="table">uid_table</param>
<param
name="column">next_hi_value_column</param>
</generator>
</id>
<id name="id"
type="long"
column="person_id">
<generator
class="sequence">
<param
name="sequence">person_id_sequence</param>
</generator>
</id>
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.