Safe query objects
William R. Cook, Siddhartha Rai · Proceedings/Proceedings - International Conference on Software Engineering · 2005
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.
Cited by 120 works. doi:10.1145/1062455.1062488
Authors
References
- Interfaces and specifications for the Smalltalk-80 collection classes
- Making the future safe for the past
- Static checking of dynamically generated queries in database applications
- Types and persistence in database programming languages
- Extending query rewriting techniques for fine-grained access control
- Performance tradeoffs for client-server query processing
- Domain specific embedded compilers
- Orthogonally persistent object systems
- OpenJava: A Class-Based Macro System for Java
- Typestates for Objects