Interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>

All Known Subinterfaces:
IAbstractConditionalExpressionStateObjectBuilder<T>, ICaseExpressionStateObjectBuilder, IConditionalExpressionStateObjectBuilder, IEclipseLinkConditionalStateObjectBuilder, IEclipseLinkSelectExpressionStateObjectBuilder, IEclipseLinkSimpleSelectExpressionStateObjectBuilder, INewValueStateObjectBuilder, ISelectExpressionStateObjectBuilder, ISimpleSelectExpressionStateObjectBuilder
All Known Implementing Classes:
AbstractCaseExpressionStateObjectBuilder, AbstractConditionalExpressionStateObjectBuilder, AbstractConditionalStateObjectBuilderWrapper, AbstractEclipseLinkSelectExpressionStateObjectBuilder, AbstractEclipseLinkSimpleSelectExpressionStateObjectBuilder, AbstractNewValueStateObjectBuilder, AbstractScalarExpressionStateObjectBuilder, AbstractSelectExpressionStateObjectBuilder, AbstractSimpleSelectExpressionStateObjectBuilder, DefaultCaseExpressionStateObjectBuilder, DefaultConditionalExpressionStateObjectBuilder, DefaultNewValueStateObjectBuilder, DefaultSelectExpressionStateObjectBuilder, DefaultSimpleSelectExpressionStateObjectBuilder, EclipseLinkConditionalStateObjectBuilder, EclipseLinkSelectExpressionStateObjectBuilder, EclipseLinkSimpleSelectExpressionStateObjectBuilder

public interface IScalarExpressionStateObjectBuilder<T extends IScalarExpressionStateObjectBuilder<T>>
This builder can be used to easily create a scalar expression without having to create each object manually.
Since:
2.4
Version:
2.4
  • Method Summary

    Modifier and Type
    Method
    Description
    abs(T builder)
    Creates the expression ABS(x).
    add(T builder)
    Creates the expression x + y.
    avg(String path)
    Creates the expression AVG(path).
    Creates the expression AVG(DISTINCT path).
    Creates a new CASE expression.
    coalesce(T builder1, T builder2)
    Create the expression COALESCE(scalar_expression {, scalar_expression}+).
    coalesce(T builder1, T builder2, T[] builders)
    Create the expression COALESCE(scalar_expression {, scalar_expression}+).
    concat(T builder1, T builder2)
    Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
    concat(T builder1, T builder2, T[] builders)
    Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
    count(String path)
    Creates the expression COUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression).
    Creates the expression COUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression).
    Creates the expression representing CURRENT_DATE.
    Creates the expression representing CURRENT_TIME.
    Creates the expression representing CURRENT_TIMESTAMP.
    date(String jdbcDate)
    Creates a new date using the JDBC syntax of a date.
    divide(T builder)
    Creates the expression x / y.
    entityType(String entityTypeName)
    Creates a new entity type literal.
    enumLiteral(Enum<? extends Enum<?>> enumConstant)
    Creates a new enum literal.
    function(String identifier, String functionName)
    Creates the expression <identifier>('functionName' {, expression}*).
    function(String identifier, String functionName, String... arguments)
    Creates the expression <identifier>('functionName' {, expression}*).
    function(String identifier, String functionName, T[] arguments)
    Creates the expression <identifier>('functionName' {, expression}*).
    Returns the builder that can create a CASE expression, which requires a IConditionalExpressionStateObjectBuilder to build the WHEN clauses.
    index(String variable)
    Creates the expression INDEX(identification_variable).
    length(T builder)
    Creates the expression LENGTH(expression).
    locate(T parameter1, T parameter2)
    Creates the expression LOCATE(string_primary, string_primary).
    locate(T parameter1, T parameter2, T parameter3)
    Creates the expression LOCATE(string_primary, string_primary [, simple_arithmetic_expression]).
    max(String path)
    Creates the expression MAX(path).
    Creates the expression MAX(DISTINCT path).
    min(String path)
    Creates the expression AVG(path).
    Creates the expression AVG(DISTINCT path).
    minus(T builder)
    Creates the expression - x.
    mod(T parameter1, T parameter2)
    Creates the expression MOD(simple_arithmetic_expression, simple_arithmetic_expression).
    multiply(T builder)
    Creates the expression x * y.
    nullIf(T builder1, T builder2)
    Create the expression NULLIF(scalar_expression, scalar_expression).
    numeric(Number number)
    Creates the numeric literal.
    numeric(String number)
    Creates the numeric literal.
    parameter(String parameter)
    Creates the input parameter.
    path(String path)
    Creates a new state field path expression.
    plus(T builder)
    Creates the expression + x.
    size(String path)
    Creates the expression SIZE(collection_valued_path_expression).
    sqrt(T builder)
    Creates the expression SQRT(x).
    string(String literal)
    Creates a new string literal.
    sub(T builder)
    Creates an encapsulated expression: (expression).
    subtract(T builder)
    Creates the expression x - y.
    sum(String path)
    Creates the expression SUM(path).
    Creates the expression SUM(path).
    type(String path)
    Creates the expression TYPE(identification_variable | single_valued_object_path_expression | input_parameter).
  • Method Details

    • abs

      T abs(T builder)
      Creates the expression ABS(x).
      Parameters:
      builder - The parameter of the ABS expression
      Returns:
      This builder
    • add

      T add(T builder)
      Creates the expression x + y.
      Parameters:
      builder - The right side of the addition expression
      Returns:
      This builder
    • avg

      T avg(String path)
      Creates the expression AVG(path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • avgDistinct

      T avgDistinct(String path)
      Creates the expression AVG(DISTINCT path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • case_

      Creates a new CASE expression.
      Parameters:
      builder - The builder of a CASE expression
      Returns:
      This builder
    • coalesce

      T coalesce(T builder1, T builder2)
      Create the expression COALESCE(scalar_expression {, scalar_expression}+).
      Parameters:
      builder1 - The first scalar expression
      builder2 - The second scalar expression
      Returns:
      This builder
    • coalesce

      T coalesce(T builder1, T builder2, T[] builders)
      Create the expression COALESCE(scalar_expression {, scalar_expression}+).
      Parameters:
      builder1 - The first scalar expression
      builder2 - The second scalar expression
      builders - The subsequent scalar expressions
      Returns:
      This builder
    • concat

      T concat(T builder1, T builder2)
      Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
      Parameters:
      builder1 - The first argument of the expression
      builder2 - The second argument of the expression
      Returns:
      This builder
    • concat

      T concat(T builder1, T builder2, T[] builders)
      Creates the expression CONCAT(string_primary, string_primary {, string_primary}*).
      Parameters:
      builder1 - The first argument of the expression
      builder2 - The second argument of the expression
      builders - The subsequence arguments of the expression, which are optional
      Returns:
      This builder
    • count

      T count(String path)
      Creates the expression COUNT(identification_variable | state_field_path_expression | single_valued_object_path_expression).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • countDistinct

      T countDistinct(String path)
      Creates the expression COUNT(DISTINCT identification_variable | state_field_path_expression | single_valued_object_path_expression).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • currentDate

      T currentDate()
      Creates the expression representing CURRENT_DATE.
      Returns:
      This builder
    • currentTime

      T currentTime()
      Creates the expression representing CURRENT_TIME.
      Returns:
      This builder
    • currentTimestamp

      T currentTimestamp()
      Creates the expression representing CURRENT_TIMESTAMP.
      Returns:
      This builder
    • date

      T date(String jdbcDate)
      Creates a new date using the JDBC syntax of a date.
      Returns:
      This builder
    • divide

      T divide(T builder)
      Creates the expression x / y.
      Parameters:
      builder - The right side of the division expression
      Returns:
      This builder
    • entityType

      T entityType(String entityTypeName)
      Creates a new entity type literal.
      Parameters:
      entityTypeName - The short name of the entity
      Returns:
      This builder
    • enumLiteral

      T enumLiteral(Enum<? extends Enum<?>> enumConstant)
      Creates a new enum literal.
      Parameters:
      enumConstant - The enum constant
      Returns:
      This builder
    • function

      T function(String identifier, String functionName, String... arguments)
      Creates the expression <identifier>('functionName' {, expression}*).
      Parameters:
      identifier - The JPQL identifier that is used to identify the SQL expression
      functionName - The name of the native SQL function
      arguments - The arguments of the expression
      Returns:
      This builder
    • function

      T function(String identifier, String functionName)
      Creates the expression <identifier>('functionName' {, expression}*).
      Parameters:
      identifier - The JPQL identifier that is used to identify the SQL expression
      functionName - The name of the native SQL function
      Returns:
      This builder
    • function

      T function(String identifier, String functionName, T[] arguments)
      Creates the expression <identifier>('functionName' {, expression}*).
      Parameters:
      identifier - The JPQL identifier that is used to identify the SQL expression
      functionName - The name of the native SQL function
      arguments - The arguments of the expression
      Returns:
      This builder
    • getCaseBuilder

      Returns the builder that can create a CASE expression, which requires a IConditionalExpressionStateObjectBuilder to build the WHEN clauses.
      Returns:
      The builder of a CASE expression
    • index

      T index(String variable)
      Creates the expression INDEX(identification_variable).
      Parameters:
      variable - The identification variable
      Returns:
      This builder
    • length

      T length(T builder)
      Creates the expression LENGTH(expression).
      Parameters:
      builder - The encapsulated expression
      Returns:
      This builder
    • locate

      T locate(T parameter1, T parameter2)
      Creates the expression LOCATE(string_primary, string_primary).
      Parameters:
      parameter1 - The first string primary
      parameter2 - The second string primary
      Returns:
      This builder
    • locate

      T locate(T parameter1, T parameter2, T parameter3)
      Creates the expression LOCATE(string_primary, string_primary [, simple_arithmetic_expression]).
      Parameters:
      parameter1 - The first string primary
      parameter2 - The second string primary
      parameter3 - The position of the search within the string
      Returns:
      This builder
    • max

      T max(String path)
      Creates the expression MAX(path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • maxDistinct

      T maxDistinct(String path)
      Creates the expression MAX(DISTINCT path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • min

      T min(String path)
      Creates the expression AVG(path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • minDistinct

      T minDistinct(String path)
      Creates the expression AVG(DISTINCT path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • minus

      T minus(T builder)
      Creates the expression - x.
      Parameters:
      builder - The expression that will have the plus sign prepended
      Returns:
      This builder
    • mod

      T mod(T parameter1, T parameter2)
      Creates the expression MOD(simple_arithmetic_expression, simple_arithmetic_expression).
      Parameters:
      parameter1 - The first parameter
      parameter2 - The second parameter
      Returns:
      This builder
    • multiply

      T multiply(T builder)
      Creates the expression x * y.
      Parameters:
      builder - The right side of the multiply expression
      Returns:
      This builder
    • nullIf

      T nullIf(T builder1, T builder2)
      Create the expression NULLIF(scalar_expression, scalar_expression).
      Parameters:
      builder1 - The first scalar expression
      builder2 - The second scalar expression
      Returns:
      This builder
    • numeric

      T numeric(Number number)
      Creates the numeric literal.
      Parameters:
      number - The numeric literal
      Returns:
      This builder
    • numeric

      T numeric(String number)
      Creates the numeric literal.
      Parameters:
      number - The numeric literal
      Returns:
      This builder
    • parameter

      T parameter(String parameter)
      Creates the input parameter.
      Parameters:
      parameter - The named or positional input parameter
      Returns:
      This builder
    • path

      T path(String path)
      Creates a new state field path expression.
      Parameters:
      path - The state field path path expression
      Returns:
      This builder
    • plus

      T plus(T builder)
      Creates the expression + x.
      Parameters:
      builder - The expression that will have the plus sign prepended
      Returns:
      This builder
    • size

      T size(String path)
      Creates the expression SIZE(collection_valued_path_expression).
      Parameters:
      path - The collection-valued path expression
      Returns:
      This builder
    • sqrt

      T sqrt(T builder)
      Creates the expression SQRT(x).
      Parameters:
      builder - The parameter of the ABS expression
      Returns:
      This builder
    • string

      T string(String literal)
      Creates a new string literal.
      Parameters:
      literal - The string literal
      Returns:
      This builder
    • sub

      T sub(T builder)
      Creates an encapsulated expression: (expression).
      Parameters:
      builder - The expression that will be encapsulated
      Returns:
      This builder
    • subtract

      T subtract(T builder)
      Creates the expression x - y.
      Parameters:
      builder - The right side of the addition expression
      Returns:
      This builder
    • sum

      T sum(String path)
      Creates the expression SUM(path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • sumDistinct

      T sumDistinct(String path)
      Creates the expression SUM(path).
      Parameters:
      path - The state field path expression
      Returns:
      This builder
    • type

      T type(String path)
      Creates the expression TYPE(identification_variable | single_valued_object_path_expression | input_parameter).
      Parameters:
      path - The identification variable or the input parameter
      Returns:
      This builder