M - The message type.public class MessageRowMapper<M extends net.morimekta.providence.PMessage<M>> extends Object implements org.jdbi.v3.core.mapper.RowMapper<M>
| Modifier and Type | Field and Description |
|---|---|
static String |
ALL_FIELDS |
| Constructor and Description |
|---|
MessageRowMapper(net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor)
Create a message row mapper.
|
MessageRowMapper(net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor,
Map<String,net.morimekta.providence.descriptor.PField<M>> fieldMapping)
Create a message row mapper.
|
MessageRowMapper(String tableName,
net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor)
Create a message row mapper.
|
MessageRowMapper(String tableName,
net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor,
Map<String,net.morimekta.providence.descriptor.PField<M>> fieldMapping)
Create a message row mapper.
|
| Modifier and Type | Method and Description |
|---|---|
M |
map(ResultSet rs,
org.jdbi.v3.core.statement.StatementContext ctx) |
String |
toString() |
public static final String ALL_FIELDS
public MessageRowMapper(@Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor)
descriptor - Message descriptor.public MessageRowMapper(@Nonnull String tableName, @Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor)
tableName - The name of the table to filter fields for this mapper.descriptor - Message descriptor.public MessageRowMapper(@Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor, @Nonnull Map<String,net.morimekta.providence.descriptor.PField<M>> fieldMapping)
descriptor - Message descriptor.fieldMapping - The field mapping. If empty will map all fields with default names.public MessageRowMapper(@Nonnull String tableName, @Nonnull net.morimekta.providence.descriptor.PMessageDescriptor<M> descriptor, @Nonnull Map<String,net.morimekta.providence.descriptor.PField<M>> fieldMapping)
tableName - The name of the table to filter fields for this mapper.descriptor - Message descriptor.fieldMapping - The field mapping. If empty will map all fields with default names.public M map(ResultSet rs, org.jdbi.v3.core.statement.StatementContext ctx) throws SQLException
map in interface org.jdbi.v3.core.mapper.RowMapper<M extends net.morimekta.providence.PMessage<M>>SQLExceptionCopyright © 2015–2020 morimekta.net. All rights reserved.