org.hibernate.sql
Class JoinFragment

java.lang.Object
  extended by org.hibernate.sql.JoinFragment
Direct Known Subclasses:
ANSIJoinFragment, OracleJoinFragment, QueryJoinFragment, Sybase11JoinFragment

public abstract class JoinFragment
extends Object

An abstract SQL join fragment renderer

Author:
Gavin King

Field Summary
static int FULL_JOIN
           
static int INNER_JOIN
           
static int LEFT_OUTER_JOIN
           
static int RIGHT_OUTER_JOIN
           
 
Constructor Summary
JoinFragment()
           
 
Method Summary
abstract  boolean addCondition(String condition)
           
protected  boolean addCondition(StringBuffer buffer, String on)
          Appends the 'on' condition to the buffer, returning true if the condition was added.
abstract  void addCondition(String alias, String[] fkColumns, String[] pkColumns)
           
abstract  void addCrossJoin(String tableName, String alias)
           
 void addFragment(JoinFragment ojf)
           
abstract  void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, int joinType)
           
abstract  void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, int joinType, String on)
           
abstract  void addJoins(String fromFragment, String whereFragment)
           
abstract  JoinFragment copy()
           
 boolean hasFilterCondition()
          True if the where fragment is from a filter condition.
 boolean hasThetaJoins()
           
 void setHasFilterCondition(boolean b)
           
 void setHasThetaJoins(boolean hasThetaJoins)
           
abstract  String toFromFragmentString()
           
abstract  String toWhereFragmentString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INNER_JOIN

public static final int INNER_JOIN
See Also:
Constant Field Values

FULL_JOIN

public static final int FULL_JOIN
See Also:
Constant Field Values

LEFT_OUTER_JOIN

public static final int LEFT_OUTER_JOIN
See Also:
Constant Field Values

RIGHT_OUTER_JOIN

public static final int RIGHT_OUTER_JOIN
See Also:
Constant Field Values
Constructor Detail

JoinFragment

public JoinFragment()
Method Detail

addJoin

public abstract void addJoin(String tableName,
                             String alias,
                             String[] fkColumns,
                             String[] pkColumns,
                             int joinType)

addJoin

public abstract void addJoin(String tableName,
                             String alias,
                             String[] fkColumns,
                             String[] pkColumns,
                             int joinType,
                             String on)

addCrossJoin

public abstract void addCrossJoin(String tableName,
                                  String alias)

addJoins

public abstract void addJoins(String fromFragment,
                              String whereFragment)

toFromFragmentString

public abstract String toFromFragmentString()

toWhereFragmentString

public abstract String toWhereFragmentString()

addCondition

public abstract void addCondition(String alias,
                                  String[] fkColumns,
                                  String[] pkColumns)

addCondition

public abstract boolean addCondition(String condition)

copy

public abstract JoinFragment copy()

addFragment

public void addFragment(JoinFragment ojf)

addCondition

protected boolean addCondition(StringBuffer buffer,
                               String on)
Appends the 'on' condition to the buffer, returning true if the condition was added. Returns false if the 'on' condition was empty.

Parameters:
buffer - The buffer to append the 'on' condition to.
on - The 'on' condition.
Returns:
Returns true if the condition was added, false if the condition was already in 'on' string.

hasFilterCondition

public boolean hasFilterCondition()
True if the where fragment is from a filter condition.

Returns:
True if the where fragment is from a filter condition.

setHasFilterCondition

public void setHasFilterCondition(boolean b)

hasThetaJoins

public boolean hasThetaJoins()

setHasThetaJoins

public void setHasThetaJoins(boolean hasThetaJoins)


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.