Adding Finders for Tables or Views
You can define additional custom finders (query operations) for tables or views.
1. Select the table or view from the folder in the left pane.
2. Click Configure in the right pane.
The Configure Columns and Finders window opens.
3. Click the Finders tab.
4. Click New.
The fields you must complete for this finder displays in the right pane.
5. Enter a Name for this finder.
The name must be a valid Java method name.
6. Enter the SQL code to select specific records in the Where Clause.
Use database names for columns.
Use valid SQL operators, such as
= or
LIKE.
Identify parameters in the form
:mashable-column-name. For example:
DEPARTMENT_ID = :departmentId
Make sure that all parameters are also defined in the Parameters table in this screen.
7. If results should be sorted, enter a list of columns, in the Order By field using database column names separated by commas.
8. To add a parameter for use in the Where Clause, click . Double-click in the cells of the empty table row to define the parameter:
Name: the mashable name for the column for this parameter.
Java Type: the Java class for the datatype of this parameter.
JDBC Type: the JDBC datatype of this parameter.
Precision: the JDBC precision for a numeric parameter.
Scale: the JDBC scale for a numeric parameter.
9. Click Save.
10. Click Close.