org.jinq.orm.internal.QueryComposer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Jinq public API for extending Java 8 streams with database functionality
package org.jinq.orm.internal;
import java.util.Iterator;
import java.util.function.Consumer;
import org.jinq.orm.stream.JinqStream;
import org.jinq.orm.stream.JinqStream.Select;
import org.jinq.tuples.Pair;
import org.jinq.tuples.Tuple;
public interface QueryComposer
{
public String getDebugQueryString();
// Actually executes the query and returns the results in an iterator
public Iterator executeAndReturnResultIterator(Consumer exceptionReporter);
// Returns a new query with the given operation integrated in
// (or returns null if the given operation cannot be integrated)
public > QueryComposer sortedBy(
Object sorter, boolean isAscending);
public QueryComposer limit(long n);
public QueryComposer skip(long n);
public QueryComposer distinct();
// New stuff for Queryll2
public QueryComposer where(Object test);
public QueryComposer whereWithSource(Object test);
public QueryComposer select(Object select);
public QueryComposer selectWithSource(Object select);
public QueryComposer selectAll(Object select);
public QueryComposer selectAllWithSource(Object select);
public QueryComposer selectAllIterable(Object select);
public QueryComposer> join(JinqStream.Join join);
public QueryComposer> joinWithSource(JinqStream.JoinWithSource join);
public QueryComposer> joinIterable(JinqStream.JoinToIterable join);
public QueryComposer> leftOuterJoin(JinqStream.Join join);
public QueryComposer> leftOuterJoinIterable(JinqStream.JoinToIterable join);
public QueryComposer> leftOuterJoinWithSource(JinqStream.JoinWithSource join, JinqStream.WhereForOn on);
public QueryComposer> crossJoin(JinqStream join);
// public QueryComposer> group(JinqStream.Select select, JinqStream.AggregateGroup aggregate);
// returns null if the aggregates cannot be calculated
public Long count();
public > Number sum(Object aggregate, Class collectClass);
public > V max(Object aggregate);
public > V min(Object aggregate);
public > Double avg(Object aggregate);
// public U selectAggregates(JinqStream.AggregateSelect aggregate);
public U multiaggregate(JinqStream.AggregateSelect[] aggregates);
public QueryComposer groupToTuple(Select select, JinqStream.AggregateGroup[] aggregates);
public boolean setHint(String name, Object val);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy