Package org.datanucleus.store.rdbms.query
Package providing the querying mechanism for DataNucleus for RDBMS datastores.
Query Generation
Queries are supported on RDBMS datastore using JDOQL, JPQL, SQL, or alternatively StoredProcedures. JDOQL queries are converted into SQL using a query compilation process, firstly compiling generically, and then converting the generic compilation into SQL usingQueryToSQLMapper. JPQL queries are converted into SQL using a query compilation process, firstly compiling generically, and then converting the generic compilation into SQL using
QueryToSQLMapper.
Query Result Processing
A query is executed and returns a JDBC ResultSet. The ResultSet is then converted into the requisite result format using either ofPersistentClassROF,
ResultClassROFor
ResultMetaDataROF. These "result object factories" convert each row of the ResultSet into the required object(s). Where part of the result is a persistable object, it makes use of ResultSetGetter to populate the fields of the persistable object.
-
Interface Summary Interface Description BulkFetchHandler Interface for a handler for "bulk fetch" of a multi-valued field from a query.QueryGenerator Interface for a generator of query statements.ResultObjectFactory<T> An object that reads result set rows and returns corresponding object(s) from them. -
Class Summary Class Description AbstractRDBMSQueryResult<E> Abstract representation of a QueryResult for RDBMS queries.AbstractROF<T> Abstract result object factory, taking the ExecutionContext being operated in, and the ResultSet that will be processed.BulkFetchExistsHandler Bulk-Fetch handler to generate the necessary statement for multi-valued field bulk-fetch using EXISTS subquery semantics.BulkFetchJoinHandler Helper class to generate the necessary statement for multi-valued field bulk-fetch, using JOIN semantics.ForwardQueryResult<E> Lazy collection results from a Query with the ResultSet in a forward direction.JDOQLQuery RDBMS representation of a JDOQL query for use by DataNucleus.JPQLQuery RDBMS representation of a JPQL query for use by DataNucleus.PersistentClassROF<T> Result-object factory that takes a JDBC ResultSet, a results mapping, and creates a persistable object instance for each row in the ResultSet.QueryToSQLMapper Class which maps a compiled (generic) query to an SQL query for RDBMS datastores.RDBMSQueryCompilation Datastore-specific (RDBMS) compilation information for a java query.RDBMSQueryUtils Utilities for use in queries specific to RDBMS.ResultClassROF Take a ResultSet, and for each row retrieves an object of a specified result class type.ResultMetaDataROF ResultObjectFactory that operates using a QueryResultMetaData and returns objects based on the definition.ScrollableQueryResult<E> Lazy collection results from a Query with the ResultSet scrollable.SQLQuery A Query using SQL.StatementClassMapping Definition of statement mapping for a particular class.StatementMappingIndex Representation of a mapping in a statement (such as JDBC), and its mapping to the associated column(s) or parameters that the mapping relates to.StatementNewObjectMapping Definition of the mapping of a new object definition in the results of a statement.StatementParameterMapping Definition of the mapping of parameters in a datastore statement.StatementResultMapping Definition of the mapping of result expressions in a datastore statement.StoredProcedureQuery Query using a stored procedure.