类 QueryBuilder


  • public final class QueryBuilder
    extends Object
    作者:
    qiushui on 2018-11-05.
    • 构造器详细资料

      • QueryBuilder

        public QueryBuilder()
      • QueryBuilder

        public QueryBuilder​(org.springframework.data.mongodb.core.query.Query query)
    • 方法详细资料

      • build

        public org.springframework.data.mongodb.core.query.Query build()
        构建
        返回:
      • equal

        public QueryBuilder equal​(String attribute,
                                  Object value)
        相等条件
        参数:
        attribute -
        value -
        返回:
      • notEqual

        public QueryBuilder notEqual​(String attribute,
                                     Object value)
        不相等条件
        参数:
        attribute -
        value -
        返回:
      • containsLike

        public QueryBuilder containsLike​(String attribute,
                                         String value)
        包含匹配条件
        参数:
        attribute -
        value -
        返回:
      • startWith

        public QueryBuilder startWith​(String attribute,
                                      String value)
        开头匹配条件
        参数:
        attribute -
        value -
        返回:
      • endWith

        public QueryBuilder endWith​(String attribute,
                                    String value)
        结尾匹配条件
        参数:
        attribute -
        value -
        返回:
      • isBetween

        public <Y extends Comparable<? super Y>> QueryBuilder isBetween​(String attribute,
                                                                        Y min,
                                                                        Y max)
        区间匹配条件
        类型参数:
        Y -
        参数:
        attribute -
        min -
        max -
        返回:
      • in

        public <E> QueryBuilder in​(String attribute,
                                   Collection<E> collection)
        集合条件
        类型参数:
        E -
        参数:
        attribute -
        collection -
        返回:
      • in

        public <E> QueryBuilder in​(String attribute,
                                   E... array)
        数组条件
        类型参数:
        E -
        参数:
        attribute -
        array -
        返回:
      • greaterThan

        public <Y extends Comparable<? super Y>> QueryBuilder greaterThan​(String attribute,
                                                                          Y value)
        大于条件
        类型参数:
        Y -
        参数:
        attribute -
        value -
        返回:
      • greaterThanOrEqualTo

        public <Y extends Comparable<? super Y>> QueryBuilder greaterThanOrEqualTo​(String attribute,
                                                                                   Y value)
        大于等于条件
        类型参数:
        Y -
        参数:
        attribute -
        value -
        返回:
      • lessThan

        public <Y extends Comparable<? super Y>> QueryBuilder lessThan​(String attribute,
                                                                       Y value)
        小于条件
        类型参数:
        Y -
        参数:
        attribute -
        value -
        返回:
      • lessThanOrEqualTo

        public <Y extends Comparable<? super Y>> QueryBuilder lessThanOrEqualTo​(String attribute,
                                                                                Y value)
        小于等于条件
        类型参数:
        Y -
        参数:
        attribute -
        value -
        返回:
      • exists

        public QueryBuilder exists​(String attribute,
                                   boolean exists)
        是否存在
        参数:
        attribute -
        exists -
        返回: