com.onewebsql.query
Class Alias

java.lang.Object
  extended by com.onewebsql.query.Exp
      extended by com.onewebsql.query.AExp
          extended by com.onewebsql.query.Alias
All Implemented Interfaces:
Expression

public class Alias
extends AExp

Represents reference to an expression using an alias for a table, a view or a column.


Field Summary
protected  String columnAlias
          Column aliast
protected  boolean realTableAlias
          Whether this is a real alias or just a name of the table pretending to be an alias.
protected  String tableAlias
          Table aliast
 
Fields inherited from class com.onewebsql.query.AExp
expression, value
 
Fields inherited from class com.onewebsql.query.Exp
brackets, left, operator, right
 
Fields inherited from interface com.onewebsql.query.Expression
COMMA, DOT, LB, QUESTION_MARK, RB, SPACE
 
Constructor Summary
Alias(String tableAlias, String columnAlias)
          Constructor.
Alias(String tableAlias, String columnAlias, boolean realTableAlias)
          Constructor.
 
Method Summary
 void build(StringBuilder sb, String schemaName, List<Value> objects, DBAdapter adapter)
          Builds the text of the query (or a part of it) represented by this object.
 
Methods inherited from class com.onewebsql.query.AExp
add, add, add, add, add, add, add, add, add, alias, all, any, between, between, between, between, between, between, between, between, between, between, between, between, between, br, div, div, div, div, div, div, div, div, div, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, equals, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, exp, fun, fun, ge, ge, ge, ge, ge, ge, ge, ge, ge, ge, ge, ge, ge, getValue, gt, gt, gt, gt, gt, gt, gt, gt, gt, gt, gt, gt, gt, hashCode, ilike, ilike, in, in, inIds, inIds, inValues, le, le, le, le, le, le, le, le, le, le, le, le, le, like, like, lt, lt, lt, lt, lt, lt, lt, lt, lt, lt, lt, lt, lt, mul, mul, mul, mul, mul, mul, mul, mul, mul, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, ne, neg, some, sub, sub, sub, sub, sub, sub, sub, sub, sub, toString
 
Methods inherited from class com.onewebsql.query.Exp
aliasColumn, aliasTable
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

realTableAlias

protected boolean realTableAlias
Whether this is a real alias or just a name of the table pretending to be an alias.


tableAlias

protected String tableAlias
Table aliast


columnAlias

protected String columnAlias
Column aliast

Constructor Detail

Alias

public Alias(String tableAlias,
             String columnAlias)
Constructor.

Parameters:
tableAlias - the value of tableAlias field
columnAlias - the value of columnAlias field

Alias

public Alias(String tableAlias,
             String columnAlias,
             boolean realTableAlias)
Constructor.

Parameters:
tableAlias - the value of tableAlias field
columnAlias - the value of columnAlias field
realTableAlias - the value of realTableAlias field
Method Detail

build

public void build(StringBuilder sb,
                  String schemaName,
                  List<Value> objects,
                  DBAdapter adapter)
Description copied from interface: Expression
Builds the text of the query (or a part of it) represented by this object.

Specified by:
build in interface Expression
Overrides:
build in class AExp
Parameters:
sb - StringBuilder to build the query text
schemaName - name of the database schema used to build the query
objects - an accumulator list to which query parameters are appended
adapter - database adapter which builds builds query in a way specific to the database engine


Copyright © 2011-2013 e-point SA. All Rights Reserved.