Browse Prior Art Database

Self-Populating Objects for JAVA Database Queries

IP.com Disclosure Number: IPCOM000021521D
Original Publication Date: 2004-Jan-21
Included in the Prior Art Database: 2004-Jan-21
Document File: 1 page(s) / 42K

Publishing Venue

IBM

Abstract

A method to return database query result in caller defined type object.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 85% of the total text.

Page 1 of 1

THIS COPY WAS MADE FROM AN INTERNAL IBM DOCUMENT AND NOT FROM THE PUBLISHED BOOK

BEA820030032 Bryan W Butler/San Jose/IBM Yih-Herng Chuang

Self-Populating Objects for JAVA Database Queries

Caller may define custom data structure whose constructor takes database query results as input argument. Utilizing the Java reflection methods, providing the fully qualified class name of the data structure caller defined, a list of the objects is then created at server side basing on the database query result. Then the list is sent back to the caller. On top of the flexibility of custom data structure, there is no maintenance needed from server. Another benefit is that the process of database result set is done at server side and leaves the caller with database-free operations.

Scenario: Caller sends query to Database Access Server:
1.. Caller defines a custom data structure class whose constructor takes the Java Result Set object as input argument, parses out the query result and populate object.
2. Caller creates a Database Request object including the following information:
a) Database query statement
b) Return object's fully qualified class name
3. Caller sends Database Request object to Database Access Server
4. Database Access Server parses out the Database Request object and do the following:
a) Make database query according to the database query statement embedded and get Java Result Set object.
b) Utilize the Java reflection methods, providing the fully qualified class nam...