Skip Headers

# Using a User-Defined Function

Previous

Next

Regardless of whether you added the function for all platforms or for a specific platform, Example: Accessing a User-Defined Function illustrates how to use the `Expression` method `getFunction` to access the user-defined expression operator represented by a constant with the value 600.

Accessing a User-Defined Function

    ReadObjectQuery query = new ReadObjectQuery(Employee.class);
    ExpressionBuilder builder = query.getExpressionBuilder();
    Expression functionExpression = builder.get("firstName").
        getFunction(600).equal("BOB");
    query.setSelectionCriteria(functionExpression);
    session.executeQuery(query);