com.caucho.amber.expr
Class LoadExpr

java.lang.Object
  extended by com.caucho.amber.expr.AbstractAmberExpr
      extended by com.caucho.amber.expr.LoadExpr
All Implemented Interfaces:
AmberExpr
Direct Known Subclasses:
LoadBasicExpr, LoadEmbeddedExpr, LoadEntityExpr

public abstract class LoadExpr
extends AbstractAmberExpr

An embedded or entity expression which should be loaded.


Field Summary
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Method Summary
 FromItem bindSubPath(QueryParser parser)
          Binds the expression as a select item.
static LoadExpr create(PathExpr expr)
           
static LoadExpr create(PathExpr expr, FromItem rootItem)
           
 void generateHaving(CharBuffer cb, java.lang.String fieldName)
          Generates the having expression.
 void generateSelect(CharBuffer cb)
          Generates the where expression.
 void generateSelect(CharBuffer cb, boolean fullSelect)
          Generates the where expression.
 void generateUpdateWhere(CharBuffer cb, java.lang.String fieldName)
          Generates the (update) where expression.
 void generateWhere(CharBuffer cb, java.lang.String fieldName)
          Generates the where expression.
 FromItem getChildFromItem()
          Returns the from item
 PathExpr getExpr()
          Returns the underlying expression
 int getIndex()
          Returns the number of columns consumed from a result set after loading the entity.
 java.lang.String getTable()
          Returns the table.
 AmberType getType()
          Returns the type.
 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
bindSelect, createBoolean, exists, exists, findItem, generateHaving, generateJoin, generateUpdateWhere, generateWhere, getCacheObject, getColumnCount, getObject, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static LoadExpr create(PathExpr expr)

create

public static LoadExpr create(PathExpr expr,
                              FromItem rootItem)

getType

public AmberType getType()
Returns the type.

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

getExpr

public PathExpr getExpr()
Returns the underlying expression


getIndex

public int getIndex()
Returns the number of columns consumed from a result set after loading the entity.


getTable

public java.lang.String getTable()
Returns the table.


bindSubPath

public FromItem bindSubPath(QueryParser parser)
Binds the expression as a select item.


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

getChildFromItem

public FromItem getChildFromItem()
Returns the from item


generateSelect

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

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

generateSelect

public void generateSelect(CharBuffer cb,
                           boolean fullSelect)
Generates the where expression.


generateWhere

public void generateWhere(CharBuffer cb,
                          java.lang.String fieldName)
Generates the where expression.


generateUpdateWhere

public void generateUpdateWhere(CharBuffer cb,
                                java.lang.String fieldName)
Generates the (update) where expression.


generateHaving

public void generateHaving(CharBuffer cb,
                           java.lang.String fieldName)
Generates the having expression.


toString

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