public class ProvidenceJdbi extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ProvidenceJdbi.FieldType |
static class |
ProvidenceJdbi.MappedField<F extends PField> |
| Constructor and Description |
|---|
ProvidenceJdbi() |
| Modifier and Type | Method and Description |
|---|---|
static <F extends PField> |
columnsFromAllFields()
With all column with default types.
|
static <M extends PMessage<M,F>,F extends PField> |
forMessage(M message,
ProvidenceJdbi.FieldType... fieldTypes)
Get named argument finder for message.
|
static <M extends PMessage<M,F>,F extends PField> |
forMessage(String prefix,
M message,
ProvidenceJdbi.FieldType... fieldTypes)
Get named argument finder for message.
|
static <M extends PMessage<M,F>,F extends PField> |
toField(M message,
F field)
Bind to the given field for the message.
|
static <M extends PMessage<M,F>,F extends PField> |
toField(M message,
F field,
int type)
Bind to the given field for the message.
|
static <M extends PMessage<M,F>,F extends PField> |
toMessage(PMessageDescriptor<M,F> descriptor,
ProvidenceJdbi.MappedField<F>... fieldMapping)
Bind to message using row mapper.
|
static <M extends PMessage<M,F>,F extends PField> |
toMessage(String tableName,
PMessageDescriptor<M,F> descriptor,
ProvidenceJdbi.MappedField<F>... fieldMapping)
Bind to message using row mapper.
|
static <F extends PField> |
withColumn(F field)
With column mapped to field using the field name.
|
static <F extends PField> |
withColumn(String name,
F field)
With column mapped to field.
|
static ProvidenceJdbi.FieldType |
withType(PField field,
int type)
With field mapped to SQL type.
|
public static <M extends PMessage<M,F>,F extends PField> MessageFieldArgument<M,F> toField(M message, F field)
M - The message type.F - The message field type.message - The message tp bind value from.field - The field to bind to.public static <M extends PMessage<M,F>,F extends PField> MessageFieldArgument<M,F> toField(M message, F field, int type)
M - The message type.F - The message field type.message - The message tp bind value from.field - The field to bind to.type - The SQL type.public static <F extends PField> ProvidenceJdbi.MappedField<F> columnsFromAllFields()
F - The message field type.public static <F extends PField> ProvidenceJdbi.MappedField<F> withColumn(F field)
F - The message field type.field - Field it is mapped to.public static <F extends PField> ProvidenceJdbi.MappedField<F> withColumn(String name, F field)
F - The message field type.name - Name of column.field - Field it is mapped to.@SafeVarargs public static <M extends PMessage<M,F>,F extends PField> MessageRowMapper<M,F> toMessage(@Nonnull PMessageDescriptor<M,F> descriptor, @Nonnull ProvidenceJdbi.MappedField<F>... fieldMapping)
M - The message type.F - The message field type.descriptor - The message descriptor.fieldMapping - Extra field mapping.@SafeVarargs public static <M extends PMessage<M,F>,F extends PField> MessageRowMapper<M,F> toMessage(@Nonnull String tableName, @Nonnull PMessageDescriptor<M,F> descriptor, @Nonnull ProvidenceJdbi.MappedField<F>... fieldMapping)
M - The message type.F - The message field type.tableName - Table name to restrict field lookup to.descriptor - The message descriptor.fieldMapping - Extra field mapping.public static ProvidenceJdbi.FieldType withType(PField field, int type)
field - The field to be mapped.type - The SQL type. See Types.public static <M extends PMessage<M,F>,F extends PField> MessageNamedArgumentFinder<M,F> forMessage(@Nonnull M message, @Nonnull ProvidenceJdbi.FieldType... fieldTypes)
M - The message type.F - The message field type.message - The message to map fields from.fieldTypes - Field type mappings.public static <M extends PMessage<M,F>,F extends PField> MessageNamedArgumentFinder<M,F> forMessage(@Nonnull String prefix, @Nonnull M message, @Nonnull ProvidenceJdbi.FieldType... fieldTypes)
M - The message type.F - The message field type.prefix - Name prefix for naming distinction.message - The message to map fields from.fieldTypes - Field type mappings.Copyright © 2015–2018 morimekta.net. All rights reserved.