org.springframework.data.mongodb.repository.query

Class MongoParameters

  • All Implemented Interfaces:
    Iterable<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>, Supplier<Stream<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>>, Streamable<org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>


    public class MongoParameters
    extends Parameters<MongoParameters,org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
    Custom extension of Parameters discovering additional
    Author:
    Oliver Gierke, Christoph Strobl, Mark Paluch
    • Constructor Detail

      • MongoParameters

        public MongoParameters(Method method,
                               boolean isGeoNearMethod)
        Creates a new MongoParameters instance from the given Method and MongoQueryMethod.
        Parameters:
        method - must not be null.
        queryMethod - must not be null.
    • Method Detail

      • createParameter

        protected org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter createParameter(MethodParameter parameter)
        Specified by:
        createParameter in class Parameters<MongoParameters,org.springframework.data.mongodb.repository.query.MongoParameters.MongoParameter>
      • getDistanceRangeIndex

        public int getDistanceRangeIndex()
      • getMaxDistanceIndex

        public int getMaxDistanceIndex()
        Returns the index of the Distance parameter to be used for max distance in geo queries.
        Returns:
        Since:
        1.7
      • getNearIndex

        public int getNearIndex()
        Returns the index of the parameter to be used to start a geo-near query from.
        Returns:
      • getFullTextParameterIndex

        public int getFullTextParameterIndex()
        Returns ths inde of the parameter to be used as a textquery param
        Returns:
        Since:
        1.6
      • hasFullTextParameter

        public boolean hasFullTextParameter()
        Returns:
        Since:
        1.6
      • getRangeIndex

        public int getRangeIndex()
        Returns:
        Since:
        1.7
      • createFrom

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