com.onewebsql.query
Class Column

java.lang.Object
  extended by com.onewebsql.query.Exp
      extended by com.onewebsql.query.AExp
          extended by com.onewebsql.query.Column
All Implemented Interfaces:
Expression
Direct Known Subclasses:
AExpColumnWrapper

public class Column
extends AExp

Represents a column of a table expression.


Field Summary
protected  int jdbcType
          JDBC type of the column.
protected  String name
          Name of the column.
protected  TableExpression owner
          Table expression this column belongs to.
 
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
Column(TableExpression owner, String name, int jdbcType)
          Constructor.
 
Method Summary
 AExp alias(String tableAlias, String columnAlias)
          Returns an expression which represents a reference to the expression using the specified table/column alias.
 void build(StringBuilder sb, String schemaName, List<Value> objs, DBAdapter adapter)
          Builds the text of the query (or a part of it) represented by this object.
 boolean equals(Object obj)
           
 int getJdbcType()
          Returns the value of the jdbcType field.
 String getName()
          Return the value of the name field
 TableExpression getOwner()
          Returns the value of the owner field
 int hashCode()
           
 void setJdbcType(int jdbcType)
          Sets the value of the jdbcType field.
 void setName(String name)
          Sets the value of the name field
 void setOwner(TableExpression owner)
          Sets the value of the owner
 Column setSchema(String schemaName)
          Sets the schema name of the table this column belongs to, using the TableExpression.setSchema(String) method with the specified argument.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class com.onewebsql.query.AExp
add, add, add, add, add, add, add, add, add, 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, 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, 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
 
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

owner

protected TableExpression owner
Table expression this column belongs to.


name

protected String name
Name of the column.


jdbcType

protected int jdbcType
JDBC type of the column.

Constructor Detail

Column

public Column(TableExpression owner,
              String name,
              int jdbcType)
Constructor.

Parameters:
owner - table expression this column belongs to
name - name of the column
jdbcType - JDBC type of the column
Method Detail

build

public void build(StringBuilder sb,
                  String schemaName,
                  List<Value> objs,
                  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
objs - an accumulator list to which query parameters are appended
adapter - database adapter which builds builds query in a way specific to the database engine

alias

public AExp alias(String tableAlias,
                  String columnAlias)
Description copied from class: Exp
Returns an expression which represents a reference to the expression using the specified table/column alias.

Overrides:
alias in class AExp
Parameters:
tableAlias - table alias
columnAlias - column alias
Returns:
aliased expression

getJdbcType

public int getJdbcType()
Returns the value of the jdbcType field.

Returns:
value of the jdbcType field

setJdbcType

public void setJdbcType(int jdbcType)
Sets the value of the jdbcType field.

Parameters:
jdbcType - value of the jdbcType field

getName

public String getName()
Return the value of the name field

Returns:
value of the name field

setName

public void setName(String name)
Sets the value of the name field

Parameters:
name - value of the name field

getOwner

public TableExpression getOwner()
Returns the value of the owner field

Returns:
value of the owner field

setOwner

public void setOwner(TableExpression owner)
Sets the value of the owner

Parameters:
owner - value of the owner

setSchema

public Column setSchema(String schemaName)
Sets the schema name of the table this column belongs to, using the TableExpression.setSchema(String) method with the specified argument. Returns the column of the modified table.

Parameters:
schemaName - name of the schema
Returns:
column of the modified table..

toString

public String toString()
Returns a string representation of the object. The representation consists of the value of the field "name".

Overrides:
toString in class AExp
Returns:
a string representation of the object.

hashCode

public int hashCode()
Overrides:
hashCode in class AExp

equals

public boolean equals(Object obj)
Overrides:
equals in class AExp


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