Package org.springframework.data.repository.query

Examples of org.springframework.data.repository.query.Parameters


        this.method = method;
        this.query = new StringQuery(queryString);
        this.countQuery = new StringQuery(method.getCountQuery() == null ? QueryUtils.createCountQueryFor(queryString)
                : method.getCountQuery());

        Parameters parameters = method.getParameters();
        boolean hasPagingOrSortingParameter = parameters.hasPageableParameter() || parameters.hasSortParameter();

        if (method.isNativeQuery() && hasPagingOrSortingParameter) {
            throw new IllegalStateException("Cannot use native queries with dynamic sorting and/or pagination!");
        }
View Full Code Here


  public static String bindQueryParameters(SimpleDbQueryMethod queryMethod,
      Object... parameterValues) {
    final String rawQuery = queryMethod.getAnnotatedQuery();

    if (hasNamedParameter(queryMethod) || hasBindParameter(rawQuery)) {
      final Parameters parameters = queryMethod.getParameters();
      return buildQuery(rawQuery, parameters, parameterValues);

    }

    return rawQuery;
View Full Code Here

TOP

Related Classes of org.springframework.data.repository.query.Parameters

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.