Package com.datastax.astra.client.model
Class Filter
java.lang.Object
com.datastax.astra.client.model.Document
com.datastax.astra.client.model.Filter
- All Implemented Interfaces:
Serializable
,Map<String,
Object>
Filter Builder.
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.datastax.astra.client.model.Document
documentMap
-
Constructor Summary
ConstructorDescriptionFilter()
Default constructor.Filter
(@NonNull String fieldName, @NonNull FilterOperator cond, @NonNull Object value) Create a filter from a where clause. -
Method Summary
Methods inherited from class com.datastax.astra.client.model.Document
append, appendIfNotNull, clear, containsKey, containsValue, create, create, entrySet, equals, get, get, getArray, getBoolean, getByte, getCalendar, getCharacter, getDate, getDate, getDouble, getFloat, getId, getInstant, getInteger, getList, getList, getLong, getObjectId, getShort, getSimilarity, getString, getUUID, getVector, getVectorize, hashCode, id, isEmpty, keySet, map, parse, put, putAll, remove, size, values, vector, vectorize
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Filter
public Filter()Default constructor. -
Filter
public Filter(@NonNull @NonNull String fieldName, @NonNull @NonNull FilterOperator cond, @NonNull @NonNull Object value) Create a filter from a where clause.- Parameters:
fieldName
- fieldNamecond
- conditionvalue
- object value
-
-
Method Details
-
where
Work with arguments.- Parameters:
fieldName
- current field name.- Returns:
- builder for the filter
-
where
Build where clause with operator- Parameters:
fieldName
- current field namecond
- current conditionvalue
- value for the condition- Returns:
- current
-
findById
Build a filter for find by id.- Parameters:
id
- identifier- Returns:
- filter
-
toString
Serialization with Jackson. -
toJson
Express the json filter as a string.
-