Editing generated pureQuery code that supports the inline programming style

After you generate a test class, you can edit the SQL statements and change, add, or remove the methods that are in the class. You can then run the test class to test your pureQuery code.

Procedure

To edit generated pureQuery code:

  1. Edit the generated test class.
    • If you need to change the SQL statement for a method:
      • If you want to use the same number of input parameters, edit the SQL statement but do not edit the signature of the method.
      • If you want to use a different number of input parameters:
        1. Edit the SQL statement.
        2. Edit the method signature to match the number of input parameters for the SQL statement.
      • If the statement is a SELECT statement and you need a different result set, generate a bean that represents the result set. Right-click the SQL statement and select Data Access Development > Generate pureQuery Code.
    • Change the names of any methods.
    • Add new methods and corresponding SQL statements.
  2. Run the test class.

Feedback