Search in sources :

Example 6 with PersistentPropertyPath

use of io.micronaut.data.model.PersistentPropertyPath in project micronaut-data by micronaut-projects.

the class MongoQueryBuilder method addLookups.

private void addLookups(Collection<JoinPath> joins, QueryState queryState) {
    if (joins.isEmpty()) {
        return;
    }
    List<String> joined = joins.stream().map(JoinPath::getPath).sorted((o1, o2) -> Comparator.comparingInt(String::length).thenComparing(String::compareTo).compare(o1, o2)).collect(Collectors.toList());
    for (String join : joined) {
        StringJoiner rootPath = new StringJoiner(".");
        StringJoiner currentEntityPath = new StringJoiner(".");
        LookupsStage currentLookup = queryState.rootLookups;
        for (String path : StringUtils.splitOmitEmptyStrings(join, '.')) {
            rootPath.add(path);
            currentEntityPath.add(path);
            String thisPath = currentEntityPath.toString();
            if (currentLookup.subLookups.containsKey(thisPath)) {
                currentLookup = currentLookup.subLookups.get(path);
                currentEntityPath = new StringJoiner(".");
                continue;
            }
            PersistentPropertyPath propertyPath = currentLookup.persistentEntity.getPropertyPath(thisPath);
            PersistentProperty property = propertyPath.getProperty();
            if (!(property instanceof Association)) {
                continue;
            }
            Association association = (Association) property;
            if (association.getKind() == Relation.Kind.EMBEDDED) {
                continue;
            }
            LookupsStage lookupStage = new LookupsStage(association.getAssociatedEntity());
            List<Map<String, Object>> pipeline = currentLookup.pipeline;
            Optional<Association> inverseSide = association.getInverseSide().map(Function.identity());
            PersistentEntity persistentEntity = association.getOwner();
            String joinedCollectionName = association.getAssociatedEntity().getPersistedName();
            String ownerCollectionName = persistentEntity.getPersistedName();
            if (association.getKind() == Relation.Kind.MANY_TO_MANY || association.isForeignKey() && !inverseSide.isPresent()) {
                PersistentEntity associatedEntity = association.getAssociatedEntity();
                PersistentEntity associationOwner = association.getOwner();
                // JOIN TABLE
                PersistentProperty identity = associatedEntity.getIdentity();
                if (identity == null) {
                    throw new IllegalArgumentException("Associated entity [" + associatedEntity.getName() + "] defines no ID. Cannot join.");
                }
                final PersistentProperty associatedId = associationOwner.getIdentity();
                if (associatedId == null) {
                    throw new MappingException("Cannot join on entity [" + associationOwner.getName() + "] that has no declared ID");
                }
                Association owningAssociation = inverseSide.orElse(association);
                boolean isAssociationOwner = !association.getInverseSide().isPresent();
                NamingStrategy namingStrategy = associationOwner.getNamingStrategy();
                AnnotationMetadata annotationMetadata = owningAssociation.getAnnotationMetadata();
                List<String> ownerJoinFields = resolveJoinTableAssociatedFields(annotationMetadata, isAssociationOwner, associationOwner, namingStrategy);
                List<String> ownerJoinCollectionFields = resolveJoinTableJoinFields(annotationMetadata, isAssociationOwner, associationOwner, namingStrategy);
                List<String> associationJoinFields = resolveJoinTableAssociatedFields(annotationMetadata, !isAssociationOwner, associatedEntity, namingStrategy);
                List<String> associationJoinCollectionFields = resolveJoinTableJoinFields(annotationMetadata, !isAssociationOwner, associatedEntity, namingStrategy);
                String joinCollectionName = namingStrategy.mappedName(owningAssociation);
                // String joinTableName = annotationMetadata
                // .stringValue(ANN_JOIN_TABLE, "name")
                // .orElseGet(() -> namingStrategy.mappedName(association));
                List<Map<String, Object>> joinCollectionLookupPipeline = new ArrayList<>();
                pipeline.add(lookup(joinCollectionName, "_id", ownerCollectionName, joinCollectionLookupPipeline, thisPath));
                joinCollectionLookupPipeline.add(lookup(joinedCollectionName, joinedCollectionName, "_id", lookupStage.pipeline, joinedCollectionName));
                joinCollectionLookupPipeline.add(unwind("$" + joinedCollectionName, true));
                joinCollectionLookupPipeline.add(singletonMap("$replaceRoot", singletonMap("newRoot", "$" + joinedCollectionName)));
            } else {
                String currentPath = asPath(propertyPath.getAssociations(), propertyPath.getProperty());
                if (association.isForeignKey()) {
                    String mappedBy = association.getAnnotationMetadata().stringValue(Relation.class, "mappedBy").orElseThrow(IllegalStateException::new);
                    PersistentPropertyPath mappedByPath = association.getAssociatedEntity().getPropertyPath(mappedBy);
                    if (mappedByPath == null) {
                        throw new IllegalStateException("Cannot find mapped path: " + mappedBy);
                    }
                    if (!(mappedByPath.getProperty() instanceof Association)) {
                        throw new IllegalStateException("Expected association as a mapped path: " + mappedBy);
                    }
                    List<String> localMatchFields = new ArrayList<>();
                    List<String> foreignMatchFields = new ArrayList<>();
                    traversePersistentProperties(currentLookup.persistentEntity.getIdentity(), (associations, p) -> {
                        String fieldPath = asPath(associations, p);
                        localMatchFields.add(fieldPath);
                    });
                    List<Association> mappedAssociations = new ArrayList<>(mappedByPath.getAssociations());
                    mappedAssociations.add((Association) mappedByPath.getProperty());
                    traversePersistentProperties(mappedAssociations, currentLookup.persistentEntity.getIdentity(), (associations, p) -> {
                        String fieldPath = asPath(associations, p);
                        foreignMatchFields.add(fieldPath);
                    });
                    pipeline.add(lookup(joinedCollectionName, localMatchFields, foreignMatchFields, lookupStage.pipeline, currentPath));
                } else {
                    List<Association> mappedAssociations = new ArrayList<>(propertyPath.getAssociations());
                    mappedAssociations.add((Association) propertyPath.getProperty());
                    List<String> localMatchFields = new ArrayList<>();
                    List<String> foreignMatchFields = new ArrayList<>();
                    PersistentProperty identity = lookupStage.persistentEntity.getIdentity();
                    if (identity == null) {
                        throw new IllegalStateException("Null identity of persistent entity: " + lookupStage.persistentEntity);
                    }
                    traversePersistentProperties(mappedAssociations, identity, (associations, p) -> {
                        String fieldPath = asPath(associations, p);
                        localMatchFields.add(fieldPath);
                    });
                    traversePersistentProperties(identity, (associations, p) -> {
                        String fieldPath = asPath(associations, p);
                        foreignMatchFields.add(fieldPath);
                    });
                    pipeline.add(lookup(joinedCollectionName, localMatchFields, foreignMatchFields, lookupStage.pipeline, currentPath));
                }
                if (association.getKind().isSingleEnded()) {
                    pipeline.add(unwind("$" + currentPath, true));
                }
            }
            currentLookup.subLookups.put(currentEntityPath.toString(), lookupStage);
        }
        queryState.joinPaths.add(join);
    }
}
Also used : Arrays(java.util.Arrays) TypeRole(io.micronaut.data.annotation.TypeRole) Internal(io.micronaut.core.annotation.Internal) Collections.singletonList(java.util.Collections.singletonList) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Locale(java.util.Locale) Arrays.asList(java.util.Arrays.asList) Map(java.util.Map) QueryResult(io.micronaut.data.model.query.builder.QueryResult) ArgumentUtils(io.micronaut.core.util.ArgumentUtils) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath) PersistentProperty(io.micronaut.data.model.PersistentProperty) MappingException(io.micronaut.data.exceptions.MappingException) Sort(io.micronaut.data.model.Sort) Collection(java.util.Collection) Set(java.util.Set) NotNull(javax.validation.constraints.NotNull) Collectors(java.util.stream.Collectors) StringUtils(io.micronaut.core.util.StringUtils) List(java.util.List) Optional(java.util.Optional) Pattern(java.util.regex.Pattern) Relation(io.micronaut.data.annotation.Relation) QueryParameterBinding(io.micronaut.data.model.query.builder.QueryParameterBinding) MongoAnnotations(io.micronaut.data.document.mongo.MongoAnnotations) QueryModel(io.micronaut.data.model.query.QueryModel) HashMap(java.util.HashMap) Function(java.util.function.Function) TreeSet(java.util.TreeSet) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) Embedded(io.micronaut.data.model.Embedded) SerdeConfig(io.micronaut.serde.config.annotation.SerdeConfig) Nullable(io.micronaut.core.annotation.Nullable) Pageable(io.micronaut.data.model.Pageable) BiConsumer(java.util.function.BiConsumer) Collections.singletonMap(java.util.Collections.singletonMap) NamingStrategy(io.micronaut.data.model.naming.NamingStrategy) Iterator(java.util.Iterator) NonNull(io.micronaut.core.annotation.NonNull) JoinPath(io.micronaut.data.model.query.JoinPath) BindingParameter(io.micronaut.data.model.query.BindingParameter) Association(io.micronaut.data.model.Association) PersistentEntity(io.micronaut.data.model.PersistentEntity) CollectionUtils(io.micronaut.core.util.CollectionUtils) StringJoiner(java.util.StringJoiner) QueryBuilder(io.micronaut.data.model.query.builder.QueryBuilder) AnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata) Comparator(java.util.Comparator) Collections(java.util.Collections) JoinPath(io.micronaut.data.model.query.JoinPath) PersistentEntity(io.micronaut.data.model.PersistentEntity) ArrayList(java.util.ArrayList) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath) PersistentProperty(io.micronaut.data.model.PersistentProperty) AnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata) MappingException(io.micronaut.data.exceptions.MappingException) NamingStrategy(io.micronaut.data.model.naming.NamingStrategy) Relation(io.micronaut.data.annotation.Relation) Association(io.micronaut.data.model.Association) Map(java.util.Map) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Collections.singletonMap(java.util.Collections.singletonMap) StringJoiner(java.util.StringJoiner)

