Search in sources :

Example 1 with DocumentCondition

use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-diana by eclipse.

the class BaseQueryBuilder method gtImpl.

protected void gtImpl(Number value) {
    requireNonNull(value, "value is required");
    DocumentCondition newCondition = DocumentCondition.gt(Document.of(name, value));
    appendCondition(newCondition);
}
Also used : DocumentCondition(org.jnosql.diana.api.document.DocumentCondition)

Example 2 with DocumentCondition

use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-diana by eclipse.

the class BaseQueryBuilder method likeImpl.

protected void likeImpl(String value) {
    requireNonNull(value, "value is required");
    DocumentCondition newCondition = DocumentCondition.like(Document.of(name, value));
    appendCondition(newCondition);
}
Also used : DocumentCondition(org.jnosql.diana.api.document.DocumentCondition)

Example 3 with DocumentCondition

use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-diana by eclipse.

the class BaseQueryBuilder method ltImpl.

protected void ltImpl(Number value) {
    requireNonNull(value, "value is required");
    DocumentCondition newCondition = DocumentCondition.lt(Document.of(name, value));
    appendCondition(newCondition);
}
Also used : DocumentCondition(org.jnosql.diana.api.document.DocumentCondition)

Example 4 with DocumentCondition

use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-diana by eclipse.

the class BaseQueryBuilder method lteImpl.

protected void lteImpl(Number value) {
    requireNonNull(value, "value is required");
    DocumentCondition newCondition = DocumentCondition.lte(Document.of(name, value));
    appendCondition(newCondition);
}
Also used : DocumentCondition(org.jnosql.diana.api.document.DocumentCondition)

Example 5 with DocumentCondition

use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-diana by eclipse.

the class BaseQueryBuilder method eqImpl.

protected <T> void eqImpl(T value) {
    requireNonNull(value, "value is required");
    DocumentCondition newCondition = DocumentCondition.eq(Document.of(name, value));
    appendCondition(newCondition);
}
Also used : DocumentCondition(org.jnosql.diana.api.document.DocumentCondition)

Aggregations

DocumentCondition (org.jnosql.diana.api.document.DocumentCondition)69 Test (org.junit.jupiter.api.Test)46 Document (org.jnosql.diana.api.document.Document)31 DocumentQuery (org.jnosql.diana.api.document.DocumentQuery)29 DocumentDeleteQuery (org.jnosql.diana.api.document.DocumentDeleteQuery)23 List (java.util.List)22 Person (org.jnosql.artemis.model.Person)13 Collections.singletonList (java.util.Collections.singletonList)7 Pagination (org.jnosql.artemis.Pagination)7 Sort (org.jnosql.diana.api.Sort)7 Proxy (java.lang.reflect.Proxy)6 Duration (java.time.Duration)6 Optional (java.util.Optional)6 Consumer (java.util.function.Consumer)6 Inject (javax.inject.Inject)6 CDIExtension (org.jnosql.artemis.CDIExtension)6 Converters (org.jnosql.artemis.Converters)6 DynamicQueryException (org.jnosql.artemis.DynamicQueryException)6 RepositoryAsync (org.jnosql.artemis.RepositoryAsync)6 DocumentTemplateAsync (org.jnosql.artemis.document.DocumentTemplateAsync)6