Interface JdbcFunction

All Known Implementing Classes:
AbstractDatetimeAddFunction, AbstractJdbcFunction, BirthdayQueryFunction, BoundingboxJdbcFunction, DateAddFunction, DatetimeAddFunction, DistanceHaversineJdbcFunction, DueDateFunction, SimilarityFunction

public interface JdbcFunction
This interface can be used to contribute additional query functions that are based on raw SQL.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
     
    default int[]
    Order of parameters as required in SQL statement.
    org.hibernate.dialect.function.SQLFunction
    createFunction(org.hibernate.type.TypeResolver typeResolver, SqlWriter sqlWriter)
     
     
    void
    validateArguments(javax.persistence.criteria.Expression<?>[] arguments)
     
  • Method Details

    • createFunction

      org.hibernate.dialect.function.SQLFunction createFunction(org.hibernate.type.TypeResolver typeResolver, SqlWriter sqlWriter)
      Returns:
      an SQLFunction that contains the raw sql statement that is executed on the db.
      See Also:
      • SQLFunctionTemplate
    • argumentCount

      int argumentCount()
      Returns:
      the number of expected arguments.
    • getReturnType

      Class<?> getReturnType()
      Returns:
      the return type of the function
    • validateArguments

      void validateArguments(javax.persistence.criteria.Expression<?>[] arguments) throws JdbcFunctionException
      Throws:
      JdbcFunctionException
    • argumentOrder

      default int[] argumentOrder()
      Order of parameters as required in SQL statement. This method must be implemented when the order or count of query parameters is different to the SQL parameters. The returned array lists indices of params in order as they are used for the SQL query.