com.caucho.amber.expr
Class OneToManyJoinExpr

java.lang.Object
  extended by com.caucho.amber.expr.AbstractAmberExpr
      extended by com.caucho.amber.expr.JoinExpr
          extended by com.caucho.amber.expr.OneToManyJoinExpr
All Implemented Interfaces:
AmberExpr

public class OneToManyJoinExpr
extends JoinExpr

Joins two tables as "a.children".


Field Summary
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Constructor Summary
OneToManyJoinExpr(LinkColumns linkColumns, FromItem source, FromItem target)
          Creates the expr.
 
Method Summary
 AmberExpr bindSelect(QueryParser parser)
          Binds the expression as a select item.
 boolean bindToFromItem()
          Binds the link to the from item.
 boolean equals(java.lang.Object o)
          Test for equality.
 void generateHaving(CharBuffer cb)
          Generates the having expression.
 void generateJoin(CharBuffer cb)
          Generates the where expression.
 void generateUpdateWhere(CharBuffer cb)
          Generates the (update) where expression.
 void generateWhere(CharBuffer cb)
          Generates the where expression.
 FromItem getJoinParent()
          Returns the parent join clause, i.e.
 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.
 AmberExpr replace(IdExpr id)
          Returns the id expr with the joined expression.
 AmberExpr replace(KeyColumnExpr id)
          Returns the id expr with the joined expression.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.amber.expr.JoinExpr
isDependent
 
Methods inherited from class com.caucho.amber.expr.AbstractAmberExpr
createBoolean, exists, exists, findItem, generateSelect, getCacheObject, getColumnCount, getObject, getType, hasRelationship, replaceJoin, setInternalArgType, usesFrom, usesFrom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneToManyJoinExpr

public OneToManyJoinExpr(LinkColumns linkColumns,
                         FromItem source,
                         FromItem target)
Creates the expr.

Method Detail

isBoolean

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

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

bindSelect

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

Specified by:
bindSelect in interface AmberExpr
Overrides:
bindSelect in class JoinExpr

bindToFromItem

public boolean bindToFromItem()
Binds the link to the from item.

Overrides:
bindToFromItem in class JoinExpr

getJoinTarget

public FromItem getJoinTarget()
Returns the target join clause.

Overrides:
getJoinTarget in class JoinExpr

getJoinParent

public FromItem getJoinParent()
Returns the parent join clause, i.e. the first in the FROM order.
 FROM o, o.children
 

Overrides:
getJoinParent in class JoinExpr

replace

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

Overrides:
replace in class JoinExpr

replace

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

Overrides:
replace in class JoinExpr

getWhere

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

Overrides:
getWhere in class JoinExpr

generateWhere

public void generateWhere(CharBuffer cb)
Generates the where expression.

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

generateUpdateWhere

public void generateUpdateWhere(CharBuffer cb)
Generates the (update) where expression.

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

generateHaving

public void generateHaving(CharBuffer cb)
Generates the having expression.

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

generateJoin

public void generateJoin(CharBuffer cb)
Generates the where expression.

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

equals

public boolean equals(java.lang.Object o)
Test for equality.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object