Example 7 with PersistentPropertyPath

use of io.micronaut.data.model.PersistentPropertyPath in project micronaut-data by micronaut-projects.

the class SqlQueryBuilder method buildJoin.

private void buildJoin(String joinType, StringBuilder sb, QueryState queryState, List<Association> joinAssociationsPath, String joinAlias, Association association, PersistentEntity associatedEntity, PersistentEntity associationOwner, String currentJoinAlias) {
    final boolean escape = shouldEscape(associationOwner);
    String mappedBy = association.getAnnotationMetadata().stringValue(Relation.class, "mappedBy").orElse(null);
    if (association.getKind() == Relation.Kind.MANY_TO_MANY || association.isForeignKey() && StringUtils.isEmpty(mappedBy)) {
        PersistentProperty identity = associatedEntity.getIdentity();
        if (identity == null) {
            throw new IllegalArgumentException("Associated entity [" + associatedEntity.getName() + "] defines no ID. Cannot join.");
        }
        final PersistentProperty associatedId = associationOwner.getIdentity();
        if (associatedId == null) {
            throw new MappingException("Cannot join on entity [" + associationOwner.getName() + "] that has no declared ID");
        }
        Optional<Association> inverseSide = association.getInverseSide().map(Function.identity());
        Association owningAssociation = inverseSide.orElse(association);
        boolean isAssociationOwner = !association.getInverseSide().isPresent();
        NamingStrategy namingStrategy = associationOwner.getNamingStrategy();
        AnnotationMetadata annotationMetadata = owningAssociation.getAnnotationMetadata();
        List<String> ownerJoinColumns = resolveJoinTableAssociatedColumns(annotationMetadata, isAssociationOwner, associationOwner, namingStrategy);
        List<String> ownerJoinTableColumns = resolveJoinTableJoinColumns(annotationMetadata, isAssociationOwner, associationOwner, namingStrategy);
        List<String> associationJoinColumns = resolveJoinTableAssociatedColumns(annotationMetadata, !isAssociationOwner, associatedEntity, namingStrategy);
        List<String> associationJoinTableColumns = resolveJoinTableJoinColumns(annotationMetadata, !isAssociationOwner, associatedEntity, namingStrategy);
        if (escape) {
            ownerJoinColumns = ownerJoinColumns.stream().map(this::quote).collect(Collectors.toList());
            ownerJoinTableColumns = ownerJoinTableColumns.stream().map(this::quote).collect(Collectors.toList());
            associationJoinColumns = associationJoinColumns.stream().map(this::quote).collect(Collectors.toList());
            associationJoinTableColumns = associationJoinTableColumns.stream().map(this::quote).collect(Collectors.toList());
        }
        String joinTableName = annotationMetadata.stringValue(ANN_JOIN_TABLE, "name").orElseGet(() -> namingStrategy.mappedName(association));
        String joinTableAlias = annotationMetadata.stringValue(ANN_JOIN_TABLE, "alias").orElseGet(() -> currentJoinAlias + joinTableName + "_");
        join(sb, queryState.getQueryModel(), joinType, escape ? quote(joinTableName) : joinTableName, joinTableAlias, joinAlias, ownerJoinColumns, ownerJoinTableColumns);
        sb.append(SPACE);
        join(sb, queryState.getQueryModel(), joinType, getTableName(associatedEntity), currentJoinAlias, joinTableAlias, associationJoinTableColumns, associationJoinColumns);
    } else {
        if (StringUtils.isNotEmpty(mappedBy)) {
            PersistentProperty ownerIdentity = associationOwner.getIdentity();
            if (ownerIdentity == null) {
                throw new IllegalArgumentException("Associated entity [" + associationOwner + "] defines no ID. Cannot join.");
            }
            PersistentPropertyPath mappedByPropertyPath = associatedEntity.getPropertyPath(mappedBy);
            if (mappedByPropertyPath == null) {
                throw new MappingException("Foreign key association with mappedBy references a property that doesn't exist [" + mappedBy + "] of entity: " + associatedEntity.getName());
            }
            join(sb, joinType, queryState, associatedEntity, associationOwner, joinAlias, currentJoinAlias, joinAssociationsPath, ownerIdentity, mappedByPropertyPath.getAssociations(), mappedByPropertyPath.getProperty());
        } else {
            PersistentProperty associatedProperty = association.getAssociatedEntity().getIdentity();
            if (associatedProperty == null) {
                throw new IllegalArgumentException("Associated entity [" + association.getAssociatedEntity().getName() + "] defines no ID. Cannot join.");
            }
            join(sb, joinType, queryState, associatedEntity, associationOwner, joinAlias, currentJoinAlias, joinAssociationsPath, association, Collections.emptyList(), associatedProperty);
        }
    }
}
Also used : NamingStrategy(io.micronaut.data.model.naming.NamingStrategy) Relation(io.micronaut.data.annotation.Relation) Association(io.micronaut.data.model.Association) PersistentProperty(io.micronaut.data.model.PersistentProperty) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath) AnnotationMetadata(io.micronaut.core.annotation.AnnotationMetadata) MappingException(io.micronaut.data.exceptions.MappingException)

