java.lang.Object
org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
com.blazebit.persistence.spring.data.base.query.JpaParameters
All Implemented Interfaces:
Iterable<JpaParameters.JpaParameter>, Supplier<Stream<JpaParameters.JpaParameter>>, org.springframework.data.util.Streamable<JpaParameters.JpaParameter>

public class JpaParameters extends org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
Custom extension of Parameters discovering additional query parameter annotations. Christian Beikov: Copied to be able to share code between Spring Data integrations for 1.x and 2.x.
Since:
1.6.9
Author:
Thomas Darimont, Mark Paluch, Eugen Mayer
  • Constructor Details

    • JpaParameters

      public JpaParameters(Method method)
      Creates a new JpaParameters instance from the given Method.
      Parameters:
      method - must not be null.
  • Method Details

    • hasPageableParameter

      public boolean hasPageableParameter()
      Overrides:
      hasPageableParameter in class org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
    • getPageableIndex

      public int getPageableIndex()
      Overrides:
      getPageableIndex in class org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
    • getOptionalParameters

      public JpaParameters getOptionalParameters()
      Gets the parameters annotated with OptionalParam.
      Returns:
      the optional parameters
    • getSpecificationIndex

      public int getSpecificationIndex()
      Returns the index of the Specification Method parameter if available. Will return -1 if there is no Specification parameter in the Method's parameter list.
      Returns:
      the index of the specification parameter, or -1 if not present
    • hasSpecificationParameter

      public boolean hasSpecificationParameter()
      Returns whether the method the Parameters was created for contains a Specification parameter.
      Returns:
      true if the methods has a specification parameter
    • getEntityViewSettingProcessorIndex

      public int getEntityViewSettingProcessorIndex()
      Returns the index of the EntityViewSettingProcessor Method parameter if available. Will return -1 if there is no EntityViewSettingProcessor parameter in the Method's parameter list.
      Returns:
      the index of the processor parameter, or -1 if not present
    • hasEntityViewSettingProcessorParameter

      public boolean hasEntityViewSettingProcessorParameter()
      Returns whether the method the Parameters was created for contains a EntityViewSettingProcessor parameter.
      Returns:
      true if the methods has a processor parameter
    • getBlazeSpecificationIndex

      public int getBlazeSpecificationIndex()
      Returns the index of the BlazeSpecification Method parameter if available. Will return -1 if there is no BlazeSpecification parameter in the Method's parameter list.
      Returns:
      the index of the processor parameter, or -1 if not present
    • hasBlazeSpecificationParameter

      public boolean hasBlazeSpecificationParameter()
      Returns whether the method the Parameters was created for contains a BlazeSpecification parameter.
      Returns:
      true if the methods has a processor parameter
    • createParameter

      protected JpaParameters.JpaParameter createParameter(org.springframework.core.MethodParameter parameter)
      Overrides:
      createParameter in class org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>
    • createFrom

      protected JpaParameters createFrom(List<JpaParameters.JpaParameter> parameters)
      Specified by:
      createFrom in class org.springframework.data.repository.query.Parameters<JpaParameters,JpaParameters.JpaParameter>