com.wewebu.ow.csqlc.ast
Class OwSimpleTable

java.lang.Object
  extended by com.wewebu.ow.csqlc.ast.OwSimpleTable

public class OwSimpleTable
extends Object

SQL AST node : <simple table> syntax non-terminal as defined by the SQL grammar.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
3.2.0.0

Field Summary
static String SELECT
           
static String TOP
          Default constant to be used for SQL "TOP n" handling
 
Constructor Summary
OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p)
          Constructor
OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, Integer maxRows)
          Constructor
OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, OwWhereClause whereClause_p)
          Constructor
OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, OwWhereClause whereClause_p, Integer maxRows)
          Constructor
 
Method Summary
 void addJoin(OwCorrelatedTableName joinedTableReference_p, OwJoinSpecification joinSpec_p)
           
protected  StringBuilder addRowLimit(StringBuilder statement)
          (overridable) Handle limitation in SQL-statement, method is called at the end of createSimpleTableSQLString().
 StringBuilder createSimpleTableSQLString()
           
 List<OwColumnQualifier> getColumnQualifiers()
           
 OwColumnQualifier getMainTableQualifier()
           
 Integer getMaxRows()
          Return current max row definition.
 OwSelectList getSelectList()
           
 void setMaxRows(Integer maxRows)
          Set the max row definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT

public static final String SELECT
See Also:
Constant Field Values

TOP

public static final String TOP
Default constant to be used for SQL "TOP n" handling

Since:
3.2.0.2
See Also:
Constant Field Values
Constructor Detail

OwSimpleTable

public OwSimpleTable(OwSelectList selectList_p,
                     OwFromClause fromClause_p)
Constructor

Parameters:
selectList_p - the select list non-terminal, must not be null
fromClause_p - the from clause non-terminal, must not be null

OwSimpleTable

public OwSimpleTable(OwSelectList selectList_p,
                     OwFromClause fromClause_p,
                     Integer maxRows)
Constructor

Parameters:
selectList_p - the select list non-terminal, must not be null
fromClause_p - the from clause non-terminal, must not be null
maxRows - Integer the maximum rows to return can be null
Since:
3.2.0.2

OwSimpleTable

public OwSimpleTable(OwSelectList selectList_p,
                     OwFromClause fromClause_p,
                     OwWhereClause whereClause_p)
Constructor

Parameters:
selectList_p - the select list non-terminal , must not be null
fromClause_p - the from clause non-terminal , must not be null
whereClause_p - the simple table non-terminal , can be null

OwSimpleTable

public OwSimpleTable(OwSelectList selectList_p,
                     OwFromClause fromClause_p,
                     OwWhereClause whereClause_p,
                     Integer maxRows)
Constructor

Parameters:
selectList_p - the select list non-terminal , must not be null
fromClause_p - the from clause non-terminal , must not be null
whereClause_p - the simple table non-terminal , can be null
maxRows - Integer size of maximum rows, can be null
Since:
3.2.0.2
Method Detail

createSimpleTableSQLString

public StringBuilder createSimpleTableSQLString()
Returns:
a StringBuilder filled with the string representation of this non-terminal the where clause will be omitted if null or invalid (see OwWhereClause.isValid())

addRowLimit

protected StringBuilder addRowLimit(StringBuilder statement)
(overridable) Handle limitation in SQL-statement, method is called at the end of createSimpleTableSQLString().

By default the SQL "TOP n" will be inserted into statement: SELECT TOP 50 ....

Parameters:
statement - StringBuilder the current created statement
Returns:
StringBuilder which may contains row limitation
Since:
3.2.0.2
See Also:
createSimpleTableSQLString(), getMaxRows()

getColumnQualifiers

public List<OwColumnQualifier> getColumnQualifiers()

getMainTableQualifier

public OwColumnQualifier getMainTableQualifier()

addJoin

public void addJoin(OwCorrelatedTableName joinedTableReference_p,
                    OwJoinSpecification joinSpec_p)

getMaxRows

public Integer getMaxRows()
Return current max row definition.

Returns:
Integer or null if not set
Since:
3.2.0.2

setMaxRows

public void setMaxRows(Integer maxRows)
Set the max row definition.

Will not check for negative values.

Parameters:
maxRows - Integer or null
Since:
3.2.0.2

getSelectList

public OwSelectList getSelectList()


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.