Class QualifierUtils
java.lang.Object
org.springframework.data.aerospike.core.QualifierUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic QualifierexcludeIdQualifier(Qualifier qualifier) Filters a singleQualifierobject, removing any ID-containing qualifiers from its structure, including nested qualifiers.getIdValue(Qualifier qualifier) Retrieves the ID value(s) from a givenQualifierobject.
-
Method Details
-
getIdValue
Retrieves the ID value(s) from a givenQualifierobject. This method expects the qualifier to contain an ID. If no ID is present, anIllegalArgumentExceptionis thrown.- Parameters:
qualifier- TheQualifierobject from which to extract the ID. Must not be null and must contain an ID- Returns:
- A
List<Object>containing the ID value(s). The list will contain a single element if the ID is a simple object or a byte array, or multiple elements if the ID is an array or an iterable - Throws:
IllegalArgumentException- If the providedqualifierdoes not contain an ID
-
excludeIdQualifier
Filters a singleQualifierobject, removing any ID-containing qualifiers from its structure, including nested qualifiers. If the input qualifier itself contains an ID and no other nested qualifiers, the method returns null. If the input qualifier contains nested qualifiers, the method recursively processes them.- Parameters:
qualifier- TheQualifierobject to filter. Can be null- Returns:
- A new
Qualifierobject with ID-containing parts removed, ornullif the original qualifier only contained an ID or if all its parts were filtered out
-