Example 8 with PersistentPropertyPath

use of io.micronaut.data.model.PersistentPropertyPath in project micronaut-data by micronaut-projects.

the class AbstractSqlLikeQueryBuilder method buildSelect.

private void buildSelect(QueryState queryState, StringBuilder queryString, List<QueryModel.Projection> projectionList, String tableAlias, PersistentEntity entity) {
    if (projectionList.isEmpty()) {
        selectAllColumns(queryState, queryString);
    } else {
        for (Iterator i = projectionList.iterator(); i.hasNext(); ) {
            QueryModel.Projection projection = (QueryModel.Projection) i.next();
            if (projection instanceof QueryModel.LiteralProjection) {
                queryString.append(asLiteral(((QueryModel.LiteralProjection) projection).getValue()));
            } else if (projection instanceof QueryModel.CountProjection) {
                appendProjectionRowCount(queryString, tableAlias);
            } else if (projection instanceof QueryModel.DistinctProjection) {
                queryString.append("DISTINCT(").append(tableAlias).append(CLOSE_BRACKET);
            } else if (projection instanceof QueryModel.IdProjection) {
                if (entity.hasCompositeIdentity()) {
                    for (PersistentProperty identity : entity.getCompositeIdentity()) {
                        appendPropertyProjection(queryString, asQueryPropertyPath(queryState.getRootAlias(), identity));
                        queryString.append(COMMA);
                    }
                    queryString.setLength(queryString.length() - 1);
                } else if (entity.hasIdentity()) {
                    PersistentProperty identity = entity.getIdentity();
                    if (identity == null) {
                        throw new IllegalArgumentException("Cannot query on ID with entity that has no ID");
                    }
                    appendPropertyProjection(queryString, asQueryPropertyPath(queryState.getRootAlias(), identity));
                } else {
                    throw new IllegalArgumentException("Cannot query on ID with entity that has no ID");
                }
            } else if (projection instanceof QueryModel.PropertyProjection) {
                QueryModel.PropertyProjection pp = (QueryModel.PropertyProjection) projection;
                String alias = pp.getAlias().orElse(null);
                if (projection instanceof QueryModel.AvgProjection) {
                    appendFunctionProjection(queryState.getEntity(), AVG, pp, tableAlias, queryString);
                } else if (projection instanceof QueryModel.DistinctPropertyProjection) {
                    appendFunctionProjection(queryState.getEntity(), DISTINCT, pp, tableAlias, queryString);
                } else if (projection instanceof QueryModel.SumProjection) {
                    appendFunctionProjection(queryState.getEntity(), SUM, pp, tableAlias, queryString);
                } else if (projection instanceof QueryModel.MinProjection) {
                    appendFunctionProjection(queryState.getEntity(), MIN, pp, tableAlias, queryString);
                } else if (projection instanceof QueryModel.MaxProjection) {
                    appendFunctionProjection(queryState.getEntity(), MAX, pp, tableAlias, queryString);
                } else if (projection instanceof QueryModel.CountDistinctProjection) {
                    appendFunctionProjection(queryState.getEntity(), COUNT_DISTINCT, pp, tableAlias, queryString);
                    queryString.append(CLOSE_BRACKET);
                } else {
                    String propertyName = pp.getPropertyName();
                    PersistentPropertyPath propertyPath = entity.getPropertyPath(propertyName);
                    if (propertyPath == null) {
                        throw new IllegalArgumentException("Cannot project on non-existent property: " + propertyName);
                    }
                    PersistentProperty property = propertyPath.getProperty();
                    if (property instanceof Association && !(property instanceof Embedded)) {
                        if (!queryState.isJoined(propertyPath.getPath())) {
                            queryString.setLength(queryString.length() - 1);
                            continue;
                        }
                        String joinAlias = queryState.computeAlias(propertyPath.getPath());
                        selectAllColumns(((Association) property).getAssociatedEntity(), joinAlias, queryString);
                    } else {
                        appendPropertyProjection(queryString, findProperty(queryState, propertyName, null));
                    }
                }
                if (alias != null) {
                    queryString.append(AS_CLAUSE).append(alias);
                }
            }
            if (i.hasNext()) {
                queryString.append(COMMA);
            }
        }
    }
}
Also used : PersistentProperty(io.micronaut.data.model.PersistentProperty) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath) QueryModel(io.micronaut.data.model.query.QueryModel) Association(io.micronaut.data.model.Association) Iterator(java.util.Iterator) Embedded(io.micronaut.data.model.Embedded)

