use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-artemis by eclipse.
the class AbstractMapperQuery method betweenImpl.
protected void betweenImpl(Number valueA, Number valueB) {
requireNonNull(valueA, "valueA is required");
requireNonNull(valueB, "valueB is required");
DocumentCondition newCondition = DocumentCondition.between(Document.of(representation.getColumnField(name), asList(getValue(valueA), getValue(valueB))));
appendCondition(newCondition);
}
use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-artemis by eclipse.
the class AbstractMapperQuery method eqImpl.
protected <T> void eqImpl(T value) {
requireNonNull(value, "value is required");
DocumentCondition newCondition = DocumentCondition.eq(Document.of(representation.getColumnField(name), getValue(value)));
appendCondition(newCondition);
}
use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-artemis by eclipse.
the class AbstractMapperQuery method ltImpl.
protected void ltImpl(Number value) {
requireNonNull(value, "value is required");
DocumentCondition newCondition = DocumentCondition.lt(Document.of(representation.getColumnField(name), getValue(value)));
appendCondition(newCondition);
}
use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-artemis by eclipse.
the class AbstractMapperQuery method inImpl.
protected <T> void inImpl(Iterable<T> values) {
requireNonNull(values, "values is required");
List<Object> convertedValues = StreamSupport.stream(values.spliterator(), false).map(this::getValue).collect(toList());
DocumentCondition newCondition = DocumentCondition.in(Document.of(representation.getColumnField(name), convertedValues));
appendCondition(newCondition);
}
use of org.jnosql.diana.api.document.DocumentCondition in project jnosql-artemis by eclipse.
the class AbstractMapperQuery method lteImpl.
protected void lteImpl(Number value) {
requireNonNull(value, "value is required");
DocumentCondition newCondition = DocumentCondition.lte(Document.of(representation.getColumnField(name), getValue(value)));
appendCondition(newCondition);
}
Aggregations