kirancodes.me
To Proof Maintenance & Beyond!

Safe query objects: statically typed objects as remotely executable queries

William R. Cook, Siddhartha Rai

Abstract

Developers of data-intensive applications are increasingly using persistence frameworks such as EJB, Hibernate and JDO to access relational data. These frameworks support both transparent persistence for individual objects and explicit queries to efficiently search large collections of objects. While transparent persistence is statically typed, explicit queries do not support static checking of types or syntax because queries are manipulated as strings and interpreted at runtime. This paper presents Safe Query Objects, a technique for representing queries as statically typed objects while still supporting remote execution by a database server. Safe query objects use object-relational mapping and reflective metaprogramming to translate query classes into traditional database queries. The model supports complex queries with joins, parameters, existentials, and dynamic criteria. A prototype implementation for JDO provides a type-safe interface to the full query functionality in the JDO 1.0 standard.

BibTeX
@inproceedings{Cook-Rai:ICSE05,
  author    = {William R. Cook and
               Siddhartha Rai},
  title     = {Safe query objects: statically typed objects as remotely executable queries},
  booktitle = {ICSE},
  pages     = {97--106},
  publisher = {{ACM}},
  year      = {2005},
}

Related papers