Example 9 with PersistentPropertyPath

use of io.micronaut.data.model.PersistentPropertyPath in project micronaut-data by micronaut-projects.

the class RepositoryTypeElementVisitor method bindAdditionalParameters.

private void bindAdditionalParameters(MatchContext matchContext, SourcePersistentEntity entity, List<QueryParameterBinding> parameterBinding, ParameterElement[] parameters, Map<String, String> params) {
    if (CollectionUtils.isNotEmpty(params)) {
        Map<String, DataType> configuredDataTypes = Utils.getConfiguredDataTypes(matchContext.getRepositoryClass());
        for (Map.Entry<String, String> param : params.entrySet()) {
            ParameterElement parameter = Arrays.stream(parameters).filter(p -> p.stringValue(Parameter.class).orElse(p.getName()).equals(param.getValue())).findFirst().orElse(null);
            if (parameter == null) {
                throw new MatchFailedException("A @Where(..) definition requires a parameter called [" + param.getValue() + "] which is not present in the method signature.");
            }
            PersistentPropertyPath propertyPath = entity.getPropertyPath(parameter.getName());
            BindingParameter.BindingContext bindingContext = BindingParameter.BindingContext.create().name(param.getKey()).incomingMethodParameterProperty(propertyPath).outgoingQueryParameterProperty(propertyPath);
            QueryParameterBinding binding = new SourceParameterExpressionImpl(configuredDataTypes, matchContext.parameters, parameter, false).bind(bindingContext);
            parameterBinding.add(binding);
        }
    }
}
Also used : QueryParameterBinding(io.micronaut.data.model.query.builder.QueryParameterBinding) SourceParameterExpressionImpl(io.micronaut.data.processor.model.criteria.impl.SourceParameterExpressionImpl) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath) BindingParameter(io.micronaut.data.model.query.BindingParameter) DataType(io.micronaut.data.model.DataType) Parameter(io.micronaut.context.annotation.Parameter) BindingParameter(io.micronaut.data.model.query.BindingParameter) DataMethodQueryParameter(io.micronaut.data.intercept.annotation.DataMethodQueryParameter) ParameterElement(io.micronaut.inject.ast.ParameterElement) Map(java.util.Map) HashMap(java.util.HashMap)

Example 10 with PersistentPropertyPath

use of io.micronaut.data.model.PersistentPropertyPath in project micronaut-data by micronaut-projects.

the class UpdateMethodMatcher method batchUpdate2.

private UpdateCriteriaMethodMatch batchUpdate2(java.util.regex.Matcher matcher) {
    return new UpdateCriteriaMethodMatch(matcher) {

        @Override
        protected <T> void addPropertiesToUpdate(MethodMatchContext matchContext, PersistentEntityRoot<T> root, PersistentEntityCriteriaUpdate<T> query, SourcePersistentEntityCriteriaBuilder cb) {
            Set<String> queryParameters = query.getParameters().stream().map(ParameterExpression::getName).collect(Collectors.toSet());
            for (ParameterElement p : matchContext.getParametersNotInRole()) {
                String parameterName = getParameterName(p);
                if (queryParameters.contains(parameterName)) {
                    continue;
                }
                PersistentPropertyPath path = root.getPersistentEntity().getPropertyPath(parameterName);
                if (path != null) {
                    query.set(path.getProperty().getName(), cb.parameter(p));
                } else {
                    throw new MatchFailedException("Cannot perform batch update for non-existent property: " + parameterName);
                }
            }
        }
    };
}
Also used : SourcePersistentEntityCriteriaBuilder(io.micronaut.data.processor.model.criteria.SourcePersistentEntityCriteriaBuilder) MethodMatchContext(io.micronaut.data.processor.visitors.MethodMatchContext) MatchFailedException(io.micronaut.data.processor.visitors.MatchFailedException) PersistentEntityRoot(io.micronaut.data.model.jpa.criteria.PersistentEntityRoot) AbstractPersistentEntityCriteriaUpdate(io.micronaut.data.model.jpa.criteria.impl.AbstractPersistentEntityCriteriaUpdate) PersistentEntityCriteriaUpdate(io.micronaut.data.model.jpa.criteria.PersistentEntityCriteriaUpdate) UpdateCriteriaMethodMatch(io.micronaut.data.processor.visitors.finders.criteria.UpdateCriteriaMethodMatch) ParameterElement(io.micronaut.inject.ast.ParameterElement) PersistentPropertyPath(io.micronaut.data.model.PersistentPropertyPath)

Aggregations

PersistentPropertyPath (io.micronaut.data.model.PersistentPropertyPath)26 Association (io.micronaut.data.model.Association)10 QueryParameterBinding (io.micronaut.data.model.query.builder.QueryParameterBinding)10 PersistentProperty (io.micronaut.data.model.PersistentProperty)8 NonNull (io.micronaut.core.annotation.NonNull)7 DataType (io.micronaut.data.model.DataType)7 Map (java.util.Map)7 ParameterElement (io.micronaut.inject.ast.ParameterElement)6 ArrayList (java.util.ArrayList)6 Embedded (io.micronaut.data.model.Embedded)5 QueryResult (io.micronaut.data.model.query.builder.QueryResult)5 Arrays (java.util.Arrays)5 List (java.util.List)5 StringJoiner (java.util.StringJoiner)5 AnnotationMetadata (io.micronaut.core.annotation.AnnotationMetadata)4 BindingParameter (io.micronaut.data.model.query.BindingParameter)4 QueryModel (io.micronaut.data.model.query.QueryModel)4 MatchFailedException (io.micronaut.data.processor.visitors.MatchFailedException)4 ClassElement (io.micronaut.inject.ast.ClassElement)4 Collections (java.util.Collections)4