com.googlecode.jpattern.orm.query
Class Join

java.lang.Object
  extended by com.googlecode.jpattern.orm.query.Join
All Implemented Interfaces:
IJoin, INameSolverConsumer, IRenderableSqlObject

public class Join
extends Object
implements IJoin

Author:
Francesco Cina 27/giu/2011

Constructor Summary
Join(IOrmClassToolMap ormClassToolMap)
           
 
Method Summary
 IJoin cross(Class<?> joinClass)
          Perform a cross Join.
 IJoin cross(Class<?> joinClass, String joinClassAlias)
          Perform a cross Join.
 IJoin fullOuter(Class<?> joinClass)
          Perform a natural full outer Join.
 IJoin fullOuter(Class<?> joinClass, String joinClassAlias)
          Perform a natural full outer Join.
 IJoin fullOuter(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a full outer Join.
 IJoin fullOuter(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform full outer Join.
 IJoin inner(Class<?> joinClass)
          Perform a inner Join.
 IJoin inner(Class<?> joinClass, String joinClassAlias)
          Perform a inner Join.
 IJoin inner(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a inner Join.
 IJoin inner(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform a inner Join.
 IJoin leftOuter(Class<?> joinClass)
          Perform a natural left outer Join.
 IJoin leftOuter(Class<?> joinClass, String joinClassAlias)
          Perform a natural left outer Join.
 IJoin leftOuter(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a left outer Join.
 IJoin leftOuter(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform left outer Join.
 IJoin natural(Class<?> joinClass)
          Perform a natural Join.
 IJoin natural(Class<?> joinClass, String joinClassAlias)
          Perform a natural Join.
 String renderSql()
          Return the sql query generated by this IQuery Object
 void renderSql(StringBuilder StringBuilder)
          Append to the string buffer the sql query generated by this IQuery Object
 IJoin rightOuter(Class<?> joinClass)
          Perform a natural right outer Join.
 IJoin rightOuter(Class<?> joinClass, String joinClassAlias)
          Perform a natural right outer Join.
 IJoin rightOuter(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a right outer Join.
 IJoin rightOuter(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform right outer Join.
 void setNameSolver(INameSolver nameSolver)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Join

public Join(IOrmClassToolMap ormClassToolMap)
Method Detail

cross

public IJoin cross(Class<?> joinClass)
Description copied from interface: IJoin
Perform a cross Join. CROSS JOIN returns the Cartesian product of rows from tables in the join. A cross join is the join commonly used when more tables are comma separated in a from clause. The name of the class will be used as alias.

Specified by:
cross in interface IJoin
Returns:

cross

public IJoin cross(Class<?> joinClass,
                   String joinClassAlias)
Description copied from interface: IJoin
Perform a cross Join. CROSS JOIN returns the Cartesian product of rows from tables in the join. A cross join is the join commonly used when more tables are comma separated in a from clause.

Specified by:
cross in interface IJoin
Returns:

natural

public IJoin natural(Class<?> joinClass)
Description copied from interface: IJoin
Perform a natural Join. The join predicate arises implicitly by comparing all columns in both tables that have the same column-names in the joined tables. The resulting joined table contains only one column for each pair of equally-named columns. The name of the class will be used as alias.

Specified by:
natural in interface IJoin
Returns:

natural

public IJoin natural(Class<?> joinClass,
                     String joinClassAlias)
Description copied from interface: IJoin
Perform a natural Join. The join predicate arises implicitly by comparing all columns in both tables that have the same column-names in the joined tables. The resulting joined table contains only one column for each pair of equally-named columns..

Specified by:
natural in interface IJoin
Returns:

inner

public IJoin inner(Class<?> joinClass)
Description copied from interface: IJoin
Perform a inner Join. An inner join can be performed in a normal sql query simply using the key JOIN.

Specified by:
inner in interface IJoin
Returns:

inner

public IJoin inner(Class<?> joinClass,
                   String joinClassAlias)
Description copied from interface: IJoin
Perform a inner Join. An inner join can be performed in a normal sql simply using the key JOIN.

Specified by:
inner in interface IJoin
Returns:

inner

public IJoin inner(Class<?> joinClass,
                   String onLeftProperty,
                   String onRigthProperty)
Description copied from interface: IJoin
Perform a inner Join. An inner join can be performed in a normal sql query simply using the key JOIN.

Specified by:
inner in interface IJoin
Returns:

inner

public IJoin inner(Class<?> joinClass,
                   String joinClassAlias,
                   String onLeftProperty,
                   String onRigthProperty)
Description copied from interface: IJoin
Perform a inner Join. An inner join can be performed in a normal sql simply using the key JOIN.

Specified by:
inner in interface IJoin
Returns:

leftOuter

public IJoin leftOuter(Class<?> joinClass)
Description copied from interface: IJoin
Perform a natural left outer Join. The name of the class will be used as alias.

Specified by:
leftOuter in interface IJoin
Returns:

leftOuter

public IJoin leftOuter(Class<?> joinClass,
                       String joinClassAlias)
Description copied from interface: IJoin
Perform a natural left outer Join.

Specified by:
leftOuter in interface IJoin
Returns:

leftOuter

public IJoin leftOuter(Class<?> joinClass,
                       String onLeftProperty,
                       String onRigthProperty)
Description copied from interface: IJoin
Perform a left outer Join.

Specified by:
leftOuter in interface IJoin
Returns:

leftOuter

public IJoin leftOuter(Class<?> joinClass,
                       String joinClassAlias,
                       String onLeftProperty,
                       String onRigthProperty)
Description copied from interface: IJoin
Perform left outer Join.

Specified by:
leftOuter in interface IJoin
Returns:

rightOuter

public IJoin rightOuter(Class<?> joinClass)
Description copied from interface: IJoin
Perform a natural right outer Join. The name of the class will be used as alias.

Specified by:
rightOuter in interface IJoin
Returns:

rightOuter

public IJoin rightOuter(Class<?> joinClass,
                        String joinClassAlias)
Description copied from interface: IJoin
Perform a natural right outer Join.

Specified by:
rightOuter in interface IJoin
Returns:

rightOuter

public IJoin rightOuter(Class<?> joinClass,
                        String onLeftProperty,
                        String onRigthProperty)
Description copied from interface: IJoin
Perform a right outer Join.

Specified by:
rightOuter in interface IJoin
Returns:

rightOuter

public IJoin rightOuter(Class<?> joinClass,
                        String joinClassAlias,
                        String onLeftProperty,
                        String onRigthProperty)
Description copied from interface: IJoin
Perform right outer Join.

Specified by:
rightOuter in interface IJoin
Returns:

fullOuter

public IJoin fullOuter(Class<?> joinClass)
Description copied from interface: IJoin
Perform a natural full outer Join. The name of the class will be used as alias.

Specified by:
fullOuter in interface IJoin
Returns:

fullOuter

public IJoin fullOuter(Class<?> joinClass,
                       String joinClassAlias)
Description copied from interface: IJoin
Perform a natural full outer Join.

Specified by:
fullOuter in interface IJoin
Returns:

fullOuter

public IJoin fullOuter(Class<?> joinClass,
                       String onLeftProperty,
                       String onRigthProperty)
Description copied from interface: IJoin
Perform a full outer Join.

Specified by:
fullOuter in interface IJoin
Returns:

fullOuter

public IJoin fullOuter(Class<?> joinClass,
                       String joinClassAlias,
                       String onLeftProperty,
                       String onRigthProperty)
Description copied from interface: IJoin
Perform full outer Join.

Specified by:
fullOuter in interface IJoin
Returns:

setNameSolver

public void setNameSolver(INameSolver nameSolver)
Specified by:
setNameSolver in interface INameSolverConsumer

renderSql

public String renderSql()
Description copied from interface: IRenderableSqlObject
Return the sql query generated by this IQuery Object

Specified by:
renderSql in interface IRenderableSqlObject
Returns:

renderSql

public void renderSql(StringBuilder StringBuilder)
Description copied from interface: IRenderableSqlObject
Append to the string buffer the sql query generated by this IQuery Object

Specified by:
renderSql in interface IRenderableSqlObject


Copyright © 2011. All Rights Reserved.