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
Modifier and Type | Field and Description |
---|---|
static String |
SELECT |
static String |
TOP
Default constant to be used for
SQL "TOP n" handling
|
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final String SELECT
public static final String TOP
public OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p)
selectList_p
- the select list non-terminal, must not be nullfromClause_p
- the from clause non-terminal, must not be nullpublic OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, Integer maxRows)
selectList_p
- the select list non-terminal, must not be nullfromClause_p
- the from clause non-terminal, must not be nullmaxRows
- Integer the maximum rows to return can be nullpublic OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, OwWhereClause whereClause_p)
selectList_p
- the select list non-terminal , must not be nullfromClause_p
- the from clause non-terminal , must not be nullwhereClause_p
- the simple table non-terminal , can be nullpublic OwSimpleTable(OwSelectList selectList_p, OwFromClause fromClause_p, OwWhereClause whereClause_p, Integer maxRows)
selectList_p
- the select list non-terminal , must not be nullfromClause_p
- the from clause non-terminal , must not be nullwhereClause_p
- the simple table non-terminal , can be nullmaxRows
- Integer size of maximum rows, can be nullpublic StringBuilder createSimpleTableSQLString()
StringBuilder
filled with the string representation of this non-terminal
the where clause will be omitted if null or invalid (see OwWhereClause.isValid()
)protected StringBuilder addRowLimit(StringBuilder statement)
createSimpleTableSQLString()
.
By default the SQL "TOP n" will be
inserted into statement: SELECT TOP 50 ....
statement
- StringBuilder the current created statementcreateSimpleTableSQLString()
,
getMaxRows()
public List<OwColumnQualifier> getColumnQualifiers()
public OwColumnQualifier getMainTableQualifier()
public void addJoin(OwCorrelatedTableName joinedTableReference_p, OwJoinSpecification joinSpec_p)
public Integer getMaxRows()
public void setMaxRows(Integer maxRows)
Will not check for negative values.
maxRows
- Integer or nullpublic OwSelectList getSelectList()
Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.