com.caucho.amber.expr
Class EmbeddedExpr

java.lang.Object
  extended by com.caucho.amber.expr.AbstractAmberExpr
      extended by com.caucho.amber.expr.AbstractPathExpr
          extended by com.caucho.amber.expr.EmbeddedExpr
All Implemented Interfaces:
AmberExpr, PathExpr

public class EmbeddedExpr
extends AbstractPathExpr

Embedded path expression


Field Summary
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Constructor Summary
EmbeddedExpr(PathExpr parent, EmbeddableType embeddableType, java.util.ArrayList<EmbeddedSubField> subFields)
          Creates a new expression.
 
Method Summary
 AmberExpr bindSelect(QueryParser parser)
          Binds the expression as a select item.
 PathExpr bindSelect(QueryParser parser, java.lang.String id)
          Binds the expression as a select item.
 FromItem bindSubPath(QueryParser parser)
          Binds the expression as a subpath.
 boolean equals(java.lang.Object o)
           
 void generateMatchArgWhere(CharBuffer cb)
          Generates the where expression.
 void generateSelect(CharBuffer cb)
          Generates the select expression.
 void generateUpdateWhere(CharBuffer cb)
          Generates the (update) where expression.
 void generateWhere(CharBuffer cb)
          Generates the where expression.
 FromItem getChildFromItem()
          Return the child from item.
 AmberColumn getColumnByFieldName(java.lang.String fieldName)
          Returns column by name.
 FromItem getFromItem()
          Return the parent from item.
 PathExpr getParent()
          Returns the parent.
 EmbeddableType getTargetType()
          Returns the target type.
 AmberType getType()
          Returns the target type.
 int hashCode()
           
 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.AbstractPathExpr
createArray, createField, createId, createLoad
 
Methods inherited from class com.caucho.amber.expr.AbstractAmberExpr
createBoolean, exists, exists, findItem, generateHaving, generateJoin, getCacheObject, getColumnCount, getObject, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.caucho.amber.expr.AmberExpr
createBoolean, exists, exists, findItem, generateHaving, generateJoin, getCacheObject, getObject, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom
 

Constructor Detail

EmbeddedExpr

public EmbeddedExpr(PathExpr parent,
                    EmbeddableType embeddableType,
                    java.util.ArrayList<EmbeddedSubField> subFields)
Creates a new expression.

Method Detail

getTargetType

public EmbeddableType getTargetType()
Returns the target type.


getType

public AmberType getType()
Returns the target type.

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

getColumnByFieldName

public AmberColumn getColumnByFieldName(java.lang.String fieldName)
Returns column by name.


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

getFromItem

public FromItem getFromItem()
Return the parent from item.


getChildFromItem

public FromItem getChildFromItem()
Return the child from item.

Specified by:
getChildFromItem in interface PathExpr
Overrides:
getChildFromItem in class AbstractPathExpr

bindSubPath

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

Specified by:
bindSubPath in interface PathExpr
Overrides:
bindSubPath in class AbstractPathExpr

bindSelect

public PathExpr bindSelect(QueryParser parser,
                           java.lang.String id)
Binds the expression as a select item.

Specified by:
bindSelect in interface PathExpr
Overrides:
bindSelect in class AbstractPathExpr

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

generateMatchArgWhere

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


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

generateSelect

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

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

getParent

public PathExpr getParent()
Returns the parent.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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