Class CassandraParametersParameterAccessor
java.lang.Object
org.springframework.data.repository.query.ParametersParameterAccessor
org.springframework.data.cassandra.repository.query.CassandraParametersParameterAccessor
- All Implemented Interfaces:
Iterable<Object>, CassandraParameterAccessor, ParameterAccessor
public class CassandraParametersParameterAccessor
extends ParametersParameterAccessor
implements CassandraParameterAccessor
Cassandra-specific
ParameterAccessor exposing Cassandra types that are supported by the
driver and parameter type.- Author:
- Mark Paluch
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCassandraParametersParameterAccessor(CassandraParameters parameters, @Nullable Object... values) Create a newCassandraParametersParameterAccessor.CassandraParametersParameterAccessor(CassandraQueryMethod method, @Nullable Object... values) Create a newCassandraParametersParameterAccessor. -
Method Summary
Modifier and TypeMethodDescription@Nullable CassandraTypefindCassandraType(int index) Returns theCassandraTypefor the declared method parameter.@Nullable com.datastax.oss.driver.api.core.type.DataTypegetDataType(int index) Returns the CassandraDataTypefor the declared parameter if the type is asimple type.getLimit()Class<?> getParameterType(int index) The actual parameter type (after unwrapping).@Nullable QueryOptionsReturns theQueryOptionsassociated with the associated Repository query method.@Nullable ScoringFunction@Nullable ObjectgetValue(int parameterIndex) Get the value of the parameter at the given index.@Nullable Object[]Returns the raw parameter values of the underlying query method.Methods inherited from class ParametersParameterAccessor
findDynamicProjection, getBindableValue, getPageable, getScore, getScoreRange, getSort, getVector, hasBindableNullValue, iteratorMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface ParameterAccessor
findDynamicProjection, getBindableValue, getPageable, getScore, getScoreRange, getSort, getVector, hasBindableNullValue, iterator
-
Constructor Details
-
CassandraParametersParameterAccessor
public CassandraParametersParameterAccessor(CassandraQueryMethod method, @Nullable Object... values) Create a newCassandraParametersParameterAccessor.- Parameters:
method- must not be null.values- must not be null.
-
CassandraParametersParameterAccessor
public CassandraParametersParameterAccessor(CassandraParameters parameters, @Nullable Object... values) Create a newCassandraParametersParameterAccessor.- Parameters:
parameters- must not be null.values- must not be null.- Since:
- 5.0
-
-
Method Details
-
getDataType
public @Nullable com.datastax.oss.driver.api.core.type.DataType getDataType(int index) Description copied from interface:CassandraParameterAccessorReturns the CassandraDataTypefor the declared parameter if the type is asimple type. Parameter types may be specified usingCassandraType.- Specified by:
getDataTypein interfaceCassandraParameterAccessor- Parameters:
index- the parameter index- Returns:
- the Cassandra
DataTypeor null if the parameter type cannot be determined fromCassandraSimpleTypeHolder - See Also:
-
findCassandraType
Description copied from interface:CassandraParameterAccessorReturns theCassandraTypefor the declared method parameter.- Specified by:
findCassandraTypein interfaceCassandraParameterAccessor- Parameters:
index- the parameter index- Returns:
- the Cassandra
CassandraTypeor null. - See Also:
-
getParameterType
Description copied from interface:CassandraParameterAccessorThe actual parameter type (after unwrapping).- Specified by:
getParameterTypein interfaceCassandraParameterAccessor- Parameters:
index- the parameter index- Returns:
- the parameter type, never null.
-
getParameters
- Overrides:
getParametersin classParametersParameterAccessor
-
getValues
Description copied from interface:CassandraParameterAccessorReturns the raw parameter values of the underlying query method.- Specified by:
getValuesin interfaceCassandraParameterAccessor- Overrides:
getValuesin classParametersParameterAccessor- Returns:
- the raw parameter values passed to the underlying query method.
-
getValue
Description copied from interface:CassandraParameterAccessorGet the value of the parameter at the given index. In contrast toParameterAccessor.getBindableValue(int), this method has access to all parameters.- Specified by:
getValuein interfaceCassandraParameterAccessor- Overrides:
getValuein classParametersParameterAccessor- Parameters:
parameterIndex-- Returns:
-
getScrollPosition
- Specified by:
getScrollPositionin interfaceCassandraParameterAccessor- Specified by:
getScrollPositionin interfaceParameterAccessor- Overrides:
getScrollPositionin classParametersParameterAccessor
-
getScoringFunction
Description copied from interface:CassandraParameterAccessor- Specified by:
getScoringFunctionin interfaceCassandraParameterAccessor- Returns:
- the scoring function or null if none is provided.
-
getLimit
- Specified by:
getLimitin interfaceParameterAccessor- Overrides:
getLimitin classParametersParameterAccessor
-
getQueryOptions
Description copied from interface:CassandraParameterAccessorReturns theQueryOptionsassociated with the associated Repository query method.- Specified by:
getQueryOptionsin interfaceCassandraParameterAccessor- Returns:
- the
QueryOptionsor null if none.
-