Chapter 2. Simple Access

Table of Contents

Select statement
Insert statement
Update statement
Delete statement

Select statement

For select statements, it is used <table_name>Query.java class. The query is formed using methods of <table_name>Query.java and QueryBuilder.java class. The query is executed with method runQuery() of the <table_name>Query.java class. In this method, the query is executed on the database, and the results are retrieved as a resultSet object. Then, the method uses protected method:

createExisting([String logicalDatabase],
ResultSet rs, 
[HashMap queryRefs ], 
[DBTransaction dbTrans])

of the <table_name>DO.java class. This method calls constructor which calls method:

initFromResultSet(ResultSet rs)

which sets in result DO all columns retrieved from the database. If any column is a reference, first is made referenced object with the method

createExisting([String dbName], BigDecimal bd ) 

and then is set DO's attribute to this referenced object.