Interface PersistenceFunctionRenderer

All Known Implementing Classes:
PersistenceAbsFunction, PersistenceAtan2Function, PersistenceCeilFunction, PersistenceCurrentDateFunction, PersistenceCurrentTimeFunction, PersistenceCurrentTimestampFunction, PersistenceEndsWithFunction, PersistenceFloorFunction, PersistenceGreatestFunction, PersistenceLeastFunction, PersistenceLengthFunction, PersistenceLocateFunction, PersistenceLocateLastFunction, PersistenceLowerFunction, PersistenceLTrimFunction, PersistenceNumericFunction, PersistencePowFunction, PersistenceRandomFunction, PersistenceReplaceFunction, PersistenceRoundFunction, PersistenceRTrimFunction, PersistenceSizeFunction, PersistenceStartsWithFunction, PersistenceSubstringFunction, PersistenceTrimFunction, PersistenceUpperFunction

public interface PersistenceFunctionRenderer
Since:
1.0.0
Author:
Christian Beikov
  • Method Details

    • rendersPredicate

      default boolean rendersPredicate()
      Returns whether the renderer renders a predicate or an expression.
      Returns:
      whether a predicate or expresion is rendered
    • render

      void render​(com.blazebit.domain.runtime.model.DomainFunction function, com.blazebit.domain.runtime.model.DomainType returnType, PersistenceDomainFunctionArgumentRenderers argumentRenderers, StringBuilder sb, PersistenceExpressionSerializer serializer)
      Renders the given domain function with the given return type and arguments to the given StringBuilder.
      Parameters:
      function - The domain function
      returnType - The function return type
      argumentRenderers - The argument renderers for the arguments
      sb - The StringBuilder to render to
      serializer - The serializer
    • builtin

      static PersistenceFunctionRenderer builtin​(String persistenceFunctionName)
      Returns a function renderer that renders a function as builtin function.
      Parameters:
      persistenceFunctionName - The builtin function name
      Returns:
      the function renderer
    • function

      static PersistenceFunctionRenderer function​(String persistenceFunctionName)
      Returns a function renderer that renders a function with the JPQL function wrapper.
      Parameters:
      persistenceFunctionName - The function name
      Returns:
      the function renderer