public class ParameterBinder extends Object
ParameterBinder is used to bind method parameters to a Query. This is usually done whenever an
AbstractJpaQuery is executed.| Constructor and Description |
|---|
ParameterBinder(JpaParameters parameters,
Object[] values)
Creates a new
ParameterBinder. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
bind(javax.persistence.Query query,
org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter,
Object value,
int position)
Perform the actual query parameter binding.
|
<T extends javax.persistence.Query> |
bind(T query)
Binds the parameters to the given
Query. |
javax.persistence.Query |
bindAndPrepare(javax.persistence.Query query)
Binds the parameters to the given query and applies special parameter types (e.g. pagination).
|
protected boolean |
canBindParameter(org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter)
Returns true if the given parameter can be bound.
|
Pageable |
getPageable()
Returns the
Pageable of the parameters, if available. |
Sort |
getSort()
Returns the sort instance to be used for query creation.
|
protected Object[] |
getValues() |
public ParameterBinder(JpaParameters parameters, Object[] values)
ParameterBinder.parameters - must not be null.values - must not be null.public Pageable getPageable()
Pageable of the parameters, if available. Returns null otherwise.public Sort getSort()
Sort parameter if available or the
Sort contained in a Pageable if available. Returns null if no Sort can be found.public <T extends javax.persistence.Query> T bind(T query)
Query.query - protected boolean canBindParameter(org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter)
parameter - protected void bind(javax.persistence.Query query,
org.springframework.data.jpa.repository.query.JpaParameters.JpaParameter parameter,
Object value,
int position)
query - parameter - value - position - public javax.persistence.Query bindAndPrepare(javax.persistence.Query query)
query - protected Object[] getValues()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.