Saturday, 21 January 2012

Java interview questions: - Different types of rowset in java 5?

This is one of the typical Java interview questions asked by the interviewer during the interview session. So one can proceed answering it as follows: -

JdbcRowSet:
  • A wrapper around a ResultSet object that makes it possible to use the result set as a JavaBeans component
  • By default all result set are scrollable and updatable
CachedRowSet
  • object is a container for rows of data that caches its rows in memory, which makes it possible to operate without always being connected to its data source
  • Further, it is a JavaBeans component and is scrollable, updatable, and serializable
FilteredRowSet
  • Provides a degree of filtering on contents without heavy weight query language
  • Extends CacheRowSet and overrides methods for filtering
JoinRowSet
  • Provides a mechanism for combining related data from different RowSet objects into one JoinRowSet object, which represents an SQL JOIN
  • can take one of the following to denote type of join
  1. CROSS_JOIN
  2. FULL_JOIN
  3. INNER_JOIN - the default if no JOIN type has been set
  4. LEFT_OUTER_JOIN
  5. RIGHT_OUTER_JOIN
WebRowSet

It describes the standard XML document format required when describing a RowSet object in XML

SyncResolver

Is a rowset object wgich implement SyncResolver interface which allows applications to use a manual decision tree to decide what should be done when a synchronization conflict occur

Also see video on Many To One relation in database using Hibernate as follows: -



Click for more Java interview questions

Regards,

Visit for more author’s blog on Java interview questions.

2 comments: