| Constructor and Description |
|---|
DefaultMapping(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableSetMultimap<Field,CQLWord> fieldsToVariables,
ConvertingCodecFactory codecFactory,
com.datastax.oss.driver.shaded.guava.common.collect.ImmutableSet<CQLWord> writeTimeVariables) |
| Modifier and Type | Method and Description |
|---|---|
<T> TypeCodec<T> |
codec(CQLWord variable,
DataType cqlType,
GenericType<? extends T> javaType)
Returns the codec to use for the given bound statement or row variable.
|
Set<Field> |
fields()
Returns all the fields in this mapping.
|
Set<CQLWord> |
fieldToVariables(Field field)
Maps the given field to one or more variables in a write bound statement.
|
Set<CQLWord> |
variables()
Returns all the variables in this mapping.
|
Set<Field> |
variableToFields(CQLWord variable)
Maps the given row variable to one or more fields in a record.
|
public DefaultMapping(com.datastax.oss.driver.shaded.guava.common.collect.ImmutableSetMultimap<Field,CQLWord> fieldsToVariables, ConvertingCodecFactory codecFactory, com.datastax.oss.driver.shaded.guava.common.collect.ImmutableSet<CQLWord> writeTimeVariables)
@NonNull public Set<CQLWord> fieldToVariables(@NonNull Field field)
MappingfieldToVariables in interface Mappingfield - the field to find the variable for.@NonNull public Set<Field> variableToFields(@NonNull CQLWord variable)
MappingvariableToFields in interface Mappingvariable - the row variable; never null.@NonNull public Set<Field> fields()
Mapping@NonNull public Set<CQLWord> variables()
Mapping@NonNull public <T> TypeCodec<T> codec(@NonNull CQLWord variable, @NonNull DataType cqlType, @NonNull GenericType<? extends T> javaType)
MappingNote that the given variable name must be supplied unquoted, even if it requires quoting to comply with the syntax of CQL identifiers.
Copyright © 2017–2021 DataStax. All rights reserved.