com.caucho.amber.expr
Class JoinExpr

java.lang.Object
  extended by com.caucho.amber.expr.AbstractAmberExpr
      extended by com.caucho.amber.expr.JoinExpr
All Implemented Interfaces:
AmberExpr
Direct Known Subclasses:
EqualJoinExpr, ManyToOneJoinExpr, OneToManyJoinExpr

public abstract class JoinExpr
extends AbstractAmberExpr

Links two tables.


Field Summary
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Constructor Summary
JoinExpr()
           
 
Method Summary
 AmberExpr bindSelect(QueryParser parser)
          Binds the expression as a select item.
 boolean bindToFromItem()
          Binds the expression as a select item.
 FromItem getJoinParent()
          Returns the parent join clause.
 FromItem getJoinTarget()
          Returns the target join clause.
 AmberExpr getWhere()
          Returns the where clause once the parent is removed
 boolean isBoolean()
          Returns true for a boolean expression.
 boolean isDependent(FromItem parent, LinkColumns link)
          Returns true if the given from item is the parent link.
 AmberExpr replace(IdExpr id)
          Returns the id expr with the joined expression.
 AmberExpr replace(KeyColumnExpr id)
          Returns the id expr with the joined expression.
 
Methods inherited from class com.caucho.amber.expr.AbstractAmberExpr
createBoolean, exists, exists, findItem, generateHaving, generateJoin, generateSelect, generateUpdateWhere, generateWhere, getCacheObject, getColumnCount, getObject, getType, hasRelationship, replaceJoin, setInternalArgType, usesFrom, usesFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinExpr

public JoinExpr()
Method Detail

isBoolean

public boolean isBoolean()
Returns true for a boolean expression.

Specified by:
isBoolean in interface AmberExpr
Overrides:
isBoolean in class AbstractAmberExpr

bindSelect

public AmberExpr bindSelect(QueryParser parser)
Binds the expression as a select item.

Specified by:
bindSelect in interface AmberExpr
Specified by:
bindSelect in class AbstractAmberExpr

bindToFromItem

public boolean bindToFromItem()
Binds the expression as a select item.


getJoinTarget

public FromItem getJoinTarget()
Returns the target join clause.


getJoinParent

public FromItem getJoinParent()
Returns the parent join clause.


isDependent

public boolean isDependent(FromItem parent,
                           LinkColumns link)
Returns true if the given from item is the parent link.


getWhere

public AmberExpr getWhere()
Returns the where clause once the parent is removed


replace

public AmberExpr replace(KeyColumnExpr id)
Returns the id expr with the joined expression.


replace

public AmberExpr replace(IdExpr id)
Returns the id expr with the joined expression.