wt.epm.query
Class QueryNodes.ClassNode

java.lang.Object
  extended bywt.epm.query.QueryNodes.Node
      extended bywt.epm.query.QueryNodes.FromItemNode
          extended bywt.epm.query.QueryNodes.ClassNode
All Implemented Interfaces:
QueryNodes.GeneratableNode
Enclosing class:
QueryNodes

static class QueryNodes.ClassNode
extends QueryNodes.FromItemNode


Field Summary
private  String alias
           
private  Map attrCache
           
private  Class clazz
           
private  boolean descendants
           
static int GEN_CONFIGSPEC
           
static int GEN_FROM
           
static int GEN_GROUPBY
           
static int GEN_HAVING
           
static int GEN_ORDERBY
           
static int GEN_SELECT
           
static int GEN_WHERE
           
private  String name
           
private  QueryNodes.ParserScope parserScope
           
private  int usage
           
 
Constructor Summary
(package private) QueryNodes.ClassNode(QueryNodes.ParserScope parserScope, Name name, QueryNodes.AliasNode alias, boolean descendants)
           
 
Method Summary
protected static void appendJoint(QueryNodes.QueryScope scope, QueryNodes.ClassNode source, String sourceAttribute, QueryNodes.ClassNode target)
           
protected static void appendJoint(QueryNodes.QueryScope scope, QueryNodes.ClassNode source, String sourceAttribute, QueryNodes.ClassNode target, int outerJoint)
           
protected static void appendOpionalAnd(QueryNodes.QueryScope scope)
           
 void checkLocalScope(QueryNodes.QueryScope scope)
           
protected static void dump(Collection collection, PrintStream out, QueryNodes.Shift shift)
           
(package private)  void dump(PrintStream out, QueryNodes.Shift shift)
           
protected static void dump(QueryNodes.Node node, PrintStream out, QueryNodes.Shift shift)
           
protected static void dump(String prefix, Collection collection, PrintStream out, QueryNodes.Shift shift)
           
protected static void dump(String prefix, QueryNodes.Node node, PrintStream out, QueryNodes.Shift shift)
           
protected static void generate(Collection collection, QueryNodes.QueryScope scope)
           
protected static void generate(QueryNodes.GeneratableNode node, QueryNodes.QueryScope scope)
           
 void generate(QueryNodes.QueryScope scope)
           
 String getAlias()
           
private  QueryNodes.ImmediateAttribute getImmediateAttribute_(QueryNodes.QueryScope scope, Name name)
           
 QueryNodes.ImmediateAttribute getImmediateAttribute(QueryNodes.QueryScope scope, Name name)
           
 int getIndex(QueryNodes.QueryScope scope)
           
private  Class getJavaClass(QueryNodes.QueryContext context)
           
 Class getJavaClass(QueryNodes.QueryScope scope)
           
 String getName()
           
 QueryNodes.ParserScope getParserScope()
           
 String getPOMAlias(QueryNodes.QueryScope scope)
           
protected  String getShortClassName()
           
 TableExpression getTableExpression(QueryNodes.QueryScope scope)
           
protected  String getTitle(QueryNodes.Shift shift)
           
(package private)  int getUsage()
           
(package private)  void increaseUsage()
           
 void invalidAttributeName(String name)
           
 boolean isCanBeIgnored(QueryNodes.QueryScope scope)
           
 boolean isLocalScope(QueryNodes.QueryScope scope)
           
private  QueryNodes.ImmediateAttribute processWithBaseClass(QueryNodes.QueryScope scope, ClassInfo classInfo, Name name, int nameIndex)
           
protected  void register(QueryNodes.ParserScope parserScope)
           
private  void setIndex(QueryNodes.QueryScope scope, int index)
           
(package private)  void setUsage(int usage)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

parserScope

private QueryNodes.ParserScope parserScope

name

private String name

alias

private String alias

clazz

private Class clazz

usage

private int usage

descendants

private boolean descendants

attrCache

private Map attrCache

GEN_SELECT

public static final int GEN_SELECT
See Also:
Constant Field Values

GEN_FROM

public static final int GEN_FROM
See Also:
Constant Field Values

GEN_WHERE

public static final int GEN_WHERE
See Also:
Constant Field Values

GEN_GROUPBY

public static final int GEN_GROUPBY
See Also:
Constant Field Values

GEN_HAVING

public static final int GEN_HAVING
See Also:
Constant Field Values

GEN_ORDERBY

