
com.blazebit.query.QuerySession Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of blaze-query-core-api Show documentation
Show all versions of blaze-query-core-api Show documentation
A multi-platform querying library
The newest version!
/*
* SPDX-License-Identifier: Apache-2.0
* Copyright Blazebit
*/
package com.blazebit.query;
import com.blazebit.query.metamodel.SchemaObjectType;
import com.blazebit.query.spi.DataFetcherException;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* A session within which queries can be executed against schema object data.
* {@linkplain QuerySession} stores schema object data against which queries run, and if necessary,
* fetches data by invoking the {@link com.blazebit.query.spi.DataFetcher} registered for a schema object.
* When the application has finished using the {@linkplain QuerySession}, the application should close the {@linkplain QuerySession}.
* Once a {@linkplain QuerySession} has been closed, all its {@link Query} objects become unusable.
* The object is not thread-safe.
*
* @author Christian Beikov
* @since 1.0.0
*/
public interface QuerySession extends AutoCloseable {
/**
* Returns the {@link QueryContext} that created this {@linkplain QuerySession}.
*
* @return the {@link QueryContext} that created this {@linkplain QuerySession}
* @throws IllegalStateException if the {@linkplain QuerySession} is closed
*/
QueryContext getContext();
/**
* Creates an executable query associated to this {@linkplain QuerySession}.
*
* @param queryString A Blaze-Query query string
* @return a new query instance
* @throws IllegalArgumentException If the query string is invalid
* @throws IllegalStateException if the {@linkplain QuerySession} is closed
*/
default TypedQuery
© 2015 - 2025 Weber Informatics LLC | Privacy Policy