Search in sources :

Example 56 with ColumnCondition

use of jakarta.nosql.column.ColumnCondition in project jnosql-diana by eclipse.

the class AbstractMapperQuery method gteImpl.

protected <T> void gteImpl(T value) {
    requireNonNull(value, "value is required");
    ColumnCondition newCondition = ColumnCondition.gte(Column.of(mapping.getColumnField(name), getValue(value)));
    appendCondition(newCondition);
}
Also used : ColumnCondition(jakarta.nosql.column.ColumnCondition)

Example 57 with ColumnCondition

use of jakarta.nosql.column.ColumnCondition in project jnosql-diana by eclipse.

the class AbstractMapperQuery method likeImpl.

protected void likeImpl(String value) {
    requireNonNull(value, "value is required");
    ColumnCondition newCondition = ColumnCondition.like(Column.of(mapping.getColumnField(name), getValue(value)));
    appendCondition(newCondition);
}
Also used : ColumnCondition(jakarta.nosql.column.ColumnCondition)

Example 58 with ColumnCondition

use of jakarta.nosql.column.ColumnCondition in project jnosql-diana by eclipse.

the class AbstractMapperQuery method appendCondition.

protected void appendCondition(ColumnCondition newCondition) {
    ColumnCondition columnCondition = getColumnCondition(newCondition);
    if (nonNull(condition)) {
        if (and) {
            this.condition = condition.and(columnCondition);
        } else {
            this.condition = condition.or(columnCondition);
        }
    } else {
        this.condition = columnCondition;
    }
    this.negate = false;
    this.name = null;
}
Also used : ColumnCondition(jakarta.nosql.column.ColumnCondition)

Example 59 with ColumnCondition

use of jakarta.nosql.column.ColumnCondition in project jnosql-diana by eclipse.

the class AbstractMapperQuery method lteImpl.

protected <T> void lteImpl(T value) {
    requireNonNull(value, "value is required");
    ColumnCondition newCondition = ColumnCondition.lte(Column.of(mapping.getColumnField(name), getValue(value)));
    appendCondition(newCondition);
}
Also used : ColumnCondition(jakarta.nosql.column.ColumnCondition)

Example 60 with ColumnCondition

use of jakarta.nosql.column.ColumnCondition in project jnosql-diana by eclipse.

the class AbstractMapperQuery method eqImpl.

protected <T> void eqImpl(T value) {
    requireNonNull(value, "value is required");
    ColumnCondition newCondition = ColumnCondition.eq(Column.of(mapping.getColumnField(name), getValue(value)));
    appendCondition(newCondition);
}
Also used : ColumnCondition(jakarta.nosql.column.ColumnCondition)

Aggregations

ColumnCondition (jakarta.nosql.column.ColumnCondition)130 Test (org.junit.jupiter.api.Test)68 ColumnQuery (jakarta.nosql.column.ColumnQuery)64 Column (jakarta.nosql.column.Column)57 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)37 ValueSource (org.junit.jupiter.params.provider.ValueSource)37 List (java.util.List)34 ColumnDeleteQuery (jakarta.nosql.column.ColumnDeleteQuery)33 Person (jakarta.nosql.tck.entities.Person)17 Pagination (jakarta.nosql.mapping.Pagination)13 ColumnPreparedStatement (jakarta.nosql.column.ColumnPreparedStatement)10 TypeReference (jakarta.nosql.TypeReference)7 Params (jakarta.nosql.Params)6 ColumnEntity (jakarta.nosql.column.ColumnEntity)6 Collections.singletonList (java.util.Collections.singletonList)5 QueryException (jakarta.nosql.QueryException)4 ServiceLoaderProvider (jakarta.nosql.ServiceLoaderProvider)4 ColumnFamilyManager (jakarta.nosql.column.ColumnFamilyManager)4 ColumnObserverParser (jakarta.nosql.column.ColumnObserverParser)4 ColumnQueryParams (jakarta.nosql.column.ColumnQueryParams)4