FileDocCategorySizeDatePackage
JoinFragment.javaAPI DocHibernate 3.2.52683Mon Mar 07 05:31:38 GMT 2005org.hibernate.sql

JoinFragment

public abstract class JoinFragment extends Object
An abstract SQL join fragment renderer
author
Gavin King

Fields Summary
public static final int
INNER_JOIN
public static final int
FULL_JOIN
public static final int
LEFT_OUTER_JOIN
public static final int
RIGHT_OUTER_JOIN
private boolean
hasFilterCondition
private boolean
hasThetaJoins
Constructors Summary
Methods Summary
protected booleanaddCondition(java.lang.StringBuffer buffer, java.lang.String on)
Appends the 'on' condition to the buffer, returning true if the condition was added. Returns false if the 'on' condition was empty.

param
buffer The buffer to append the 'on' condition to.
param
on The 'on' condition.
return
Returns true if the condition was added, false if the condition was already in 'on' string.

		if ( StringHelper.isNotEmpty( on ) ) {
			if ( !on.startsWith( " and" ) ) buffer.append( " and " );
			buffer.append( on );
			return true;
		}
		else {
			return false;
		}
	
public abstract voidaddCondition(java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns)

public abstract booleanaddCondition(java.lang.String condition)

public abstract voidaddCrossJoin(java.lang.String tableName, java.lang.String alias)

public voidaddFragment(org.hibernate.sql.JoinFragment ojf)


	    
		if ( ojf.hasThetaJoins() ) {
			hasThetaJoins = true;
		}
		addJoins( ojf.toFromFragmentString(), ojf.toWhereFragmentString() );
	
public abstract voidaddJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, int joinType)

public abstract voidaddJoin(java.lang.String tableName, java.lang.String alias, java.lang.String[] fkColumns, java.lang.String[] pkColumns, int joinType, java.lang.String on)

public abstract voidaddJoins(java.lang.String fromFragment, java.lang.String whereFragment)

public abstract org.hibernate.sql.JoinFragmentcopy()

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

return
True if the where fragment is from a filter condition.

		return hasFilterCondition;
	
public booleanhasThetaJoins()

		return hasThetaJoins;
	
public voidsetHasFilterCondition(boolean b)

		this.hasFilterCondition = b;
	
public voidsetHasThetaJoins(boolean hasThetaJoins)

		this.hasThetaJoins = hasThetaJoins;
	
public abstract java.lang.StringtoFromFragmentString()

public abstract java.lang.StringtoWhereFragmentString()