类 MongoItemReader<T>

    • 方法详细资料

      • setQuery

        public void setQuery​(org.springframework.data.mongodb.core.query.Query query)
        A Mongo Query to be used.
        参数:
        query - Mongo Query to be used.
      • setTemplate

        public void setTemplate​(org.springframework.data.mongodb.core.MongoOperations template)
        Used to perform operations against the MongoDB instance. Also handles the mapping of documents to objects.
        参数:
        template - the MongoOperations instance to use
        另请参阅:
        MongoOperations
      • setQuery

        public void setQuery​(java.lang.String queryString)
        A JSON formatted MongoDB query. Parameterization of the provided query is allowed via ?<index> placeholders where the <index> indicates the index of the parameterValue to substitute.
        参数:
        queryString - JSON formatted Mongo query
      • setParameterValues

        public void setParameterValues​(java.util.List<java.lang.Object> parameterValues)
        List of values to be substituted in for each of the parameters in the query.
        参数:
        parameterValues - values
      • setFields

        public void setFields​(java.lang.String fields)
        JSON defining the fields to be returned from the matching documents by MongoDB.
        参数:
        fields - JSON string that identifies the fields to sort by.
      • setSort

        public void setSort​(java.util.Map<java.lang.String,​org.springframework.data.domain.Sort.Direction> sorts)
        Map of property names/Sort.Direction values to sort the input by.
        参数:
        sorts - map of properties and direction to sort each.
      • setCollection

        public void setCollection​(java.lang.String collection)
        参数:
        collection - Mongo collection to be queried.
      • setHint

        public void setHint​(java.lang.String hint)
        JSON String telling MongoDB what index to use.
        参数:
        hint - string indicating what index to use.
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        Checks mandatory properties
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
        另请参阅:
        InitializingBean.afterPropertiesSet()