public static final int GEN_ORDERBY
See Also:
Constant Field Values

GEN_CONFIGSPEC

public static final int GEN_CONFIGSPEC
See Also:
Constant Field Values
Constructor Detail

QueryNodes.ClassNode

QueryNodes.ClassNode(QueryNodes.ParserScope parserScope,
                     Name name,
                     QueryNodes.AliasNode alias,
                     boolean descendants)
               throws QueryException
Method Detail

getParserScope

public QueryNodes.ParserScope getParserScope()

getName

public String getName()

getAlias

public String getAlias()

getJavaClass

public Class getJavaClass(QueryNodes.QueryScope scope)
                   throws QueryException
Throws:
QueryException

getJavaClass

private Class getJavaClass(QueryNodes.QueryContext context)
                    throws QueryException
Throws:
QueryException

isLocalScope

public boolean isLocalScope(QueryNodes.QueryScope scope)

checkLocalScope

public void checkLocalScope(QueryNodes.QueryScope scope)
                     throws QueryException
Throws:
QueryException

getIndex

public int getIndex(QueryNodes.QueryScope scope)
             throws QueryException
Throws:
QueryException

setIndex

private void setIndex(QueryNodes.QueryScope scope,
                      int index)
               throws QueryException
Throws:
QueryException

getTableExpression

public TableExpression getTableExpression(QueryNodes.QueryScope scope)
                                   throws QueryException
Throws:
QueryException

getPOMAlias

public String getPOMAlias(QueryNodes.QueryScope scope)
                   throws QueryException
Throws:
QueryException

getUsage

int getUsage()

setUsage

void setUsage(int usage)

increaseUsage

void increaseUsage()

toString

public String toString()

isCanBeIgnored

public boolean isCanBeIgnored(QueryNodes.QueryScope scope)
                       throws QueryException
Throws:
QueryException

generate

public void generate(QueryNodes.QueryScope scope)
              throws WTException,
                     WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getImmediateAttribute_

private QueryNodes.ImmediateAttribute getImmediateAttribute_(QueryNodes.QueryScope scope,
                                                             Name name)
                                                      throws QueryException
Throws:
QueryException

processWithBaseClass

private QueryNodes.ImmediateAttribute processWithBaseClass(QueryNodes.QueryScope scope,
                                                           ClassInfo classInfo,
                                                           Name name,
                                                           int nameIndex)
                                                    throws QueryException
Throws:
QueryException

getImmediateAttribute

public QueryNodes.ImmediateAttribute getImmediateAttribute(QueryNodes.QueryScope scope,
                                                           Name name)
                                                    throws QueryException
Throws:
QueryException

invalidAttributeName

public void invalidAttributeName(String name)
                          throws QueryException
Throws:
QueryException

register

protected void register(QueryNodes.ParserScope parserScope)
                 throws QueryException
Throws:
QueryException

dump

void dump(PrintStream out,
          QueryNodes.Shift shift)

getTitle

protected String getTitle(QueryNodes.Shift shift)

getShortClassName

protected String getShortClassName()

dump

protected static void dump(QueryNodes.Node node,
                           PrintStream out,
                           QueryNodes.Shift shift)

dump

protected static void dump(String prefix,
                           QueryNodes.Node node,
                           PrintStream out,
                           QueryNodes.Shift shift)

dump

protected static void dump(Collection collection,
                           PrintStream out,
                           QueryNodes.Shift shift)

dump

protected static void dump(String prefix,
                           Collection collection,
                           PrintStream out,
                           QueryNodes.Shift shift)

generate

protected static void generate(QueryNodes.GeneratableNode node,
                               QueryNodes.QueryScope scope)
                        throws WTException,
                               WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

generate

protected static void generate(Collection collection,
                               QueryNodes.QueryScope scope)
                        throws WTException,
                               WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

appendOpionalAnd

protected static void appendOpionalAnd(QueryNodes.QueryScope scope)

appendJoint

protected static void appendJoint(QueryNodes.QueryScope scope,
                                  QueryNodes.ClassNode source,
                                  String sourceAttribute,
                                  QueryNodes.ClassNode target)
                           throws WTException
Throws:
WTException

appendJoint

protected static void appendJoint(QueryNodes.QueryScope scope,
                                  QueryNodes.ClassNode source,
                                  String sourceAttribute,
                                  QueryNodes.ClassNode target,
                                  int outerJoint)
                           throws WTException
Throws:
WTException