Patent ID: 7454438
Filing Date: 2008-11-18
Classification: G06F,Y10S

Abstract:
1. A computer implemented method for dynamically generating a query to be executed against a database, comprising: enabling use of dynamic queries by setting a qualification tag “enable-dynamic-queries (#PCDATA)” to the value of true in a deployment descriptor, wherein “enable-dynamic-queries” represents an arbitrary name of an extensible markup language (XML) tag and wherein symbol “#PCDATA” represents that the qualification tag contains parsed character data that is parsed by an XML parser; deploying a bean on a server for connecting to and executing queries against the database, said bean having a bean home class that includes a finder method; generating a properties object containing settings for the query, said settings specifying one or more options for execution of the query, wherein the properties object is populated with said settings at runtime; invoking the finder method on said bean by an application executing on a client and passing the properties object to said bean; receiving the finder method invocation by said server and inspecting said properties object; extracting the settings from the properties object and parsing the finder method in order to generate a query statement by the bean at runtime, such that said query statement need not be statically defined in the deployment descriptor of said bean and such that the bean is not redeployed upon execution of a new query; executing the query statement on the database by said server; and returning a result set retrieved from the database in response to execution of the query statement by using a query home collection results method.