Skip Headers
Oracle TopLink Developer's Guide
10g Release 3 (10.1.3)
B13593-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

Descriptor Query Manager Queries

Each Descriptor owns an instance of DescriptorQueryManager that you can use for the following:

Configuring Named Queries

The DescriptorQueryManager provides API for storing and retrieving frequently used queries by name.

For more information, see "Named Queries".

Configuring Default Query Implementations

The DescriptorQueryManager of each Descriptor lets you customize the query implementation that TopLink uses for the following data source operations:

  • insert object

  • update object

  • read object

  • read all objects

  • delete object

For example, if you need to insert an object using a stored procedure, you can override the default SQLCall used by the DescriptorQueryManager insert object query.

Whenever you execute a query on a given Class, TopLink consults the DescriptorQueryManager to determine how to perform the given data source operation.

You can use this capability for a variety of purposes such as to extend TopLink behavior, access nonrelational data, or use stored procedures or customized SQL calls.


WARNING:

Allowing an unverified SQL string to be passed into methods makes your application vulnerable to SQL injection attacks.


For information and examples on customizing these default query implementations, see:

Configuring Additional Join Expressions

You can configure the DescriptorQueryManager to automatically append an expression to every query it performs on a class. For example, you can add an expression that filters the data source for the valid instances of a given class.

For more information, see "Appending Additional Join Expressions".