Class Conditions

    • Constructor Detail

      • Conditions

        public Conditions​(Conditions conditions)
    • Method Detail

      • isDescending

        public boolean isDescending()
        Get the descending option value
        Returns:
        false by default
      • descending

        public static Conditions descending()
        Create new Conditions instance, returning tuples in the descending order
        Returns:
        new Conditions instance
      • withDescending

        public Conditions withDescending()
        Return tuples in the descending order
        Returns:
        this Conditions instance
      • ascending

        public static Conditions ascending()
        Create new Conditions instance, returning tuples will in the ascending order
        Returns:
        new Conditions instance
      • withAscending

        public Conditions withAscending()
        Return tuples will in the ascending order
        Returns:
        this Conditions instance
      • any

        public static Conditions any()
        Create new Conditions instance without any filtration.
        Returns:
        new Conditions instance
      • limit

        public static Conditions limit​(long limit)
        Limit the number od returned tuples with the specified value
        Parameters:
        limit - number of tuples, should be greater than 0
        Returns:
        new Conditions instance
      • withLimit

        public Conditions withLimit​(long limit)
        Limit the number od returned tuples with the specified value
        Parameters:
        limit - number of tuples, should be greater than 0
        Returns:
        this Conditions instance
      • getLimit

        public long getLimit()
        Get the specified limit
        Returns:
        number of tuples
      • offset

        public static Conditions offset​(long offset)
        Skip the specified number of tuples before collecting the result.
        Parameters:
        offset - number of tuples, should be greater than 0
        Returns:
        new Conditions instance
      • withOffset

        public Conditions withOffset​(long offset)
        Skip the specified number of tuples before collecting the result.
        Parameters:
        offset - number of tuples, should be greater than 0
        Returns:
        this Conditions instance
      • getOffset

        public long getOffset()
        Get the specified offset
        Returns:
        number of tuples
      • after

        public static Conditions after​(TarantoolTuple tuple)
        Start collecting tuples into result after the specified tuple. The tuple itself will not be added to the result.
        Parameters:
        tuple - last tuple value from the previous result, may be null
        Returns:
        new Conditions instance
      • after

        public static <T> Conditions after​(T tuple,
                                           ObjectConverter<T,​org.msgpack.value.ArrayValue> tupleConverter)
        Start collecting tuples into result after the specified tuple. The tuple itself will not be added to the result.
        Type Parameters:
        T - tuple type
        Parameters:
        tuple - last tuple value from the previous result, may be null
        tupleConverter - converter of the specified tuple type into a MessagePack array
        Returns:
        new Conditions instance
      • startAfter

        public Conditions startAfter​(TarantoolTuple tuple)
        Start collecting tuples into result after the specified tuple. The tuple itself will not be added to the result.
        Parameters:
        tuple - last tuple value from the previous result, may be null
        Returns:
        new Conditions instance
      • startAfter

        public <T> Conditions startAfter​(T tuple,
                                         ObjectConverter<T,​org.msgpack.value.ArrayValue> tupleConverter)
        Start collecting tuples into result after the specified tuple. The tuple itself will not be added to the result.
        Type Parameters:
        T - tuple type
        Parameters:
        tuple - last tuple value from the previous result, may be null
        tupleConverter - converter of the specified tuple type into a MessagePack array
        Returns:
        new Conditions instance
      • getStartTuple

        public Packable getStartTuple()
        Get the specified index values to start from
        Returns:
        list of index parts values
      • indexEquals

        public static Conditions indexEquals​(String indexName,
                                             List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexEquals

        public Conditions andIndexEquals​(String indexName,
                                         List<?> indexPartValues)
        Filter tuples by the specified index
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • indexEquals

        public static Conditions indexEquals​(int indexId,
                                             List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexEquals

        public Conditions andIndexEquals​(int indexId,
                                         List<?> indexPartValues)
        Filter tuples by the specified index
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        this Conditions instance
      • indexGreaterThan

        public static Conditions indexGreaterThan​(String indexName,
                                                  List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values greater than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexGreaterThan

        public Conditions andIndexGreaterThan​(String indexName,
                                              List<?> indexPartValues)
        Filter tuples by the specified index, with values greater than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • indexGreaterThan

        public static Conditions indexGreaterThan​(int indexId,
                                                  List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values greater than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexGreaterThan

        public Conditions andIndexGreaterThan​(int indexId,
                                              List<?> indexPartValues)
        Filter tuples by the specified index, with values greater than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        this Conditions instance
      • indexGreaterOrEquals

        public static Conditions indexGreaterOrEquals​(String indexName,
                                                      List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values greater or equal than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexGreaterOrEquals

        public Conditions andIndexGreaterOrEquals​(String indexName,
                                                  List<?> indexPartValues)
        Filter tuples by the specified index, with values greater or equal than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • indexGreaterOrEquals

        public static Conditions indexGreaterOrEquals​(int indexId,
                                                      List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values greater or equal than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexGreaterOrEquals

        public Conditions andIndexGreaterOrEquals​(int indexId,
                                                  List<?> indexPartValues)
        Filter tuples by the specified index, with values greater or equal than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        this Conditions instance
      • indexLessThan

        public static Conditions indexLessThan​(String indexName,
                                               List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values less than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexLessThan

        public Conditions andIndexLessThan​(String indexName,
                                           List<?> indexPartValues)
        Filter tuples by the specified index, with values less than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • indexLessThan

        public static Conditions indexLessThan​(int indexId,
                                               List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values less than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexLessThan

        public Conditions andIndexLessThan​(int indexId,
                                           List<?> indexPartValues)
        Filter tuples by the specified index, with values less than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        this Conditions instance
      • indexLessOrEquals

        public static Conditions indexLessOrEquals​(String indexName,
                                                   List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values less or equal than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexLessOrEquals

        public Conditions andIndexLessOrEquals​(String indexName,
                                               List<?> indexPartValues)
        Filter tuples by the specified index, with values less or equal than the specified value
        Parameters:
        indexName - index name
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • indexLessOrEquals

        public static Conditions indexLessOrEquals​(int indexId,
                                                   List<?> indexPartValues)
        Create new Conditions instance with filter by the specified index, with values less or equal than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        new Conditions instance
      • andIndexLessOrEquals

        public Conditions andIndexLessOrEquals​(int indexId,
                                               List<?> indexPartValues)
        Filter tuples by the specified index, with values less or equal than the specified value
        Parameters:
        indexId - index id
        indexPartValues - index parts values
        Returns:
        this Conditions instance
      • equals

        public static Conditions equals​(String fieldName,
                                        Object value)
        Filter tuples by the specified field
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        new Conditions instance
      • andEquals

        public Conditions andEquals​(String fieldName,
                                    Object value)
        Filter tuples by the specified field
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        this Conditions instance
      • equals

        public static Conditions equals​(int fieldPosition,
                                        Object value)
        Filter tuples by the specified field
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        new Conditions instance
      • andEquals

        public Conditions andEquals​(int fieldPosition,
                                    Object value)
        Filter tuples by the specified field
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        this Conditions instance
      • greaterThan

        public static Conditions greaterThan​(String fieldName,
                                             Object value)
        Filter tuples by the specified field, with values greater than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        new Conditions instance
      • andGreaterThan

        public Conditions andGreaterThan​(String fieldName,
                                         Object value)
        Filter tuples by the specified field, with values greater than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        this Conditions instance
      • greaterThan

        public static Conditions greaterThan​(int fieldPosition,
                                             Object value)
        Filter tuples by the specified field, with values greater than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        new Conditions instance
      • andGreaterThan

        public Conditions andGreaterThan​(int fieldPosition,
                                         Object value)
        Filter tuples by the specified field, with values greater than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        this Conditions instance
      • greaterOrEquals

        public static Conditions greaterOrEquals​(String fieldName,
                                                 Object value)
        Filter tuples by the specified field, with values greater or equal than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        new Conditions instance
      • andGreaterOrEquals

        public Conditions andGreaterOrEquals​(String fieldName,
                                             Object value)
        Filter tuples by the specified field, with values greater or equal than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        this Conditions instance
      • greaterOrEquals

        public static Conditions greaterOrEquals​(int fieldPosition,
                                                 Object value)
        Filter tuples by the specified field, with values greater or equal than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        new Conditions instance
      • andGreaterOrEquals

        public Conditions andGreaterOrEquals​(int fieldPosition,
                                             Object value)
        Filter tuples by the specified field, with values greater or equal than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        this Conditions instance
      • lessThan

        public static Conditions lessThan​(String fieldName,
                                          Object value)
        Filter tuples by the specified field, with values less than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        new Conditions instance
      • andLessThan

        public Conditions andLessThan​(String fieldName,
                                      Object value)
        Filter tuples by the specified field, with values less than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        this Conditions instance
      • lessThan

        public static Conditions lessThan​(int fieldPosition,
                                          Object value)
        Filter tuples by the specified field, with values less than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        new Conditions instance
      • andLessThan

        public Conditions andLessThan​(int fieldPosition,
                                      Object value)
        Filter tuples by the specified field, with values less than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        this Conditions instance
      • lessOrEquals

        public static Conditions lessOrEquals​(String fieldName,
                                              Object value)
        Filter tuples by the specified field, with values less or equal than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        new Conditions instance
      • andLessOrEquals

        public Conditions andLessOrEquals​(String fieldName,
                                          Object value)
        Filter tuples by the specified field, with values less or equal than the specified value
        Parameters:
        fieldName - field name
        value - field value
        Returns:
        this Conditions instance
      • lessOrEquals

        public static Conditions lessOrEquals​(int fieldPosition,
                                              Object value)
        Filter tuples by the specified field, with values less or equal than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        new Conditions instance
      • andLessOrEquals

        public Conditions andLessOrEquals​(int fieldPosition,
                                          Object value)
        Filter tuples by the specified field, with values less or equal than the specified value
        Parameters:
        fieldPosition - field position
        value - field value
        Returns:
        this Conditions instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object