/* * Copyright (c) 2009 Mysema Ltd. * All rights reserved. * */ package com.mysema.query.sql; import java.sql.Connection; import com.mysema.query.Projectable; import com.mysema.query.Query; import com.mysema.query.types.expr.EBoolean; import com.mysema.query.types.path.PEntity; import com.mysema.query.types.query.ListSubQuery; import com.mysema.query.types.query.SubQuery; /** * Query interface for SQL queries * * @author tiwe * */ public interface SQLQuery extends Query, Projectable { /** * Defines the sources of the query * * @param o * @return */ SQLQuery from(PEntity... o); /** * Adds a full join to the given target * * @param o * @return */ SQLQuery fullJoin(PEntity o); /** * Adds an inner join to the given target * * @param o * @return */ SQLQuery innerJoin(PEntity o); /** * Adds a join to the given target * * @param o * @return */ SQLQuery join(PEntity o); /** * Adds a left join to the given target * * @param o * @return */ SQLQuery leftJoin(PEntity o); /** * Defines a filter to the last added join * * @param conditions * @return */ SQLQuery on(EBoolean... conditions); /** * Creates an union expression for the given subqueries * * @param * @param sq * @return */ Union union(ListSubQuery... sq); /** * Creates an union expression for the given subqueries * * @param * @param sq * @return */ Union union(SubQuery... sq); /** * Clone the state of the Query for the given Connection * * @param conn * @return */ SQLQuery clone(Connection conn); }