All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dellroad.querystream.jpa.PathStream Maven / Gradle / Ivy


/*
 * Copyright (C) 2018 Archie L. Cobbs. All rights reserved.
 */

package org.dellroad.querystream.jpa;

import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;

import javax.persistence.FlushModeType;
import javax.persistence.LockModeType;
import javax.persistence.Parameter;
import javax.persistence.TemporalType;
import javax.persistence.criteria.Expression;
import javax.persistence.criteria.JoinType;
import javax.persistence.criteria.Order;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Root;
import javax.persistence.criteria.Selection;
import javax.persistence.metamodel.PluralAttribute;
import javax.persistence.metamodel.SingularAttribute;

/**
 * {@link SearchStream} containing items representable as {@link Path}s.
 */
public interface PathStream> extends ExprStream {

    /**
     * Map this stream into a stream whose elements are the result of applying the given narrowing cast.
     *
     * @param type new, narrower item type
     * @param  narrower type
     * @return recast stream
     * @see javax.persistence.criteria.CriteriaBuilder#treat(Path, Class) CriteriaBuilder.treat()
     */
     PathStream> cast(Class type);

// Narrowing overrides (SearchStream)

    @Override
    PathStream distinct();

    @Override
    PathStream orderBy(Ref> ref, boolean asc);

    @Override
    PathStream orderBy(SingularAttribute attribute, boolean asc);

    @Override
    PathStream orderBy(SingularAttribute attribute1, boolean asc1,
      SingularAttribute attribute2, boolean asc2);

    @Override
    PathStream orderBy(SingularAttribute attribute1, boolean asc1,
      SingularAttribute attribute2, boolean asc2, SingularAttribute attribute3, boolean asc3);

    @Override
    PathStream orderBy(Function> orderExprFunction, boolean asc);

    @Override
    PathStream orderBy(Order... orders);

    @Override
    PathStream orderByMulti(Function> orderListFunction);

    @Override
    PathStream thenOrderBy(SingularAttribute attribute, boolean asc);

    @Override
    PathStream thenOrderBy(Ref> ref, boolean asc);

    @Override
    PathStream thenOrderBy(Order... orders);

    @Override
    PathStream thenOrderBy(Function> orderExprFunction, boolean asc);

    @Override
    PathStream groupBy(Ref> ref);

    @Override
    PathStream groupBy(SingularAttribute attribute);

    @Override
    PathStream groupBy(Function> groupFunction);

    @Override
    PathStream groupByMulti(Function>> groupFunction);

    @Override
    PathStream having(Function> havingFunction);

    @Override
    PathValue findAny();

    @Override
    PathValue findFirst();

    @Override
    PathValue findSingle();

    @Override
    PathStream fetch(SingularAttribute attribute);

    @Override
    PathStream fetch(SingularAttribute attribute, JoinType joinType);

    @Override
    PathStream fetch(PluralAttribute attribute);

    @Override
    PathStream fetch(PluralAttribute attribute, JoinType joinType);

// Narrowing overrides (QueryStream)

    @Override
    PathStream bind(Ref ref);

    @Override
    PathStream peek(Consumer peeker);

    @Override
    > PathStream bind(Ref ref, Function refFunction);

    @Override
     PathStream addRoot(Ref> ref, Class type);

    @Override
    PathStream filter(SingularAttribute attribute);

    @Override
    PathStream filter(Function> predicateBuilder);

    @Override
    PathStream limit(int maxSize);

    @Override
    PathStream skip(int num);

    @Override
    PathStream withFlushMode(FlushModeType flushMode);

    @Override
    PathStream withLockMode(LockModeType lockMode);

    @Override
    PathStream withHint(String name, Object value);

    @Override
    PathStream withHints(Map hints);

    @Override
     PathStream withParam(Parameter parameter, T value);

    @Override
    PathStream withParam(Parameter parameter, Date value, TemporalType temporalType);

    @Override
    PathStream withParam(Parameter parameter, Calendar value, TemporalType temporalType);

    @Override
    PathStream withParams(Set> params);

    @Override
    PathStream withLoadGraph(String name);

    @Override
    PathStream withFetchGraph(String name);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy