EclipseLink 2.4.2, build 'v20130514-5956486' API Reference

org.eclipse.persistence.jpa.jpql.model
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.

Version:
2.4
Author:
Pascal Filion
Since:
2.4

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

Method Detail

abs

T abs(T builder)
Creates the expression ABS(x).

Parameters:
builder - The parameter of the ABS expression
Returns:
This 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(java.lang.String path)
Creates the expression AVG(path).

Parameters:
path - The state field path expression
Returns:
This This builder

avgDistinct

T avgDistinct(java.lang.String path)
Creates the expression AVG(DISTINCT path).

Parameters:
path - The state field path expression
Returns:
This This builder

case_

T case_(ICaseExpressionStateObjectBuilder builder)
Creates a new CASE expression.

Parameters:
builder - The builder of a CASE expression
Returns:
This 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 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 This builder

count

T count(java.lang.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 This builder

countDistinct

T countDistinct(java.lang.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 This builder

currentDate

T currentDate()
Creates the expression representing CURRENT_DATE.

Returns:
This This builder

currentTime

T currentTime()
Creates the expression representing CURRENT_TIME.

Returns:
This This builder

currentTimestamp

T currentTimestamp()
Creates the expression representing CURRENT_TIMESTAMP.

Returns:
This This builder

date

T date(java.lang.String jdbcDate)
Creates a new date using the JDBC syntax of a date.

Returns:
This This builder

divide

T divide(T builder)
Creates the expression x ÷ y.

Parameters:
builder - The right side of the addition expression
Returns:
This This builder

entityType

T entityType(java.lang.String entityTypeName)
Creates a new entity type literal.

Parameters:
entityTypeName - The short name of the entity
Returns:
This This builder

enumLiteral

T enumLiteral(java.lang.Enum<? extends java.lang.Enum<?>> enumConstant)
Creates a new enum literal.

Parameters:
enumConstant - The enum constant
Returns:
This This builder

function

T function(java.lang.String identifier,
           java.lang.String functionName,
           java.lang.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(java.lang.String identifier,
           java.lang.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

ICaseExpressionStateObjectBuilder 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(java.lang.String variable)
Creates the expression INDEX(identification_variable).

Parameters:
variable - The identification variable
Returns:
This This builder

length

T length(T builder)
Creates the expression LENGTH(expression).

Parameters:
builder - The encapsulated expression
Returns:
This 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 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 This builder

max

T max(java.lang.String path)
Creates the expression MAX(path).

Parameters:
path - The state field path expression
Returns:
This This builder

maxDistinct

T maxDistinct(java.lang.String path)
Creates the expression MAX(DISTINCT path).

Parameters:
path - The state field path expression
Returns:
This This builder

min

T min(java.lang.String path)
Creates the expression AVG(path).

Parameters:
path - The state field path expression
Returns:
This This builder

minDistinct

T minDistinct(java.lang.String path)
Creates the expression AVG(DISTINCT path).

Parameters:
path - The state field path expression
Returns:
This This builder

minus

T minus(T builder)
Creates the expression - x.

Parameters:
builder - The expression that will have the plus sign prepended
Returns:
This 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 This builder

multiply

T multiply(T builder)
Creates the expression x × y.

Parameters:
builder - The right side of the addition expression
Returns:
This 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 This builder

numeric

T numeric(java.lang.Number number)
Creates the numeric literal.

Parameters:
number - The numeric literal
Returns:
This This builder

numeric

T numeric(java.lang.String number)
Creates the numeric literal.

Parameters:
number - The numeric literal
Returns:
This This builder

parameter

T parameter(java.lang.String parameter)
Creates the input parameter.

Parameters:
parameter - The named or positional input parameter
Returns:
This This builder

path

T path(java.lang.String path)
Creates a new state field path expression.

Parameters:
path - The state field path path expression
Returns:
This This builder

plus

T plus(T builder)
Creates the expression + x.

Parameters:
builder - The expression that will have the plus sign prepended
Returns:
This This builder

size

T size(java.lang.String path)
Creates the expression SIZE(collection_valued_path_expression).

Parameters:
path - The collection-valued path expression
Returns:
This This builder

sqrt

T sqrt(T builder)
Creates the expression SQRT(x).

Parameters:
builder - The parameter of the ABS expression
Returns:
This This builder

string

T string(java.lang.String literal)
Creates a new string literal.

Parameters:
literal - The string literal
Returns:
This This builder

sub

T sub(T builder)
Creates an encapsulated expression: (expression).

Parameters:
builder - The expression that will be encapsulated
Returns:
This This builder

subtract

T subtract(T builder)
Creates the expression x - y.

Parameters:
builder - The right side of the addition expression
Returns:
This This builder

sum

T sum(java.lang.String path)
Creates the expression SUM(path).

Parameters:
path - The state field path expression
Returns:
This This builder

sumDistinct

T sumDistinct(java.lang.String path)
Creates the expression SUM(path).

Parameters:
path - The state field path expression
Returns:
This This builder

type

T type(java.lang.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 This builder

EclipseLink 2.4.2, build 'v20130514-5956486' API Reference