
org.jnosql.artemis.column.query.DefaultColumnMapperDeleteBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of artemis-column Show documentation
Show all versions of artemis-column Show documentation
Eclipse JNoSQL Mapping, Artemis API, to column NoSQL databases
/*
* Copyright (c) 2017 Otávio Santana and others
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Apache License v2.0 which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
*
* You may elect to redistribute this code under either of these licenses.
*
* Contributors:
*
* Otavio Santana
*/
package org.jnosql.artemis.column.query;
import org.jnosql.artemis.Converters;
import org.jnosql.artemis.reflection.ClassRepresentation;
import org.jnosql.diana.api.column.ColumnDeleteQuery;
import org.jnosql.diana.api.column.query.ColumnDeleteFrom;
import org.jnosql.diana.api.column.query.ColumnDeleteNameCondition;
import org.jnosql.diana.api.column.query.ColumnDeleteNotCondition;
import org.jnosql.diana.api.column.query.ColumnDeleteWhere;
import org.jnosql.diana.api.column.query.ColumnDeleteWhereName;
import static java.util.Objects.requireNonNull;
class DefaultColumnMapperDeleteBuilder extends AbstractMapperQuery implements ColumnDeleteFrom,
ColumnDeleteWhere, ColumnDeleteWhereName, ColumnDeleteNotCondition {
DefaultColumnMapperDeleteBuilder(ClassRepresentation representation, Converters converters) {
super(representation, converters);
}
@Override
public ColumnDeleteWhereName where(String name) throws NullPointerException {
requireNonNull(name, "name is required");
this.name = name;
return this;
}
@Override
public ColumnDeleteNameCondition and(String name) throws NullPointerException {
requireNonNull(name, "name is required");
this.name = name;
this.and = true;
return this;
}
@Override
public ColumnDeleteNameCondition or(String name) throws NullPointerException {
requireNonNull(name, "name is required");
this.name = name;
this.and = false;
return this;
}
@Override
public ColumnDeleteNotCondition not() {
this.negate = true;
return this;
}
@Override
public ColumnDeleteWhere eq(T value) throws NullPointerException {
eqImpl(value);
return this;
}
@Override
public ColumnDeleteWhere like(String value) throws NullPointerException {
likeImpl(value);
return this;
}
@Override
public ColumnDeleteWhere gt(Number value) throws NullPointerException {
gtImpl(value);
return this;
}
@Override
public ColumnDeleteWhere gte(Number value) throws NullPointerException {
gteImpl(value);
return this;
}
@Override
public ColumnDeleteWhere lt(Number value) throws NullPointerException {
ltImpl(value);
return this;
}
@Override
public ColumnDeleteWhere lte(Number value) throws NullPointerException {
lteImpl(value);
return this;
}
@Override
public ColumnDeleteWhere between(Number valueA, Number valueB) throws NullPointerException {
betweenImpl(valueA, valueB);
return this;
}
@Override
public ColumnDeleteWhere in(Iterable values) throws NullPointerException {
inImpl(values);
return this;
}
@Override
public ColumnDeleteQuery build() {
return new ArtemisColumnDeleteQuery(columnFamily, condition);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy