public class DynamicStatementBuilder extends Object implements Serializable
Modifier and Type | Method and Description |
---|---|
static CqlMapper.DefaultCqlMapper |
all()
Includes all tuple fields.
|
static CQLStatementTupleMapper |
async(CQLStatementBuilder... builders)
Builds multiple statements which will be executed asynchronously.
|
static BoundCQLStatementMapperBuilder |
boundQuery(ContextQuery field)
Builds a new bound statement identified by the given field.
|
static BoundCQLStatementMapperBuilder |
boundQuery(String cql)
Builds a new bound statement based on the specified query.
|
static BatchCQLStatementTupleMapper |
counterBatch(CQLStatementBuilder... builders)
Creates a new
BatchStatement.Type.COUNTER batch statement for the specified CQL statement builders. |
static FieldSelector |
field(String name)
Maps a CQL value to the specified field from an input tuple.
|
static FieldSelector[] |
fields(String... fields)
Maps CQL values to all specified fields from an input tuple.
|
static BatchCQLStatementTupleMapper |
loggedBatch(CQLStatementBuilder... builders)
Creates a new
BatchStatement.Type.LOGGED batch statement for the specified CQL statement builders. |
static ContextQuery |
named(String name)
Retrieves from the storm configuration the specified named query.
|
static ContextQuery |
namedByField(String fieldName)
Retrieves from the storm configuration the named query specified by a tuple field.
|
static SimpleCQLStatementMapperBuilder |
simpleQuery(com.datastax.driver.core.querybuilder.BuiltStatement builtStatement) |
static SimpleCQLStatementMapperBuilder |
simpleQuery(String queryString) |
static BatchCQLStatementTupleMapper |
unLoggedBatch(CQLStatementBuilder... builders)
Creates a new
BatchStatement.Type.UNLOGGED batch statement for the specified CQL statement builders. |
public static final SimpleCQLStatementMapperBuilder simpleQuery(String queryString)
public static final SimpleCQLStatementMapperBuilder simpleQuery(com.datastax.driver.core.querybuilder.BuiltStatement builtStatement)
public static final BoundCQLStatementMapperBuilder boundQuery(String cql)
Builds a new bound statement based on the specified query.
cql
- the query.BoundCQLStatementMapperBuilder
instance.public static final BoundCQLStatementMapperBuilder boundQuery(ContextQuery field)
Builds a new bound statement identified by the given field.
field
- a context used to resolve the cassandra query.BoundCQLStatementMapperBuilder
instance.public static final CQLStatementTupleMapper async(CQLStatementBuilder... builders)
Builds multiple statements which will be executed asynchronously.
builders
- a list of CQLStatementBuilder
.CQLStatementTupleMapper
.public static final BatchCQLStatementTupleMapper loggedBatch(CQLStatementBuilder... builders)
Creates a new BatchStatement.Type.LOGGED
batch statement for the specified CQL statement builders.
public static final BatchCQLStatementTupleMapper counterBatch(CQLStatementBuilder... builders)
Creates a new BatchStatement.Type.COUNTER
batch statement for the specified CQL statement builders.
public static final BatchCQLStatementTupleMapper unLoggedBatch(CQLStatementBuilder... builders)
Creates a new BatchStatement.Type.UNLOGGED
batch statement for the specified CQL statement builders.
public static final ContextQuery named(String name)
Retrieves from the storm configuration the specified named query.
name
- query’s name.public static final ContextQuery namedByField(String fieldName)
Retrieves from the storm configuration the named query specified by a tuple field.
fieldName
- field’s name that contains the named of the query.public static final FieldSelector field(String name)
Maps a CQL value to the specified field from an input tuple.
name
- the name of a tuple field.FieldSelector
.public static final FieldSelector[] fields(String... fields)
Maps CQL values to all specified fields from an input tuple.
fields
- a list of tuple fieldsFieldSelector
.public static final CqlMapper.DefaultCqlMapper all()
Includes all tuple fields.
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.