M - The message type.F - The message field type.public class MessageNamedArgumentFinder<M extends PMessage<M,F>,F extends PField> extends Object implements org.jdbi.v3.core.argument.NamedArgumentFinder
NamedArgumentFinder implementation that uses a message
and finds values based on the thrift declared field names. This
supports chained calls to any depth as long as each level is a
single message field.| Constructor and Description |
|---|
MessageNamedArgumentFinder(String prefix,
M message,
Map<PField,Integer> fieldTypes)
Create a named argument finder.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<org.jdbi.v3.core.argument.Argument> |
find(String name,
org.jdbi.v3.core.statement.StatementContext ctx) |
public MessageNamedArgumentFinder(@Nullable String prefix, @Nonnull M message, @Nonnull Map<PField,Integer> fieldTypes)
prefix - Optional prefix name. E.g. "x" will make for lookup
tags like ":x.my_field".message - The message to look up fields in.fieldTypes - Overriding of default field types. This can contain
fields for any of the contained message types, and
will be mapped whenever the field is selected.Copyright © 2015–2018 morimekta.net. All rights reserved.