Class N1qlQueryCreator
java.lang.Object
org.springframework.data.repository.query.parser.AbstractQueryCreator<Query,QueryCriteria>
org.springframework.data.couchbase.repository.query.N1qlQueryCreator
- Author:
- Michael Nitschinger, Michael Reiche, Mauro Monti
-
Field Summary
-
Constructor Summary
ConstructorDescriptionN1qlQueryCreator
(PartTree tree, ParameterAccessor accessor, QueryMethod queryMethod, CouchbaseConverter converter, String bucketName) -
Method Summary
Modifier and TypeMethodDescriptionstatic N1QLExpression
addMetaIfRequired
(String bucketName, PersistentPropertyPath<CouchbasePersistentProperty> persistentPropertyPath, CouchbasePersistentProperty property, PersistentEntity entity) Translate meta-fields to META(bucketName).id, cas, expiry.
If bucketName is null, META().id etc,
If not a meta-field, just create the corresponding pathprotected QueryCriteria
and
(Part part, QueryCriteria base, Iterator<Object> iterator) protected Query
complete
(QueryCriteria criteria, Sort sort) protected QueryCriteria
protected QueryCriteria
or
(QueryCriteria base, QueryCriteria criteria) Methods inherited from class org.springframework.data.repository.query.parser.AbstractQueryCreator
createQuery
-
Field Details
-
META_ID_PROPERTY
- See Also:
-
META_CAS_PROPERTY
- See Also:
-
META_EXPIRATION_PROPERTY
- See Also:
-
-
Constructor Details
-
N1qlQueryCreator
public N1qlQueryCreator(PartTree tree, ParameterAccessor accessor, QueryMethod queryMethod, CouchbaseConverter converter, String bucketName)
-
-
Method Details
-
create
- Specified by:
create
in classAbstractQueryCreator<Query,
QueryCriteria>
-
createQuery
- Overrides:
createQuery
in classAbstractQueryCreator<Query,
QueryCriteria>
-
and
- Specified by:
and
in classAbstractQueryCreator<Query,
QueryCriteria>
-
or
- Specified by:
or
in classAbstractQueryCreator<Query,
QueryCriteria>
-
complete
- Specified by:
complete
in classAbstractQueryCreator<Query,
QueryCriteria>
-
addMetaIfRequired
public static N1QLExpression addMetaIfRequired(String bucketName, PersistentPropertyPath<CouchbasePersistentProperty> persistentPropertyPath, CouchbasePersistentProperty property, PersistentEntity entity) Translate meta-fields to META(bucketName).id, cas, expiry.
If bucketName is null, META().id etc,
If not a meta-field, just create the corresponding path- Parameters:
bucketName
-persistentPropertyPath
-property
-entity
-- Returns:
- N1QLExpression
-