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
Fields -
Constructor Summary
ConstructorsConstructorDescriptionN1qlQueryCreator(PartTree tree, ParameterAccessor accessor, QueryMethod queryMethod, CouchbaseConverter converter, String bucketName) -
Method Summary
Modifier and TypeMethodDescriptionstatic N1QLExpressionaddMetaIfRequired(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 QueryCriteriaand(Part part, QueryCriteria base, Iterator<Object> iterator) protected Querycomplete(QueryCriteria criteria, Sort sort) protected QueryCriteriaprotected QueryCriteriaor(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:
createin classAbstractQueryCreator<Query,QueryCriteria>
-
createQuery
- Overrides:
createQueryin classAbstractQueryCreator<Query,QueryCriteria>
-
and
- Specified by:
andin classAbstractQueryCreator<Query,QueryCriteria>
-
or
- Specified by:
orin classAbstractQueryCreator<Query,QueryCriteria>
-
complete
- Specified by:
completein 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
-