com.caucho.amber.expr
Class KeyManyToOneExpr

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

public class KeyManyToOneExpr
extends AbstractPathExpr
implements IdFieldExpr

Bound identifier expression.


Field Summary
 
Fields inherited from interface com.caucho.amber.expr.AmberExpr
IS_INNER_JOIN, USES_DATA
 
Constructor Summary
KeyManyToOneExpr(PathExpr parent, KeyManyToOneField manyToOne)
          Creates a new unbound id expression.
 
Method Summary
 AmberExpr bindSelect(QueryParser parser)
          Binds the expression as a select item.
 FromItem bindSubPath(QueryParser parser)
          Binds the expression as a subpath.
 AmberExpr createField(QueryParser parser, java.lang.String name)
          Creates the expr from the path.
 boolean equals(java.lang.Object o)
           
 void generateMatchArgWhere(CharBuffer cb)
          Generates the where expression.
 FromItem getChildFromItem()
          Return the child from item.
 AmberColumn getColumn()
          Returns the column.
 IdField getField()
          Returns the name.
 PathExpr getParent()
          Returns the parent expression.
 EntityType getTargetType()
          Returns the entity class.
 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
bindSelect, createArray, createId, createLoad
 
Methods inherited from class com.caucho.amber.expr.AbstractAmberExpr
createBoolean, exists, exists, findItem, generateHaving, generateJoin, generateSelect, generateUpdateWhere, generateWhere, getCacheObject, getColumnCount, getObject, getType, 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, generateSelect, generateUpdateWhere, generateWhere, getCacheObject, getObject, getType, hasRelationship, isBoolean, replaceJoin, setInternalArgType, usesFrom
 

Constructor Detail

KeyManyToOneExpr

public KeyManyToOneExpr(PathExpr parent,
                        KeyManyToOneField manyToOne)
Creates a new unbound id expression.

Method Detail

getParent

public PathExpr getParent()
Returns the parent expression.

Specified by:
getParent in interface IdFieldExpr

getField

public IdField getField()
Returns the name.

Specified by:
getField in interface IdFieldExpr

getTargetType

public EntityType getTargetType()
Returns the entity class.

Specified by:
getTargetType in interface PathExpr

getColumn

public AmberColumn getColumn()
Returns the column.

Specified by:
getColumn in interface IdFieldExpr

createField

public AmberExpr createField(QueryParser parser,
                             java.lang.String name)
Creates the expr from the path.

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

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

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

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.


toString

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

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