public interface MapperContext
Modifier and Type | Method and Description |
---|---|
Map<Object,Object> |
getCustomState()
Retrieves any custom state that was set while building the mapper with
MapperBuilder.withCustomState(Object, Object) . |
CqlIdentifier |
getKeyspaceId()
If this context belongs to a DAO that was built with a keyspace-parameterized mapper method,
the value of that parameter.
|
NameConverter |
getNameConverter(Class<? extends NameConverter> converterClass)
Returns an instance of the given converter class.
|
CqlSession |
getSession() |
CqlIdentifier |
getTableId()
If this context belongs to a DAO that was built with a table-parameterized mapper method, the
value of that parameter.
|
@NonNull CqlSession getSession()
@Nullable CqlIdentifier getKeyspaceId()
@Nullable CqlIdentifier getTableId()
@NonNull NameConverter getNameConverter(Class<? extends NameConverter> converterClass)
The results of this method are cached at the mapper level. If no instance of this class exists yet for this mapper, a new instance is built by looking for a public no-arg constructor.
@NonNull Map<Object,Object> getCustomState()
MapperBuilder.withCustomState(Object, Object)
.
The returned map is immutable. If no state was set on the builder, it will be empty.
Copyright © 2017–2019. All rights reserved.