Custom Queries
You can also define custom finders for specific queries when you register database mashables. Custom finders:
![*](bullet.gif)
Accept a parameter with the SQL code for a WHERE clause. This can include one or more dynamic parameters which you define and map to mashable column names.
For example: "DEPT_NO = :deptNo AND HIRED_DATE < :hiredDate"
![*](bullet.gif)
Dynamic parameters for the WHERE clause must be simple types with corresponding Java and JDBC types.
![*](bullet.gif)
Use prepared statements and thus have no risk of SQL injection attacks.
![*](bullet.gif)
Return all columns defined for the mashable.
![*](bullet.gif)
Can sort results by one or more columns that you specify.