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


Field Summary
static int FULL_JOIN
          Deprecated. use JoinType.FULL_JOIN instead.
static int INNER_JOIN
          Deprecated. use JoinType.INNER_JOIN instead.
static int LEFT_OUTER_JOIN
          Deprecated. use JoinType.LEFT_OUTER_JOIN instead.
static int RIGHT_OUTER_JOIN
          Deprecated. use JoinType.RIGHT_OUTER_JOIN instead.
 
Constructor Summary
JoinFragment()
           
 
Method Summary
abstract  boolean addCondition(String condition)
           
protected  boolean addCondition(StringBuilder 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, JoinType joinType)
           
abstract  void addJoin(String tableName, String alias, String[] fkColumns, String[] pkColumns, JoinType 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

@Deprecated
public static final int INNER_JOIN
Deprecated. use JoinType.INNER_JOIN instead.
See Also:
Constant Field Values

FULL_JOIN

@Deprecated
public static final int FULL_JOIN
Deprecated. use JoinType.FULL_JOIN instead.
See Also:
Constant Field Values

LEFT_OUTER_JOIN

@Deprecated
public static final int LEFT_OUTER_JOIN
Deprecated. use JoinType.LEFT_OUTER_JOIN instead.
See Also:
Constant Field Values

RIGHT_OUTER_JOIN

@Deprecated
public static final int RIGHT_OUTER_JOIN
Deprecated. use JoinType.RIGHT_OUTER_JOIN instead.
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,
                             JoinType joinType)

addJoin

public abstract void addJoin(String tableName,
                             String alias,
                             String[] fkColumns,
                             String[] pkColumns,
                             JoinType 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(StringBuilder 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-2012 Red Hat, Inc. All Rights Reserved.