diff --git a/jnosql-criteria-extension/pom.xml b/jnosql-criteria-extension/pom.xml
deleted file mode 100644
index 83f69456..00000000
--- a/jnosql-criteria-extension/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- 4.0.0
-
-
- org.eclipse.jnosql.mapping
- jnosql-mapping-extensions
- 1.1.1-SNAPSHOT
-
-
- jnosql-criteria-extension
- Eclipse JNoSQL criteria extension
-
-
-
- ${project.groupId}
- jnosql-metamodel-extension
- ${project.version}
-
-
- ${project.groupId}
- jnosql-metamodel-processor-extension
- ${project.version}
- true
-
-
-
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractCompositionPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractCompositionPredicate.java
deleted file mode 100644
index f6ae631a..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractCompositionPredicate.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.CompositionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import java.util.Collection;
-
-/**
- * Abstract class to extend for composing {@link Predicate}s
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public abstract class AbstractCompositionPredicate extends AbstractPredicate implements CompositionPredicate {
-
- private final Collection> predicates;
-
- public AbstractCompositionPredicate(Collection> predicates) {
- this.predicates = predicates;
- }
-
- @Override
- public Collection> getPredicates() {
- return this.predicates;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractPredicate.java
deleted file mode 100644
index baad6c66..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractPredicate.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.ConjunctionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.DisjunctionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.NegationPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import java.util.Arrays;
-
-/**
- * Abstract class for {@link Predicate} implementations.
- * Supports basic operations such as negation, conjunction and disjunction.
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public abstract class AbstractPredicate implements Predicate{
-
- @Override
- public NegationPredicate not() {
- return new DefaultNegationPredicate(this);
- }
-
- @Override
- public ConjunctionPredicate and(Predicate restriction) {
- return new DefaultConjunctionPredicate<>(
- Arrays.asList(
- this,
- restriction
- )
- );
- }
-
- @Override
- public DisjunctionPredicate or(Predicate restriction) {
- return new DefaultDisjunctionPredicate<>(
- Arrays.asList(
- this,
- restriction
- )
- );
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractRestrictedQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractRestrictedQuery.java
deleted file mode 100644
index 8c35fe7d..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/AbstractRestrictedQuery.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import org.eclipse.jnosql.mapping.criteria.api.RestrictedQuery;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaQueryResult;
-import java.util.Arrays;
-import java.util.Collection;
-
-/**
- * Abstract class to extend for {@link RestrictedQuery} implementations
- *
- * @param the type of the root entity
- * @param the type of the query result
- * @param the type of the restricted query
- */
-public abstract class AbstractRestrictedQuery, Q extends AbstractRestrictedQuery> extends DefaultCriteriaQuery {
-
- private Collection> restrictions;
-
- public AbstractRestrictedQuery(Class type) {
- super(type);
- }
-
- public Q where(Predicate... restrictions) {
- this.restrictions = Arrays.asList(restrictions);
- return (Q) this;
- }
-
- public Collection> getRestrictions() {
- return restrictions;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/CriteriaQueryUtils.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/CriteriaQueryUtils.java
deleted file mode 100644
index bfe82c7a..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/CriteriaQueryUtils.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import jakarta.data.Sort;
-import org.eclipse.jnosql.communication.document.DocumentCondition;
-import org.eclipse.jnosql.mapping.criteria.api.BinaryPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.CompositionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.DisjunctionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQuery;
-import org.eclipse.jnosql.mapping.criteria.api.NegationPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Order;
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import org.eclipse.jnosql.mapping.criteria.api.RangePredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Root;
-import org.eclipse.jnosql.communication.document.DocumentQuery;
-import org.eclipse.jnosql.mapping.criteria.api.SelectQuery;
-import java.util.ArrayDeque;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Deque;
-import java.util.Objects;
-import static java.util.Objects.requireNonNull;
-import java.util.Optional;
-import java.util.function.BiFunction;
-import java.util.function.Function;
-
-/**
- * Utility to convert {@link Predicate}s in {@link DocumentCondition}s
- */
-public class CriteriaQueryUtils {
-
- private CriteriaQueryUtils() {
- }
-
- public static String join(String... values) {
- return String.join(".", values);
- }
-
- public static String unfold(Path path) {
- Path tmp = path;
- Deque attributes = new ArrayDeque();
- while (Objects.nonNull(tmp) && !(tmp instanceof Root)) {
- attributes.add(
- tmp.getAttribute().getName()
- );
- tmp = tmp.getParent();
- }
- return join(
- attributes.stream().filter(
- value -> isNotBlank(value.trim()
- )
- ).toArray(
- String[]::new
- )
- );
- }
-
- public static String unfold(Expression expression) {
- return join(
- Arrays.asList(
- unfold(
- expression.getPath()
- ),
- expression.getAttribute().getName()
- ).stream().filter(
- value -> !Objects.equals(
- 0,
- value.trim().length()
- )
- ).toArray(
- String[]::new
- )
- );
- }
-
- public static DocumentCondition computeCondition(Predicate predicate) {
- DocumentCondition result = null;
- if (predicate instanceof CompositionPredicate) {
- Collection restrictions = CompositionPredicate.class.cast(predicate).getPredicates();
- Function function = predicate instanceof DisjunctionPredicate
- ? DocumentCondition::or
- : DocumentCondition::and;
- result = function.apply(
- restrictions.stream().map(
- CriteriaQueryUtils::computeCondition
- ).toArray(
- DocumentCondition[]::new
- )
- );
- } else if (predicate instanceof NegationPredicate) {
- result = computeCondition(
- NegationPredicate.class.cast(predicate).getPredicate()
- ).negate();
- } else if (predicate instanceof BinaryPredicate) {
- BinaryPredicate cast = BinaryPredicate.class.cast(predicate);
- String lhs = unfold(
- cast.getLeft()
- );
- Object rhs = cast.getRight();
- if (rhs instanceof Expression) {
- throw new UnsupportedOperationException("Not supported yet.");
- } else {
- BiFunction bifunction;
- switch (cast.getOperator()) {
- case EQUAL:
- bifunction = DocumentCondition::eq;
- break;
- case GREATER_THAN:
- bifunction = DocumentCondition::gt;
- break;
- case GREATER_THAN_OR_EQUAL:
- bifunction = DocumentCondition::gte;
- break;
- case LESS_THAN:
- bifunction = DocumentCondition::lt;
- break;
- case LESS_THAN_OR_EQUAL:
- bifunction = DocumentCondition::lte;
- break;
- case IN:
- bifunction = DocumentCondition::in;
- break;
- case LIKE:
- bifunction = DocumentCondition::like;
- break;
- default:
- throw new UnsupportedOperationException("Not supported yet.");
- }
- result = bifunction.apply(lhs, rhs);
- }
- } else if (predicate instanceof RangePredicate) {
- RangePredicate cast = RangePredicate.class.cast(predicate);
- String lhs = unfold(
- cast.getLeft()
- );
- Object from = cast.getFrom();
- Object to = cast.getTo();
- if (from instanceof Expression || to instanceof Expression) {
- throw new UnsupportedOperationException("Not supported yet.");
- } else {
- BiFunction bifunction;
- switch (cast.getOperator()) {
- case EXCLUSIVE_BETWEEN:
- case INCLUSIVE_BETWEEN:
- bifunction = DocumentCondition::between;
- break;
- default:
- throw new UnsupportedOperationException("Not supported yet.");
- }
- result = bifunction.apply(lhs, Arrays.asList(from, to));
- }
- }
- if (Objects.isNull(result)) {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- return result;
- }
-
- public static DocumentQuery convert(SelectQuery selectQuery) {
- requireNonNull(selectQuery, "query is required");
-
- DocumentQuery.DocumentQueryBuilder builder;
-
- if (selectQuery instanceof ExpressionQuery) {
- ExpressionQuery expressionQuery = ExpressionQuery.class.cast(selectQuery);
- builder = DocumentQuery.builder(
- expressionQuery.getExpressions().stream().map(
- CriteriaQueryUtils::unfold
- ).toArray(
- String[]::new
- )
- );
- } else {
- builder = DocumentQuery.builder();
- }
-
- DocumentQuery.DocumentQueryBuilder where = builder.from(
- selectQuery.getType().getSimpleName()
- ).where(
- DocumentCondition.and(
- Optional.ofNullable(
- selectQuery.getRestrictions()
- ).orElse(
- Collections.>emptyList()
- ).stream().map(
- CriteriaQueryUtils::computeCondition
- ).toArray(
- DocumentCondition[]::new
- )
- )
- ).sort(
- Optional.ofNullable(
- selectQuery.getOrderBy()
- ).orElse(
- Collections.>emptyList()
- ).stream().map(
- orderBy -> {
- String unfold = unfold(orderBy.getExpression());
- return orderBy.isAscending() ? Sort.asc(unfold) : Sort.desc(unfold);
- }
- ).toArray(
- Sort[]::new
- )
- );
-
- DocumentQuery.DocumentQueryBuilder limit = Optional.ofNullable(
- selectQuery.getMaxResults()
- ).map(
- where::limit
- ).orElse(where);
-
- DocumentQuery.DocumentQueryBuilder skip = Optional.ofNullable(
- selectQuery.getFirstResult()
- ).map(
- limit::skip
- ).orElse(limit);
-
- return skip.build();
- }
-
-
- private static boolean isBlank(final CharSequence cs) {
- if (cs == null || cs.isEmpty()) {
- return true;
- }
-
- for (int i = 0; i < cs.length(); i++) {
- if (!Character.isWhitespace(cs.charAt(i))) {
- return false;
- }
- }
- return true;
- }
-
- private static boolean isNotBlank(final CharSequence cs) {
- return !isBlank(cs);
- }
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQuery.java
deleted file mode 100644
index 6b392cc7..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQuery.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.communication.Value;
-import org.eclipse.jnosql.mapping.criteria.api.AggregatedQuery;
-import org.eclipse.jnosql.mapping.criteria.api.AggregatedQueryResult;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Stream;
-import org.eclipse.jnosql.mapping.AbstractGenericType;
-
-/**
- * Default implementation for {@link AggregatedQuery}
- *
- * @param the type of the root entity
- */
-public class DefaultAggregatedQuery extends AbstractGenericType implements AggregatedQuery {
-
- private final Collection> groupings;
-
- public DefaultAggregatedQuery(Class type, Expression... groupings) {
- super(type);
- this.groupings = Arrays.asList(groupings);
- }
-
- public Collection> getGroupings() {
- return groupings;
- }
-
- @Override
- public AggregatedQueryResult getResult() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public AggregatedQuery feed(Stream> results) {
- return this;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQueryResult.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQueryResult.java
deleted file mode 100644
index 044f4e23..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultAggregatedQueryResult.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.AggregatedQueryResult;
-
-/**
- * Default implementation for {@link AggregatedQueryResult}
- * A container for aggregated results
- *
- * @param the type of the root entity
- */
-public class DefaultAggregatedQueryResult extends DefaultFunctionQueryResult implements AggregatedQueryResult {
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultBinaryPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultBinaryPredicate.java
deleted file mode 100644
index 0d283f61..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultBinaryPredicate.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.BinaryPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-
-/**
- * Default implementation for {@link BinaryPredicate}
- * This holds the operator, the expression and the right hand side
- *
- * @param The root type
- * @param The left hand side type
- * @param The right hand side type
- */
-public class DefaultBinaryPredicate extends AbstractPredicate implements BinaryPredicate {
-
- private final Operator operator;
- private final Expression left;
- private final RHS right;
-
- public DefaultBinaryPredicate(Operator operator, Expression left, RHS right) {
- this.operator = operator;
- this.left = left;
- this.right = right;
- }
-
- @Override
- public Operator getOperator() {
- return this.operator;
- }
-
- @Override
- public Expression getLeft() {
- return left;
- }
-
- @Override
- public RHS getRight() {
- return right;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultComparableExpression.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultComparableExpression.java
deleted file mode 100644
index 4d238bfb..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultComparableExpression.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.BinaryPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.ComparableExpression;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.Order;
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.criteria.api.RangePredicate;
-import org.eclipse.jnosql.mapping.metamodel.api.ComparableAttribute;
-
-/**
- * Default implementation for {@link ComparableExpression}
- *
- * @param the root type
- * @param the entity type
- * @param the comparable type of the expression
- */
-public class DefaultComparableExpression extends DefaultExpression implements ComparableExpression {
-
- public DefaultComparableExpression(Path path, ComparableAttribute attribute) {
- super(path, attribute);
- }
-
- @Override
- public BinaryPredicate> greaterThan(Expression expression) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.GREATER_THAN, this, expression);
- }
-
- @Override
- public BinaryPredicate greaterThan(T y) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.GREATER_THAN, this, y);
- }
-
- @Override
- public BinaryPredicate> greaterThanOrEqualTo(Expression expression) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.GREATER_THAN_OR_EQUAL, this, expression);
- }
-
- @Override
- public BinaryPredicate greaterThanOrEqualTo(T y) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.GREATER_THAN_OR_EQUAL, this, y);
- }
-
- @Override
- public BinaryPredicate> lessThan(Expression expression) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.LESS_THAN, this, expression);
- }
-
- @Override
- public BinaryPredicate lessThan(T y) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.LESS_THAN, this, y);
- }
-
- @Override
- public BinaryPredicate> lessThanOrEqualTo(Expression expression) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.LESS_THAN_OR_EQUAL, this, expression);
- }
-
- @Override
- public BinaryPredicate lessThanOrEqualTo(T y) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.LESS_THAN_OR_EQUAL, this, y);
- }
-
- @Override
- public RangePredicate> exclusiveBetween(Expression from, Expression to) {
- return new DefaultRangePredicate(RangePredicate.Operator.EXCLUSIVE_BETWEEN, this, from, to);
- }
-
- @Override
- public RangePredicate exclusiveBetween(T from, T to) {
- return new DefaultRangePredicate(RangePredicate.Operator.EXCLUSIVE_BETWEEN, this, from, to);
- }
-
- @Override
- public RangePredicate> inclusiveBetween(Expression from, Expression to) {
- return new DefaultRangePredicate(RangePredicate.Operator.INCLUSIVE_BETWEEN, this, from, to);
- }
-
- @Override
- public RangePredicate inclusiveBetween(T from, T to) {
- return new DefaultRangePredicate(RangePredicate.Operator.INCLUSIVE_BETWEEN, this, from, to);
- }
-
- @Override
- public Order asc() {
- throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
- }
-
- @Override
- public Order desc() {
- throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultConjunctionPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultConjunctionPredicate.java
deleted file mode 100644
index 6002ba96..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultConjunctionPredicate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.ConjunctionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import java.util.Collection;
-
-/**
- * Default implementation for {@link ConjunctionPredicate}
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public class DefaultConjunctionPredicate extends AbstractCompositionPredicate implements ConjunctionPredicate {
-
- public DefaultConjunctionPredicate(Collection> predicates) {
- super(predicates);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplate.java
deleted file mode 100644
index 369698f6..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplate.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.communication.document.DocumentEntity;
-import org.eclipse.jnosql.communication.document.DocumentManager;
-import org.eclipse.jnosql.communication.document.DocumentQuery;
-import org.eclipse.jnosql.mapping.core.Converters;
-import org.eclipse.jnosql.mapping.document.DocumentEntityConverter;
-import org.eclipse.jnosql.mapping.document.DocumentEventPersistManager;
-import static java.util.Objects.requireNonNull;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaQueryResult;
-import org.eclipse.jnosql.mapping.criteria.api.EntityQuery;
-import org.eclipse.jnosql.mapping.criteria.api.ExecutableQuery;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQuery;
-import org.eclipse.jnosql.mapping.criteria.api.SelectQuery;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaDocumentTemplate;
-import org.eclipse.jnosql.mapping.document.AbstractDocumentTemplate;
-import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
-
-/**
- * This class provides a delegating implementation of the
- * {@link CriteriaDocumentTemplate} interface, to augment the wrapped
- * DocumentTemplate with criteria API capabilities.
- *
- */
-public class DefaultCriteriaDocumentTemplate extends AbstractDocumentTemplate implements CriteriaDocumentTemplate {
-
- private DocumentManager manager;
-
- private DocumentEntityConverter converter;
-
- private EntitiesMetadata entities;
-
- private Converters converters;
-
- private DocumentEventPersistManager persistManager;
-
- public DefaultCriteriaDocumentTemplate(
- DocumentManager manager,
- DocumentEntityConverter converter,
- EntitiesMetadata entities,
- Converters converters,
- DocumentEventPersistManager persistManager) {
- this.manager = manager;
- this.converter = converter;
- this.entities = entities;
- this.converters = converters;
- this.persistManager = persistManager;
- }
-
- @Override
- public , Q extends ExecutableQuery, F> R executeQuery(ExecutableQuery criteriaQuery) {
- requireNonNull(criteriaQuery, "query is required");
- if (criteriaQuery instanceof SelectQuery) {
- SelectQuery selectQuery = SelectQuery.class.cast(criteriaQuery);
- DocumentQuery documentQuery = CriteriaQueryUtils.convert(selectQuery);
- Stream entityStream = this.getManager().select(
- documentQuery
- );
-
- if (selectQuery instanceof EntityQuery) {
- EntityQuery.class.cast(selectQuery).feed(
- entityStream.map(
- documentEntity -> this.getConverter().toEntity(
- documentEntity
- )
- )
- );
- } else if (selectQuery instanceof ExpressionQuery) {
- ExpressionQuery.class.cast(selectQuery).feed(
- entityStream.map(
- documentEntity -> documentEntity.documents().stream().map(
- document -> document.value()
- ).collect(
- Collectors.toList()
- )
- )
- );
- }
- } else {
- throw new UnsupportedOperationException("Not supported yet.");
- }
- return criteriaQuery.getResult();
- }
-
- @Override
- protected DocumentEntityConverter getConverter() {
- return converter;
- }
-
- @Override
- protected DocumentManager getManager() {
- return manager;
- }
-
- @Override
- protected DocumentEventPersistManager getEventManager() {
- return persistManager;
- }
-
- @Override
- protected EntitiesMetadata getEntities() {
- return entities;
- }
-
- @Override
- protected Converters getConverters() {
- return converters;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplateProducer.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplateProducer.java
deleted file mode 100644
index 206d0468..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaDocumentTemplateProducer.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import jakarta.enterprise.context.ApplicationScoped;
-import org.eclipse.jnosql.mapping.document.DocumentEntityConverter;
-import org.eclipse.jnosql.mapping.document.DocumentEventPersistManager;
-import jakarta.inject.Inject;
-import org.eclipse.jnosql.communication.document.DocumentManager;
-import org.eclipse.jnosql.mapping.core.Converters;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaDocumentTemplate;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaDocumentTemplateProducer;
-import org.eclipse.jnosql.mapping.metadata.EntitiesMetadata;
-
-@ApplicationScoped
-public class DefaultCriteriaDocumentTemplateProducer implements CriteriaDocumentTemplateProducer {
-
- @Inject
- private DocumentEntityConverter converter;
-
- @Inject
- private EntitiesMetadata entities;
-
- @Inject
- private Converters converters;
-
- @Inject
- private DocumentEventPersistManager persistManager;
-
- @Override
- public CriteriaDocumentTemplate get(DocumentManager dm) {
- return new DefaultCriteriaDocumentTemplate(
- dm,
- converter,
- entities,
- converters,
- persistManager
- );
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaQuery.java
deleted file mode 100644
index c0ace83f..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultCriteriaQuery.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaFunction;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaQuery;
-import org.eclipse.jnosql.mapping.criteria.api.EntityQuery;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQuery;
-import org.eclipse.jnosql.mapping.criteria.api.FunctionQuery;
-import org.eclipse.jnosql.mapping.criteria.api.Root;
-import org.eclipse.jnosql.mapping.AbstractGenericType;
-
-/**
- * Default implementation for {@link CriteriaQuery}
- *
- * @param the type of the root entity
- */
-public class DefaultCriteriaQuery extends AbstractGenericType implements CriteriaQuery {
-
- private final Root from;
-
- public DefaultCriteriaQuery(Class type) {
- super(type);
- this.from = new DefaultRoot<>(type);
- }
-
- @Override
- public Root from() {
- return this.from;
- }
-
- @Override
- public EntityQuery select() {
- return new DefaultEntityQuery<>(this.getType());
- }
-
- @Override
- public FunctionQuery select(CriteriaFunction... functions) {
- return new DefaultFunctionQuery<>(this.getType(), functions);
- }
-
- @Override
- public ExpressionQuery select(Expression... expressions) {
- return new DefaultExpressionQuery<>(this.getType(), expressions);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultDisjunctionPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultDisjunctionPredicate.java
deleted file mode 100644
index e816ba45..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultDisjunctionPredicate.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.DisjunctionPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-import java.util.Collection;
-
-/**
- * Default implementation for {@link DisjunctionPredicate}
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public class DefaultDisjunctionPredicate extends AbstractCompositionPredicate implements DisjunctionPredicate {
-
- public DefaultDisjunctionPredicate(Collection> predicates) {
- super(predicates);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQuery.java
deleted file mode 100644
index eeada914..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQuery.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.EntityQuery;
-import java.util.stream.Stream;
-
-/**
- * Default implementation for {@link EntityQuery}
- * This holds the expressions to retrieve.
- *
- * @param the type of the expression
- */
-public class DefaultEntityQuery extends DefaultSelectQuery, DefaultEntityQuery> implements EntityQuery {
-
- public DefaultEntityQuery(Class type) {
- super(type);
- }
-
- @Override
- public EntityQuery feed(Stream results) {
- this.setResult(
- new DefaultEntityQueryResult(results)
- );
- return this;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQueryResult.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQueryResult.java
deleted file mode 100644
index 3a877f1f..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultEntityQueryResult.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import java.util.stream.Stream;
-import org.eclipse.jnosql.mapping.criteria.api.EntityQueryResult;
-
-/**
- * Default implementation for {@link EntityQueryResult}
- * This holds the results entity stream
- *
- * @param the type of the root entity
- */
-public class DefaultEntityQueryResult implements EntityQueryResult {
-
- private final Stream results;
-
- public DefaultEntityQueryResult(Stream results) {
- this.results = results;
- }
-
- @Override
- public Stream getEntities() {
- return this.results;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpression.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpression.java
deleted file mode 100644
index 861b9d1a..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpression.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.BinaryPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.metamodel.api.Attribute;
-import java.util.Collection;
-
-/**
- * Default implementation for {@link Expression}
- * This holds the attribute and the path to the entity the attribute belongs to.
- *
- * @param the root type
- * @param the entity type
- * @param the type of the expression
- */
-public class DefaultExpression implements Expression {
-
- private final Path path;
- private final Attribute attribute;
-
- public DefaultExpression(Path path, Attribute attribute) {
- this.path = path;
- this.attribute = attribute;
- }
-
- @Override
- public Path getPath() {
- return path;
- }
-
- @Override
- public Attribute getAttribute() {
- return attribute;
- }
-
- @Override
- public BinaryPredicate> equal(Expression expression) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.EQUAL, this, expression);
- }
-
- @Override
- public BinaryPredicate equal(T value) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.EQUAL, this, value);
- }
-
- @Override
- public BinaryPredicate> in(Collection values) {
- return new DefaultBinaryPredicate(BinaryPredicate.Operator.IN, this, values);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionFunction.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionFunction.java
deleted file mode 100644
index fcb46ee2..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionFunction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionFunction;
-
-/**
- * Default implementation for {@link ExpressionFunction}
- * This holds the function and the expression the function is applied to.
- *
- * @param the root type
- * @param the entity type
- * @param the type of the expression
- */
-public class DefaultExpressionFunction implements ExpressionFunction {
-
- private final Expression expression;
- private final Function function;
-
- public DefaultExpressionFunction(Expression expression, Function function) {
- this.expression = expression;
- this.function = function;
- }
-
- @Override
- public Expression getExpression() {
- return expression;
- }
-
- @Override
- public Function getFunction() {
- return function;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQuery.java
deleted file mode 100644
index 03bb16c8..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQuery.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.communication.Value;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQuery;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-
-/**
- * Default implementation for {@link ExpressionQuery} This holds the expressions
- * to retrieve.
- *
- * @param the type of the expression
- */
-public class DefaultExpressionQuery extends DefaultSelectQuery, DefaultExpressionQuery> implements ExpressionQuery {
-
- private final List> expressions;
-
- public DefaultExpressionQuery(Class type, Expression... expressions) {
- super(type);
- this.expressions = Arrays.asList(expressions);
- }
-
- @Override
- public List> getExpressions() {
- return expressions;
- }
-
- @Override
- public ExpressionQuery feed(Stream> results) {
- this.setResult(
- new DefaultExpressionQueryResult(
- results.map(
- result -> new DefaultExpressionQueryResultRow(
- this.expressions.stream().collect(
- Collectors.toMap(
- expression -> expression,
- expression -> result.get(
- this.expressions.indexOf(expression)
- )
- )
- )
- )
- )
- )
- );
- return this;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResult.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResult.java
deleted file mode 100644
index 9b1c78fc..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResult.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.EntityQueryResult;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQueryResult;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQueryResultRow;
-import java.util.stream.Stream;
-
-/**
- * Default implementation for {@link EntityQueryResult}
- * This contains the results {@link ExpressionQueryResultRow} stream
- *
- * @param the type of the root entity
- */
-public class DefaultExpressionQueryResult implements ExpressionQueryResult {
-
- private final Stream> rows;
-
- public DefaultExpressionQueryResult(Stream> rows) {
- this.rows = rows;
- }
-
- @Override
- public Stream> getRows() {
- return this.rows;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResultRow.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResultRow.java
deleted file mode 100644
index 9efeef2c..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultExpressionQueryResultRow.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.communication.Value;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionQueryResultRow;
-import java.util.Map;
-
-/**
- * Default implementation for {@link ExpressionQueryResultRow}
- * This holds a map to retrieve strongly typed values based on key expression
- *
- * @param the type of the root entity
- */
-public class DefaultExpressionQueryResultRow implements ExpressionQueryResultRow {
-
- private final Map, Value> map;
-
- public DefaultExpressionQueryResultRow(
- Map, Value> map
- ) {
- this.map = map;
- }
-
- @Override
- public T get(Expression expression) {
- return this.map.get(expression).get(
- expression.getAttribute().getAttributeType()
- );
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQuery.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQuery.java
deleted file mode 100644
index 93c24274..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQuery.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.communication.Value;
-import org.eclipse.jnosql.mapping.criteria.api.AggregatedQuery;
-import org.eclipse.jnosql.mapping.criteria.api.CriteriaFunction;
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.FunctionQuery;
-import org.eclipse.jnosql.mapping.criteria.api.FunctionQueryResult;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.stream.Stream;
-
-/**
- * Default implementation for {@link FunctionQuery}
- * This holds the functions to retrieve.
- *
- * @param the type of the expression
- */
-public class DefaultFunctionQuery extends AbstractRestrictedQuery, DefaultFunctionQuery> implements FunctionQuery {
-
- private final Collection> functions;
-
- public DefaultFunctionQuery(Class type, CriteriaFunction... functions) {
- super(type);
- this.functions = Arrays.asList(functions);
- }
-
- @Override
- public Collection> getFunctions() {
- return functions;
- }
-
- @Override
- public AggregatedQuery groupBy(Expression... groupings) {
- return new DefaultAggregatedQuery(this.getType(), groupings);
- }
-
- @Override
- public FunctionQueryResult getResult() {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public FunctionQuery feed(Stream> results) {
- return this;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQueryResult.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQueryResult.java
deleted file mode 100644
index 50b79ce3..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultFunctionQueryResult.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.FunctionQueryResult;
-
-/**
- * Default implementation for {@link FunctionQueryResult}
- * This contains the results for this kind of query
- *
- * @param the type of the root entity
- */
-public class DefaultFunctionQueryResult implements FunctionQueryResult {
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNegationPredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNegationPredicate.java
deleted file mode 100644
index 6e4f2e52..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNegationPredicate.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.NegationPredicate;
-import org.eclipse.jnosql.mapping.criteria.api.Predicate;
-
-/**
- * Default implementation for {@link NegationPredicate}
- * This holds the predicate to negate.
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public class DefaultNegationPredicate extends AbstractPredicate implements NegationPredicate {
-
- private final Predicate predicate;
-
- public DefaultNegationPredicate(Predicate predicate) {
- this.predicate = predicate;
- }
-
- @Override
- public Predicate getPredicate() {
- return this.predicate;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNumberExpression.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNumberExpression.java
deleted file mode 100644
index a3ed9cc3..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultNumberExpression.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.ExpressionFunction;
-import org.eclipse.jnosql.mapping.criteria.api.NumberExpression;
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.metamodel.api.NumberAttribute;
-
-/**
- * Default implementation for {@link NumberExpression}
- *
- * @param the root type
- * @param the entity type
- * @param the number type of the expression
- */
-public class DefaultNumberExpression extends DefaultComparableExpression implements NumberExpression {
-
- public DefaultNumberExpression(Path path, NumberAttribute attribute) {
- super(path, attribute);
- }
-
- @Override
- public ExpressionFunction sum() {
- return new DefaultExpressionFunction<>(this, ExpressionFunction.Function.SUM);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPath.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPath.java
deleted file mode 100644
index 5ba4622a..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPath.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.criteria.api.StringExpression;
-import org.eclipse.jnosql.mapping.metamodel.api.ComparableAttribute;
-import org.eclipse.jnosql.mapping.metamodel.api.EntityAttribute;
-import org.eclipse.jnosql.mapping.metamodel.api.StringAttribute;
-import org.eclipse.jnosql.mapping.metamodel.api.ValueAttribute;
-import org.eclipse.jnosql.mapping.AbstractGenericType;
-import org.eclipse.jnosql.mapping.criteria.api.ComparableExpression;
-import org.eclipse.jnosql.mapping.criteria.api.NumberExpression;
-import org.eclipse.jnosql.mapping.metamodel.api.Attribute;
-import org.eclipse.jnosql.mapping.metamodel.api.NumberAttribute;
-
-/**
- * Default implementation for for {@link Path}
- *
- * @param the entity type referenced by the root
- * @param the destination type
- */
-public class DefaultPath extends AbstractGenericType implements Path {
-
- private Path parent;
-
- private Attribute, Y> attribute;
-
- public DefaultPath(Class type) {
- super(type);
- }
-
- public DefaultPath(Class type, Path parent, Attribute, Y> attribute) {
- super(type);
- this.parent = parent;
- this.attribute = attribute;
- }
-
- @Override
- public Path getParent() {
- return this.parent;
- }
-
- @Override
- public Attribute, Y> getAttribute() {
- return this.attribute;
- }
-
- @Override
- public Path get(EntityAttribute attribute) {
- return new DefaultPath<>(this.getType(), this, attribute);
- }
-
- @Override
- public Expression get(ValueAttribute attribute) {
- return new DefaultExpression<>(this, attribute);
- }
-
- @Override
- public StringExpression get(StringAttribute attribute) {
- return new DefaultStringExpression<>(this, attribute);
- }
-
- @Override
- public ComparableExpression get(ComparableAttribute attribute) {
- return new DefaultComparableExpression<>(this, attribute);
- }
-
- @Override
- public NumberExpression get(NumberAttribute attribute) {
- return new DefaultNumberExpression<>(this, attribute);
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPathFunction.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPathFunction.java
deleted file mode 100644
index 9baa4cbf..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultPathFunction.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.criteria.api.PathFunction;
-
-/**
- * Default implementation for {@link PathFunction}
- * This holds the function and the path to apply the function to
- *
- * @param the root entity type
- * @param the entity type
- * @param the type of the attribute the function is applied to
- * @param the return type of the function
- */
-public class DefaultPathFunction implements PathFunction {
-
- private final Path path;
- private final Function function;
-
- public DefaultPathFunction(Path path, Function function) {
- this.path = path;
- this.function = function;
- }
-
- @Override
- public Path getPath() {
- return path;
- }
-
- @Override
- public Function getFunction() {
- return function;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRangePredicate.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRangePredicate.java
deleted file mode 100644
index 7e2891ad..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRangePredicate.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Expression;
-import org.eclipse.jnosql.mapping.criteria.api.RangePredicate;
-
-/**
- * Default implementation for {@link RangePredicate}
- * This holds the expression, the right hand side and the operator to apply to them
- *
- * @param The root type
- * @param The left hand side type
- * @param The right hand side type
- */
-public class DefaultRangePredicate extends AbstractPredicate implements RangePredicate {
-
- private final Operator operator;
- private final Expression left;
- private final RHS from;
- private final RHS to;
-
- public DefaultRangePredicate(Operator operator, Expression left, RHS from, RHS to) {
- this.operator = operator;
- this.left = left;
- this.from = from;
- this.to = to;
- }
-
- @Override
- public Operator getOperator() {
- return this.operator;
- }
-
- @Override
- public Expression getLeft() {
- return this.left;
- }
-
- @Override
- public RHS getFrom() {
- return this.from;
- }
-
- @Override
- public RHS getTo() {
- return this.to;
- }
-
-}
diff --git a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRoot.java b/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRoot.java
deleted file mode 100644
index d41dfbc6..00000000
--- a/jnosql-criteria-extension/src/main/java/org/eclipse/jnosql/mapping/criteria/DefaultRoot.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2022 Contributors to the Eclipse Foundation
- * 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.
- *g
- * You may elect to redistribute this code under either of these licenses.
- *
- * Contributors:
- *
- * Alessandro Moscatelli
- */
-package org.eclipse.jnosql.mapping.criteria;
-
-import org.eclipse.jnosql.mapping.criteria.api.Path;
-import org.eclipse.jnosql.mapping.criteria.api.PathFunction;
-import org.eclipse.jnosql.mapping.criteria.api.Root;
-
-/**
- * Default implementation for {@link Root}
- *
- * @param The Entity type whose fetching is to be be restricted
- */
-public class DefaultRoot extends DefaultPath