Object oriented structured query language (OOSQL) support for Enterprise Java Beans
First Claim
1. A computer-implemented method for generating automatically computer program code for implementing custom finder methods in a reusable application component, wherein the reusable application component includes a home interface specifying custom finder methods for finding instances of the reusable application component and wherein the custom finder methods are defined by finder method parameters but wherein queries to be evaluated for implementing the custom finder methods to find instances of the reusable application component in a database are not specified, the method comprising:
- receiving the home interface as an input;
introspecting the home interface to identify the custom finder methods in the home interface;
invoking a finder helper class generator for generating source code for a finder helper class for the reusable application component, including generating skeleton structure source code for finder helper class methods for the finder helper class by, for each identified custom finder method;
identifying the finder method parameters of the custom finder method,emitting a first line of code for the finder helper class method that accepts the same finder method parameters as the custom finder method, andemitting a second line of code for the finder helper class method that defines in skeleton form a query to be evaluated and performed to find instances of the reusable application component in a database, wherein the query to be evaluated is implemented by customizing the finder helper class method based on a return parameter requirement for a type of query indicated by the custom finder method, the second line of code in skeleton form including a place holder including a comment indicating where a query string defining the query to be evaluated and to be performed is to be placed in the second line of code by a programmer when the source code is deployed; and
saving the source code for the finder helper class to an output file for use by a programmer for software development.
0 Assignments
0 Petitions
Accused Products
Abstract
The invention which meets the needs identified above is an apparatus and method for automatic generation of a portable, OOSQL query in terms of a bean'"'"'s attributes and methods at the time of development. The method accomplishes its purpose by bridging between CORBA and EJB, by providing a Finder Helper Base class which encapsulates application server-specific logic, and by generating a finder helper subclass that contains the portable OOSQL strings.
25 Citations
9 Claims
-
1. A computer-implemented method for generating automatically computer program code for implementing custom finder methods in a reusable application component, wherein the reusable application component includes a home interface specifying custom finder methods for finding instances of the reusable application component and wherein the custom finder methods are defined by finder method parameters but wherein queries to be evaluated for implementing the custom finder methods to find instances of the reusable application component in a database are not specified, the method comprising:
-
receiving the home interface as an input; introspecting the home interface to identify the custom finder methods in the home interface; invoking a finder helper class generator for generating source code for a finder helper class for the reusable application component, including generating skeleton structure source code for finder helper class methods for the finder helper class by, for each identified custom finder method; identifying the finder method parameters of the custom finder method, emitting a first line of code for the finder helper class method that accepts the same finder method parameters as the custom finder method, and emitting a second line of code for the finder helper class method that defines in skeleton form a query to be evaluated and performed to find instances of the reusable application component in a database, wherein the query to be evaluated is implemented by customizing the finder helper class method based on a return parameter requirement for a type of query indicated by the custom finder method, the second line of code in skeleton form including a place holder including a comment indicating where a query string defining the query to be evaluated and to be performed is to be placed in the second line of code by a programmer when the source code is deployed; and saving the source code for the finder helper class to an output file for use by a programmer for software development. - View Dependent Claims (2, 3, 4)
-
-
5. A computer readable memory having instructions for causing a computer to perform a method for generating automatically computer program code for implementing custom finder methods in a reusable application component, wherein the reusable application component includes a home interface specifying custom finder methods for finding instances of the reusable application component and wherein the custom finder methods are defined by finder method parameters but wherein queries to be evaluated for implementing the custom finder methods to find instances of the reusable application component in a database are not specified, the method comprising:
-
receiving the home interface as an input; introspecting the home interface to identify the custom finder methods in the home interface; invoking a finder helper class generator for generating source code for a finder helper class for the reusable application component, including generating skeleton structure source code for finder helper class methods for the finder helper class by, for each identified custom finder method; identifying the finder method parameters of the custom finder method, emitting a first line of code for the finder helper class method that accepts the same finder method parameters as the custom finder method, and emitting a second line of code for the finder helper class method that defines in skeleton form a query to be evaluated and performed to find instances of the reusable application component in a database, wherein the query to be evaluated is implemented by customizing the finder helper class method based on a return parameter requirement for a type of query indicated by the custom finder method, the second line of code in skeleton form including a place holder including a comment indicating where a query string defining the query to be evaluated and performed is to be placed in the second line of code by a programmer when the source code is deployed; and saving the source code for the finder helper class to an output file for use by a programmer for software development. - View Dependent Claims (6, 7, 8)
-
-
9. A computer readable memory having instructions for causing a computer to perform a method for generating automatically computer program code for implementing custom finder methods in a reusable application component, wherein the reusable application component includes a home interface specifying custom finder methods for finding instances of the reusable application component and wherein the custom finder methods are defined by finder method parameters but wherein queries to be evaluated for implementing the custom finder methods to find instances of the reusable application component in a database are not specified, the method comprising:
-
steps for receiving the home interface as an input; steps for identifying the custom finder methods in the home interface; steps for invoking a finder helper class generator for generating source code for a finder helper class for the reusable application component, including steps for generating skeleton structure source code for finder helper class methods for the finder helper class, for each identified custom finder method; steps for identifying the finder method parameters of the custom finder method, steps for emitting a first line of code for the finder helper class method that accepts the same finder method parameters as the custom finder method, and steps for emmitting a second line of code for the finder helper class method that defines in skeleton form a query to be evaluated and performed to find instances of the reusable application component in a database, wherein the query to be evaluated is implemented by customizing the finder helper class method based on a return parameter requirement for a type of query indicated by the custom finder method, the second line of code in skeleton form including a place holder including a comment indicating where a query string defining the query to be evaluated and performed is to be placed in the second line of code by a programmer; and steps for saving the source code for the finder helper class to an output file for use by a programmer for software development.
-
Specification