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 TypeMethodDescriptionallClear
(int numericBitmask) Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).Creates a criterion using $bitsAllClear matching documents where all given bit positions are clear (i.e. 0).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).Creates a criterion using $bitsAllSet matching documents where all given bit positions are set (i.e. 1).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).Creates a criterion using $bitsAllClear matching documents where any given bit positions are clear (i.e. 0).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).Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).Creates a criterion using $bitsAnySet matching documents where any given bit positions are set (i.e. 1).
-
Method Details
-
allClear
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
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 encodedBinary
representation. Must not be null nor empty.- Returns:
- target
Criteria
. - Throws:
IllegalArgumentException
- when bitmask is null or empty.- Since:
- 2.1
- See Also:
-
allClear
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
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
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 encodedBinary
representation. Must not be null nor empty.- Returns:
- target
Criteria
. - Throws:
IllegalArgumentException
- when bitmask is null or empty.- Since:
- 2.1
- See Also:
-
allSet
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
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
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 encodedBinary
representation. Must not be null nor empty.- Returns:
- target
Criteria
. - Throws:
IllegalArgumentException
- when bitmask is null or empty.- Since:
- 2.1
- See Also:
-
anyClear
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
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
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 encodedBinary
representation. Must not be null nor empty.- Returns:
- target
Criteria
. - Throws:
IllegalArgumentException
- when bitmask is null or empty.- Since:
- 2.1
- See Also:
-
anySet
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:
-