com.caucho.amber.expr
Class ColumnExpr

java.lang.Object
  extended by com.caucho.amber.expr.AbstractAmberExpr
      extended by com.caucho.amber.expr.ColumnExpr
All Implemented Interfaces:
AmberExpr
Direct Known Subclasses:
KeyColumnExpr

public class ColumnExpr
extends AbstractAmberExpr

Bound identifier expression.


Field Summary
protected  FromItem _fromItem
           
protected  PathExpr _parent
           
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Constructor Summary
ColumnExpr(PathExpr parent, AmberColumn column)
          Creates a new unbound id expression.
 
Method Summary
 AmberExpr bindSelect(QueryParser parser)
          Binds the expression as a select item.
 AmberExpr createBoolean()
          Returns a boolean expression.
 void generateHaving(CharBuffer cb)
          Generates the having expression.
 void generateUpdateWhere(CharBuffer cb)
          Generates the (update) where expression.
 void generateWhere(CharBuffer cb)
          Generates the where expression.
 AmberColumn getColumn()
          Returns the name.
 PathExpr getParent()
          Returns the parent.
 AmberType getType()
          Returns the expr type.
 boolean hasRelationship()
          Returns true if this expr has any relationship.
 AmberExpr replaceJoin(JoinExpr join)
          Replaces linked join to eliminate a table.
 java.lang.String toString()
           
 boolean usesFrom(FromItem from, int type, boolean isNot)
          Returns true if the expression uses the from item.
 
Methods inherited from class com.caucho.amber.expr.AbstractAmberExpr
exists, exists, findItem, generateJoin, generateSelect, getCacheObject, getColumnCount, getObject, isBoolean, setInternalArgType, usesFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_parent

protected PathExpr _parent

_fromItem

protected FromItem _fromItem
Constructor Detail

ColumnExpr

public ColumnExpr(PathExpr parent,
                  AmberColumn column)
Creates a new unbound id expression.

Method Detail

getParent

public PathExpr getParent()
Returns the parent.


getColumn

public AmberColumn getColumn()
Returns the name.


getType

public AmberType getType()
Returns the expr type.

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

hasRelationship

public boolean hasRelationship()
Returns true if this expr has any relationship.

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

createBoolean

public AmberExpr createBoolean()
                        throws QueryParseException
Returns a boolean expression.

Specified by:
createBoolean in interface AmberExpr
Overrides:
createBoolean in class AbstractAmberExpr
Throws:
QueryParseException

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

usesFrom

public boolean usesFrom(FromItem from,
                        int type,
                        boolean isNot)
Returns true if the expression uses the from item.

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

replaceJoin

public AmberExpr replaceJoin(JoinExpr join)
Replaces linked join to eliminate a table.

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

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

toString

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