Nested beans and SQL queries that contain table joins

pureQuery Runtime automates the creation and the populating of Java objects that return results from SQL queries that contain table joins. A set of nested beans represents the data returned from the SQL query. The hierarchy of the beans duplicates the relational structure of the tables and data in the database. pureQuery Runtime also handles the data from the query. In most cases, it generates the required ResultHandlers and RowHandlers for data access object (DAO) interfaces and inline methods.

With pureQuery Runtime, the nested beans can return data with one-to-many and one-to-one relationships and can simulate many-to-many and many-to-one relationships.

pureQuery Runtime supports the automatic generation of a nested bean structure from the results of an SQL query that joins the data from multiple tables. The data from each matching row in each joined table is combined into a single row of data in the ResultSet object. By allowing one bean to contain a java.util.List of other beans, a bean can contain multiple rows of data from the ResultSet object. The nesting preserves the hierarchical nature of the data in multiple tables and implements a one-to-many relationship. Allowing one bean to contain another bean simplifies the layout of a bean and implements a one-to-one relationship.

Many-to-many relationships can be simulated with multiple one-to-many relationships and many-to-one relationships can be simulated with multiple one-to-one relationships.

You can use a bean class with multiple SQL statements. The following scenario describes how the same beans can be used in different situations:

Feedback