Interface Criteria.BitwiseCriteriaOperators

Enclosing class:
Criteria

public static interface Criteria.BitwiseCriteriaOperators
MongoDB specific bitwise query operators like $bitsAllClear, $bitsAllSet,... for usage with Criteria.bits() and Query.
Since:
2.1
Author:
Christoph Strobl
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    allClear(int numericBitmask)
    Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
    allClear(String bitmask)
    Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
    allClear(List<Integer> positions)
    Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
    allSet(int numericBitmask)
    Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
    allSet(String bitmask)
    Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
    allSet(List<Integer> positions)
    Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
    anyClear(int numericBitmask)
    Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
    anyClear(String bitmask)
    Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
    anyClear(List<Integer> positions)
    Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
    anySet(int numericBitmask)
    Creates a criterion using $bitsAllSet matching documents where any given bit positions are set (i.e. 1).
    anySet(String bitmask)
    Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).
    anySet(List<Integer> positions)
    Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).
  • Method Details

    • allClear

      Criteria allClear(int numericBitmask)
      Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
      Parameters:
      numericBitmask - non-negative numeric bitmask.
      Returns:
      target Criteria.
      Since:
      2.1
      See Also:
    • allClear

      Criteria allClear(String bitmask)
      Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
      Parameters:
      bitmask - string representation of a bitmask that will be converted to its base64 encoded Binary representation. Must not be null nor empty.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when bitmask is null or empty.
      Since:
      2.1
      See Also:
    • allClear

      Criteria allClear(List<Integer> positions)
      Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).
      Parameters:
      positions - list of non-negative integer positions. Positions start at 0 from the least significant bit. Must not be null nor contain null elements.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when positions is null or contains null elements.
      Since:
      2.1
      See Also:
    • allSet

      Criteria allSet(int numericBitmask)
      Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
      Parameters:
      numericBitmask - non-negative numeric bitmask.
      Returns:
      target Criteria.
      Since:
      2.1
      See Also:
    • allSet

      Criteria allSet(String bitmask)
      Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
      Parameters:
      bitmask - string representation of a bitmask that will be converted to its base64 encoded Binary representation. Must not be null nor empty.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when bitmask is null or empty.
      Since:
      2.1
      See Also:
    • allSet

      Criteria allSet(List<Integer> positions)
      Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).
      Parameters:
      positions - list of non-negative integer positions. Positions start at 0 from the least significant bit. Must not be null nor contain null elements.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when positions is null or contains null elements.
      Since:
      2.1
      See Also:
    • anyClear

      Criteria anyClear(int numericBitmask)
      Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
      Parameters:
      numericBitmask - non-negative numeric bitmask.
      Returns:
      target Criteria.
      Since:
      2.1
      See Also:
    • anyClear

      Criteria anyClear(String bitmask)
      Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
      Parameters:
      bitmask - string representation of a bitmask that will be converted to its base64 encoded Binary representation. Must not be null nor empty.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when bitmask is null or empty.
      Since:
      2.1
      See Also:
    • anyClear

      Criteria anyClear(List<Integer> positions)
      Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).
      Parameters:
      positions - list of non-negative integer positions. Positions start at 0 from the least significant bit. Must not be null nor contain null elements.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when positions is null or contains null elements.
      Since:
      2.1
      See Also:
    • anySet

      Criteria anySet(int numericBitmask)
      Creates a criterion using $bitsAllSet matching documents where any given bit positions are set (i.e. 1).
      Parameters:
      numericBitmask - non-negative numeric bitmask.
      Returns:
      target Criteria.
      Since:
      2.1
      See Also:
    • anySet

      Criteria anySet(String bitmask)
      Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).
      Parameters:
      bitmask - string representation of a bitmask that will be converted to its base64 encoded Binary representation. Must not be null nor empty.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when bitmask is null or empty.
      Since:
      2.1
      See Also:
    • anySet

      Criteria anySet(List<Integer> positions)
      Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).
      Parameters:
      positions - list of non-negative integer positions. Positions start at 0 from the least significant bit. Must not be null nor contain null elements.
      Returns:
      target Criteria.
      Throws:
      IllegalArgumentException - when positions is null or contains null elements.
      Since:
      2.1
      See Also: