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

com.querydsl.jpa.JPQLQuery Maven / Gradle / Ivy

/*
 * Copyright 2015, The Querydsl Team (http://www.querydsl.com/team)
 *
 * 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 com.querydsl.jpa;

import com.querydsl.core.FetchableQuery;
import com.querydsl.core.Query;
import com.querydsl.core.Tuple;
import com.querydsl.core.support.ExtendedSubQuery;
import com.querydsl.core.types.*;

/**
 * Query interface for JPQL queries
 *
 * @param  result type
 *
 * @author tiwe
 *
 */
public interface JPQLQuery extends FetchableQuery>, Query>, ExtendedSubQuery {

    /**
     * Add sources to this query
     *
     * @param sources sources
     * @return the current object
     */
    JPQLQuery from(EntityPath... sources);

    /**
     * Add a query source
     *
     * @param target collection
     * @param alias alias
     * @param 

* @return the current object */

JPQLQuery from(CollectionExpression target, Path

alias); /** * Create a inner join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery innerJoin(EntityPath

target); /** * Create a inner join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery innerJoin(EntityPath

target, Path

alias); /** * Create a inner join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery innerJoin(CollectionExpression target); /** * Create a inner join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery innerJoin(CollectionExpression target, Path

alias); /** * Create a inner join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery innerJoin(MapExpression target); /** * Create a inner join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery innerJoin(MapExpression target, Path

alias); /** * Create a join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery join(EntityPath

target); /** * Create a join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery join(EntityPath

target, Path

alias); /** * Create a join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery join(CollectionExpression target); /** * Create a join with the given target * Use fetchJoin() to add the fetchJoin parameter to this join * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery join(CollectionExpression target, Path

alias); /** * Create a join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery join(MapExpression target); /** * Create a join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery join(MapExpression target, Path

alias); /** * Create a left join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery leftJoin(EntityPath

target); /** * Create a left join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery leftJoin(EntityPath

target, Path

alias); /** * Create a left join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery leftJoin(CollectionExpression target); /** * Create a left join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery leftJoin(CollectionExpression target, Path

alias); /** * Create a left join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery leftJoin(MapExpression target); /** * Create a left join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery leftJoin(MapExpression target, Path

alias); /** * Create a right join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery rightJoin(EntityPath

target); /** * Create a right join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery rightJoin(EntityPath

target, Path

alias); /** * Create a right join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery rightJoin(CollectionExpression target); /** * Create a right join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery rightJoin(CollectionExpression target, Path

alias); /** * Create a right join with the given target. * Use fetchJoin() to add the fetchJoin parameter to this join. * * @param

* @param target target * @return the current object */

JPQLQuery rightJoin(MapExpression target); /** * Create a right join with the given target and alias. * * @param

* @param target target * @param alias alias * @return the current object */

JPQLQuery rightJoin(MapExpression target, Path

alias); /** * Add join conditions to the last added join * * @param condition join conditions * @return the current object */ JPQLQuery on(Predicate... condition); /** * Add the "fetchJoin" flag to the last defined join * * Mind that collection joins might result in duplicate rows and that "inner join fetchJoin" * will restrict your result set. * * @return the current object */ JPQLQuery fetchJoin(); /** * Add the "fetchJoin all properties" flag to the last defined join. * @return the current object */ JPQLQuery fetchAll(); @Override JPQLQuery select(Expression expr); @Override JPQLQuery select(Expression... exprs); }