public abstract class CqlTemplateSupport extends CassandraAccessor
Modifier and Type | Class and Description |
---|---|
protected static class |
CqlTemplateSupport.RowCallbackHandlerResultSetExtractor
Adapter to enable use of a
RowCallbackHandler inside a ResultSetExtractor . |
exceptionTranslator, logger
Constructor and Description |
---|
CqlTemplateSupport() |
Modifier and Type | Method and Description |
---|---|
protected RowMapper<Map<String,Object>> |
newColumnMapRowMapper()
Create a new RowMapper for reading columns as key-value pairs.
|
protected PreparedStatementBinder |
newPreparedStatementBinder(Object[] args)
Create a new arg-based PreparedStatementSetter using the args passed in.
|
protected CqlTemplateSupport.RowCallbackHandlerResultSetExtractor |
newResultSetExtractor(RowCallbackHandler rowCallbackHandler)
Constructs a new instance of the
ResultSetExtractor initialized with and adapting the given
RowCallbackHandler . |
protected <T> RowMapperResultSetExtractor<T> |
newResultSetExtractor(RowMapper<T> rowMapper)
Constructs a new instance of the
ResultSetExtractor initialized with and adapting the given
RowMapper . |
protected <T> RowMapperResultSetExtractor<T> |
newResultSetExtractor(RowMapper<T> rowMapper,
int rowsExpected)
Constructs a new instance of the
ResultSetExtractor initialized with and adapting the given
RowMapper . |
protected <T> RowMapper<T> |
newSingleColumnRowMapper(Class<T> requiredType)
Create a new RowMapper for reading result objects from a single column.
|
protected static String |
toCql(Object cqlProvider)
Determine CQL from potential provider object.
|
afterPropertiesSet, applyStatementSettings, applyStatementSettings, getConsistencyLevel, getExceptionTranslator, getFetchSize, getRetryPolicy, getSession, getSessionFactory, setConsistencyLevel, setExceptionTranslator, setFetchSize, setRetryPolicy, setSession, setSessionFactory, translate, translateExceptionIfPossible
protected PreparedStatementBinder newPreparedStatementBinder(Object[] args)
ArgumentPreparedStatementBinder
. This method allows for the creation to be overridden by subclasses.args
- object array with argumentsPreparedStatementBinder
to useprotected CqlTemplateSupport.RowCallbackHandlerResultSetExtractor newResultSetExtractor(RowCallbackHandler rowCallbackHandler)
ResultSetExtractor
initialized with and adapting the given
RowCallbackHandler
.rowCallbackHandler
- RowCallbackHandler
to adapt as a ResultSetExtractor
.ResultSetExtractor
implementation adapting an instance of the RowCallbackHandler
.org.springframework.data.cql.core.AsyncCqlTemplate.RowCallbackHandlerResultSetExtractor
,
ResultSetExtractor
,
RowCallbackHandler
protected <T> RowMapperResultSetExtractor<T> newResultSetExtractor(RowMapper<T> rowMapper)
ResultSetExtractor
initialized with and adapting the given
RowMapper
.rowMapper
- RowMapper
to adapt as a ResultSetExtractor
.ResultSetExtractor
implementation adapting an instance of the RowMapper
.ResultSetExtractor
,
RowMapper
,
RowMapperResultSetExtractor
protected <T> RowMapperResultSetExtractor<T> newResultSetExtractor(RowMapper<T> rowMapper, int rowsExpected)
ResultSetExtractor
initialized with and adapting the given
RowMapper
.rowMapper
- RowMapper
to adapt as a ResultSetExtractor
.rowsExpected
- number of expected rows in the ResultSet
.ResultSetExtractor
implementation adapting an instance of the RowMapper
.ResultSetExtractor
,
RowMapper
,
RowMapperResultSetExtractor
protected RowMapper<Map<String,Object>> newColumnMapRowMapper()
ColumnMapRowMapper
protected <T> RowMapper<T> newSingleColumnRowMapper(Class<T> requiredType)
requiredType
- the type that each result object is expected to matchSingleColumnRowMapper
protected static String toCql(Object cqlProvider)
cqlProvider
- object that's potentially a CqlProvider
null
CqlProvider
Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.