Skip Headers

# Platform and User-Defined Functions

Previous

Next

You can use the `Expression` method `getFunction` to access database functions that TopLink does not support directly. Example: Using a Database Function Not Supported by the Expression API illustrates how to access a database function named `VacationCredit` from within an expression, even though there is no support for such a function in the `Expression` API.

Using a Database Function Not Supported by the Expression API

    emp.get("lastName").getFunction("VacationCredit").greaterThan(42)

This expression produces the following SQL:

    SELECT . . . WHERE VacationCredit(EMP.LASTNAME) > 42

The `Expression` API includes additional forms of the `getFunction` method that allow you to specify arguments. For more information, see Oracle TopLink API Reference.

You can also access a custom function that you create. For more information on creating a custom function in TopLink, see "Creating and Using a User-Defined Function".