Search in sources :

Example 1 with ServiceProvider

use of com.blazebit.persistence.spi.ServiceProvider in project blaze-persistence by Blazebit.

the class AbstractAttribute method renderLimit.

@Override
public <T extends LimitBuilder<?> & OrderByBuilder<?>> void renderLimit(String parent, ParameterHolder<?> parameterHolder, Map<String, Object> optionalParameters, T builder) {
    if (limitExpression != null) {
        ExpressionFactory expressionFactory = ((ServiceProvider) builder).getService(ExpressionFactory.class);
        declaringType.createLimiter(expressionFactory, parent, limitExpression, offsetExpression, orderByItems).apply(parameterHolder, optionalParameters, builder);
    }
}
Also used : ExpressionFactory(com.blazebit.persistence.parser.expression.ExpressionFactory) ServiceProvider(com.blazebit.persistence.spi.ServiceProvider)

Aggregations

ExpressionFactory (com.blazebit.persistence.parser.expression.ExpressionFactory)1 ServiceProvider (com.blazebit.persistence.spi.ServiceProvider)1