- java.lang.Object
-
- io.helidon.dbclient.jsonp.JsonProcessingMapper
-
- All Implemented Interfaces:
DbMapper<JsonObject>
public final class JsonProcessingMapper extends Object implements DbMapper<JsonObject>
Json processing mapper.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JsonProcessingMapper
create()
JsonObject
read(DbRow row)
Get a JSON-P representation of this row.List<Object>
toIndexedParameters(JsonObject value)
Convert target type instance to a statement indexed parameters list.Map<String,Object>
toNamedParameters(JsonObject value)
Convert target type instance to a statement named parameters map.
-
-
-
Method Detail
-
create
public static JsonProcessingMapper create()
- Returns:
- a new mapper
-
read
public JsonObject read(DbRow row)
Get a JSON-P representation of this row.- Specified by:
read
in interfaceDbMapper<JsonObject>
- Parameters:
row
- source database row- Returns:
- json object containing column name to column value.
-
toNamedParameters
public Map<String,Object> toNamedParameters(JsonObject value)
Description copied from interface:DbMapper
Convert target type instance to a statement named parameters map.- Specified by:
toNamedParameters
in interfaceDbMapper<JsonObject>
- Parameters:
value
- mapping type instance containing values to be set into statement- Returns:
- map of statement named parameters mapped to values to be set
- See Also:
DbStatement.namedParam(Object)
-
toIndexedParameters
public List<Object> toIndexedParameters(JsonObject value)
Description copied from interface:DbMapper
Convert target type instance to a statement indexed parameters list.Using indexed parameters with typed values is probably not going to work nicely, unless the order is specified and the number of parameters is always related the provided value. There are cases where this is useful though - e.g. for types that represent an iterable collection.
- Specified by:
toIndexedParameters
in interfaceDbMapper<JsonObject>
- Parameters:
value
- mapping type instance containing values to be set into statement- Returns:
- map of statement named parameters mapped to values to be set
- See Also:
DbStatement.indexedParam(Object)
-
-