com.jpattern.orm.query.clause
Class OrmFrom<T extends From<?>>

java.lang.Object
  extended by com.jpattern.orm.query.SmartRenderableSqlSubElement
      extended by com.jpattern.orm.query.clause.OrmFrom<T>
All Implemented Interfaces:
From<T>, SqlClause<T>, NameSolverConsumer, RenderableSqlSubElement
Direct Known Subclasses:
CustomFindFromImpl, FindFromImpl

public abstract class OrmFrom<T extends From<?>>
extends SmartRenderableSqlSubElement
implements From<T>, NameSolverConsumer

Author:
Francesco Cina 27/giu/2011

Constructor Summary
OrmFrom(IOrmClassToolMap ormClassToolMap, Class<?> clazz, Integer nameSolverClassId)
           
 
Method Summary
 void appendElementValues(List<Object> values)
          Append to the list all the values of the expression's elements
 void doElementRender(StringBuilder stringBuilder)
           
protected abstract  T from()
           
 T fullOuterJoin(Class<?> joinClass)
          Perform a natural full outer Join.
 T fullOuterJoin(Class<?> joinClass, String joinClassAlias)
          Perform a natural full outer Join.
 T fullOuterJoin(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a full outer Join.
 T fullOuterJoin(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform full outer Join.
 int getElementStatusVersion()
           
 T innerJoin(Class<?> joinClass)
          Perform a inner Join.
 T innerJoin(Class<?> joinClass, String joinClassAlias)
          Perform a inner Join.
 T innerJoin(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a inner Join.
 T innerJoin(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform a inner Join.
 T join(Class<?> joinClass)
          Perform a simple (cross) Join.
 T join(Class<?> joinClass, String joinClassAlias)
          Perform a simple (cross) Join.
 T leftOuterJoin(Class<?> joinClass)
          Perform a natural left outer Join.
 T leftOuterJoin(Class<?> joinClass, String joinClassAlias)
          Perform a natural left outer Join.
 T leftOuterJoin(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a left outer Join.
 T leftOuterJoin(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform left outer Join.
 T naturalJoin(Class<?> joinClass)
          Perform a natural Join.
 T naturalJoin(Class<?> joinClass, String joinClassAlias)
          Perform a natural Join.
 T rightOuterJoin(Class<?> joinClass)
          Perform a natural right outer Join.
 T rightOuterJoin(Class<?> joinClass, String joinClassAlias)
          Perform a natural right outer Join.
 T rightOuterJoin(Class<?> joinClass, String onLeftProperty, String onRigthProperty)
          Perform a right outer Join.
 T rightOuterJoin(Class<?> joinClass, String joinClassAlias, String onLeftProperty, String onRigthProperty)
          Perform right outer Join.
 void setNameSolver(NameSolver nameSolver)
           
 
Methods inherited from class com.jpattern.orm.query.SmartRenderableSqlSubElement
isElementStatusChanged, renderSqlElement, renderSqlElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrmFrom

public OrmFrom(IOrmClassToolMap ormClassToolMap,
               Class<?> clazz,
               Integer nameSolverClassId)
Method Detail

from

protected abstract T from()

join

public T join(Class<?> joinClass)
Description copied from interface: From
Perform a simple (cross) Join. This 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:
join in interface From<T extends From<?>>
Returns:

join

public T join(Class<?> joinClass,
              String joinClassAlias)
Description copied from interface: From
Perform a simple (cross) Join. This 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:
join in interface From<T extends From<?>>
Returns:

naturalJoin

public T naturalJoin(Class<?> joinClass)
Description copied from interface: From
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:
naturalJoin in interface From<T extends From<?>>
Returns:

naturalJoin

public T naturalJoin(Class<?> joinClass,
                     String joinClassAlias)
Description copied from interface: From
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:
naturalJoin in interface From<T extends From<?>>
Returns:

innerJoin

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

Specified by:
innerJoin in interface From<T extends From<?>>
Returns:

innerJoin

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

Specified by:
innerJoin in interface From<T extends From<?>>
Returns:

innerJoin

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

Specified by:
innerJoin in interface From<T extends From<?>>
Returns:

innerJoin

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

Specified by:
innerJoin in interface From<T extends From<?>>
Returns:

leftOuterJoin

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

Specified by:
leftOuterJoin in interface From<T extends From<?>>
Returns:

leftOuterJoin

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

Specified by:
leftOuterJoin in interface From<T extends From<?>>
Returns:

leftOuterJoin

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

Specified by:
leftOuterJoin in interface From<T extends From<?>>
Returns:

leftOuterJoin

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

Specified by:
leftOuterJoin in interface From<T extends From<?>>
Returns:

rightOuterJoin

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

Specified by:
rightOuterJoin in interface From<T extends From<?>>
Returns:

rightOuterJoin

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

Specified by:
rightOuterJoin in interface From<T extends From<?>>
Returns:

rightOuterJoin

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

Specified by:
rightOuterJoin in interface From<T extends From<?>>
Returns:

rightOuterJoin

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

Specified by:
rightOuterJoin in interface From<T extends From<?>>
Returns:

fullOuterJoin

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

Specified by:
fullOuterJoin in interface From<T extends From<?>>
Returns:

fullOuterJoin

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

Specified by:
fullOuterJoin in interface From<T extends From<?>>
Returns:

fullOuterJoin

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

Specified by:
fullOuterJoin in interface From<T extends From<?>>
Returns:

fullOuterJoin

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

Specified by:
fullOuterJoin in interface From<T extends From<?>>
Returns:

setNameSolver

public void setNameSolver(NameSolver nameSolver)
Specified by:
setNameSolver in interface NameSolverConsumer

getElementStatusVersion

public final int getElementStatusVersion()
Specified by:
getElementStatusVersion in class SmartRenderableSqlSubElement

doElementRender

public final void doElementRender(StringBuilder stringBuilder)
Specified by:
doElementRender in class SmartRenderableSqlSubElement

appendElementValues

public final void appendElementValues(List<Object> values)
Description copied from interface: RenderableSqlSubElement
Append to the list all the values of the expression's elements

Specified by:
appendElementValues in interface RenderableSqlSubElement


Copyright © 2013. All Rights Reserved.