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,P> 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, P> 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,P> 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, P> 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, P> 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,P> 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,P> 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, P> target);
/**
* Create a join with the given target and alias.
*
* @param
* @param target target
* @param alias alias
* @return the current object
*/
JPQLQuery join(MapExpression, P> 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,P> 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,P> 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, P> 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, P> 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,P> 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,P> 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, P> 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, P> 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);
}