Package io.stargate.sdk.data.domain
Class JsonDocument
java.lang.Object
io.stargate.sdk.data.domain.odm.Document<Map<String,Object>>
io.stargate.sdk.data.domain.JsonDocument
Represents a document without schema contraints as a Map<String, Object>.(key/value)
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor.JsonDocument(String json) Public constructor.JsonDocument(Map<String, Object> keyValue) Public constructor. -
Method Summary
Modifier and TypeMethodDescriptionFluent getter for document.Fluent getter for document.<K> K[]Return an Array of items.getBoolean(String k) Access element from the mapAccess element from the mapAccess element from the mapAccess element from the mapAccess element from the mapAccess element from the mapAccess element from the mapgetInstant(String k) Access element from the mapgetInteger(String k) Access element from the map<K> List<K> Return a List of items.Access element from the map<T> TAccess element from the map.Access element from the mapAccess element from the map.Access element from the mapFluent getter for document.booleanisAttributeExist(String key) Access element from the mapPopulate attributevector(float[] vector) Fluent getter for document.
-
Constructor Details
-
JsonDocument
public JsonDocument()Default Constructor. -
JsonDocument
Public constructor.- Parameters:
json- json structure
-
JsonDocument
Public constructor.- Parameters:
keyValue- key value for the Json
-
-
Method Details
-
id
Fluent getter for document. -
vector
Fluent getter for document. -
data
Fluent getter for document. -
data
Fluent getter for document.- Parameters:
json- json- Returns:
- self reference
-
put
Populate attribute- Parameters:
key- attribute namevalue- attribute value- Returns:
- self reference
-
getList
Return a List of items.- Type Parameters:
K- type of item- Parameters:
k- keyitemClass- expected class- Returns:
- list of items
-
getArray
Return an Array of items.- Type Parameters:
K- type of item- Parameters:
k- keyitemClass- expected class- Returns:
- list of items
-
getObject
Access element from the map.- Type Parameters:
T- type of parameters- Parameters:
k- current configuration keytype- type of elements- Returns:
- configuration value
-
getString
Access element from the map.- Parameters:
k- current configuration key- Returns:
- configuration value
-
getDouble
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getInteger
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getBoolean
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getUUID
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getFloat
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getLong
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getShort
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getByte
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getCharacter
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getDate
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getCalendar
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
getInstant
Access element from the map- Parameters:
k- current configuration key- Returns:
- configuration value
-
isAttributeExist
Access element from the map- Parameters:
key- current configuration key- Returns:
- if key exists
-