public class SELECT extends TableQuery.Implementation implements ConditionalTableReadingTableQuery, TableExpression, SelectItem, Conditional<SELECT>
Modifier and Type | Class and Description |
---|---|
protected class |
SELECT.SuperConditionalQuery |
Query.Implementation.Jdbc, Query.Implementation.Logging
ConditionalTableQuery.Implementation
TableExpression.Utils
jdbc, logging, loggingContextExecute
ASEXPRESSION, defaultClauseStringBuilderLength, defaultExpressionStringBuilderLength, defaultQueryStringBuilderLength, DELIMIT_ALIASES, DELIMIT_COLUMN_IDENTIFIERS, DELIMIT_TABLE_IDENTIFIERS, ESCAPE_DBL_QUOTES, ESCAPE_QUOTES, FLAGS_TAKEN, MINIINDENT, OMITALIAS, PACKED, QUALIFY_BY_TABLE, SINGLELINE, UNQUALIFIED
Constructor and Description |
---|
SELECT()
Instantiates a new sELECT.
|
SELECT(SELECT copySource) |
Modifier and Type | Method and Description |
---|---|
SELECT |
addJoinClause(JoinClause joinClause) |
void |
addSelectItem(SelectItem selectItem) |
void |
addSelectItems(List<SelectItem> selectItems)
Adds
selectItems via the internal selectitems' implementation of
java.util.List.addAll(Collection) |
SELECT |
AND(Object condition)
AND.
|
SELECT |
AS(String newAlias)
AS.
|
protected StringBuilder |
assemble(DbmsDMLAssembler<?> dmlAssembler,
StringBuilder sb,
int indentLevel,
int flags)
Assemble.
|
void |
clearSelectItems()
Clear select items.
|
SELECT |
clone() |
SELECT |
columns(Object... columns)
Columns.
|
SELECT |
copy() |
SELECT |
DISTINCT()
DISTINCT.
|
SELECT |
EXCEPT(SELECT exceptSelect)
EXCEPT.
|
ResultSet |
execute(Object... parameters) |
Object |
executeSingle(Object... parameters)
Execute single.
|
SELECT |
FETCH_FIRST(Integer n)
See SQL:2008 non-core feature IDs F856, F857, F858, and F859.
|
SELECT |
FROM(TableExpression table) |
String |
getAlias()
Gets the alias.
|
List<SqlTableIdentity> |
getClauseTables() |
SELECT |
getExceptSelect()
Gets the except select.
|
Integer |
getFetchFirstRowCount()
Gets the fetch first row count.
|
FROM |
getFromClause() |
GROUP_BY |
getGroupByClause()
Gets the group by clause.
|
HAVING |
getHavingClause()
Gets the having clause.
|
SELECT |
getIntersectSelect()
Gets the intersect select.
|
int |
getJoinCount() |
List<JoinClause> |
getJoins() |
ConditionClause<?> |
getLastConditionClause() |
Integer |
getOffsetSkipCount()
Gets the offset skip count.
|
ORDER_BY |
getOrderByClause()
Gets the order by clause.
|
List<SelectItem> |
getSelectItems()
Gets the select items.
|
SqlClause<?>[] |
getSqlClauses() |
TableExpression |
getTable() |
SELECT |
getUnionAllSelect()
Gets the union all select.
|
SELECT |
getUnionSelect()
Gets the union select.
|
WHERE |
getWhereClause() |
SELECT |
GROUP_BY(Object... groupByFields)
Creates a new GROUP BY clause for this SELECT object using the field list
provided by
orderByFields .See setGroupByClause(GROUP_BY) for setting an GROUP_BY clause object directly. |
SELECT |
HAVING(Object havingCondition)
HAVING.
|
SELECT |
INNER_JOIN(TableExpression table,
Object joinCondition) |
SELECT |
INTERSECT(SELECT intersectSelect)
INTERSECT.
|
boolean |
isDistinct()
Checks if is distinct.
|
SELECT |
items(Object... items)
Items.
|
String |
keyword() |
SELECT |
LEFT_JOIN(TableExpression table,
Object joinCondition) |
SELECT |
OFFSET(Integer offsetRowCount)
OFFSET.
|
SELECT |
OR(Object condition)
OR.
|
SELECT |
ORDER_BY(Object... orderByFields)
Creates a new ORDER BY clause for this SELECT object using the field list
provided by
orderByFields .See setOrderByClause(ORDER_BY) for setting an ORDER_BY clause object directly. |
SELECT |
OUTER_JOIN(TableExpression table,
Object joinCondition) |
SELECT |
pack() |
<C extends JoinClause> |
registerJoinClause(C join) |
SELECT |
RIGHT_JOIN(TableExpression table,
Object joinCondition) |
SELECT |
setAlias(String alias)
Sets the alias.
|
SELECT |
setComment(String comment) |
SELECT |
setDatabaseGateway(DatabaseGateway<?> databaseGateway) |
SELECT |
setDistinct(boolean distinct)
Sets the distinct.
|
SELECT |
setExceptSelect(SELECT exceptSelect)
Sets the except select.
|
SELECT |
setFromClause(FROM fromClause)
Sets the from clause.
|
SELECT |
setGroupByClause(GROUP_BY groupByClause)
Sets the group by clause.
|
SELECT |
setHavingClause(HAVING havingClause)
Sets the having clause.
|
SELECT |
setIntersectSelect(SELECT intersectSelect)
Sets the intersect select.
|
SELECT |
setName(String name) |
SELECT |
setOrderByClause(ORDER_BY orderByClause)
Sets the order by clause.
|
SELECT |
setPacked(boolean packed) |
void |
setSelectItems(List<SelectItem> selectItems)
Sets this SELECT's new selectItems list to the elements of
selectItems |
SELECT |
setSingleLineMode(boolean singleLineMode) |
SELECT |
setUnionAllSelect(SELECT unionAllSelect)
Sets the union all select.
|
SELECT |
setUnionSelect(SELECT unionSelect)
Sets the union select.
|
SELECT |
setWhereClause(WHERE whereClause) |
SELECT |
singleLineMode() |
SqlExpression |
toSqlExpression()
To sql expression.
|
SELECT |
UNION_All(SELECT unionAllSelect)
UNIO n_ all.
|
SELECT |
UNION(SELECT unionSelect)
UNION.
|
SELECT |
WHERE(Object condition) |
getDatabaseGatewayForExecution
assemble, execute, getComment, getCommentLines, getDatabaseGateway, getDMLAssembler, getListeners, getName, isDatabaseGatewaySet, isPacked, isPrepared, isSingleLineMode, listeners, prepare, setListeners, toString
assembleAlias, assembleObject, assembleQuery, bitAsExpression, bitDelimitAliases, bitDelimitColumnIdentifiers, bitDelimitTableIdentifiers, bitEscapeDoubleQuotes, bitMiniIndent, bitOmitAlias, bitPacked, bitQualified, bitQualifyByTable, bitSingleLine, concat, concatSqlExpressions, EscapeQuotes, flagsToString, function, indent, isAsExpression, isDelimitAliases, isDelimitColumnIdentifiers, isDelimitTableIdentifiers, isEscapeDoubleQuotes, isEscapeQuotes, isMiniIndent, isOmitAlias, isPacked, isQualifyByTable, isSingleLine, isUnqualified, list, printFlags, setAsExpression, setDelimitAliases, setDelimitColumnIdentifiers, setDelimitTableIdentifiers, setEscapeDoubleQuotes, setEscapeQuotes, setMiniIndent, setPacked, setQualified, setQualifyByTable, setSingleLine, setUseAlias
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
assemble, getComment, getCommentLines, getDatabaseGatewayForExecution, getListeners, getName, isDatabaseGatewaySet, isPacked, isSingleLineMode, listeners, prepare, setListeners, toString
public SELECT()
public SELECT(SELECT copySource)
public boolean isDistinct()
public SELECT getUnionSelect()
public SELECT getUnionAllSelect()
public SELECT getIntersectSelect()
public SELECT getExceptSelect()
public List<SelectItem> getSelectItems()
public GROUP_BY getGroupByClause()
public HAVING getHavingClause()
public ORDER_BY getOrderByClause()
public Integer getOffsetSkipCount()
public Integer getFetchFirstRowCount()
public SELECT setDistinct(boolean distinct)
distinct
- the distinct to setpublic SELECT setFromClause(FROM fromClause)
setFromClause
in interface ConditionalTableQuery
fromClause
- the from clausepublic SELECT setDatabaseGateway(DatabaseGateway<?> databaseGateway)
setDatabaseGateway
in interface Query
setDatabaseGateway
in class Query.Implementation
databaseGateway
- public SELECT setWhereClause(WHERE whereClause)
setWhereClause
in interface ConditionalTableQuery
whereClause
- public SELECT setGroupByClause(GROUP_BY groupByClause)
groupByClause
- the groupByClause to setpublic SELECT setHavingClause(HAVING havingClause)
havingClause
- the havingClause to setpublic SELECT setOrderByClause(ORDER_BY orderByClause)
orderByClause
- the orderByClause to setpublic SELECT setUnionSelect(SELECT unionSelect)
unionSelect
- the unionSelect to setpublic SELECT setUnionAllSelect(SELECT unionAllSelect)
unionAllSelect
- the unionAllSelect to setpublic SELECT setIntersectSelect(SELECT intersectSelect)
intersectSelect
- the intersectSelect to setpublic SELECT setExceptSelect(SELECT exceptSelect)
exceptSelect
- the exceptSelect to setpublic SELECT setAlias(String alias)
alias
- the alias to setpublic SELECT setName(String name)
setName
in interface Query
setName
in class Query.Implementation
public SELECT setComment(String comment)
setComment
in interface Query
setComment
in class Query.Implementation
public SELECT DISTINCT()
public SELECT columns(Object... columns)
columns
- the columnspublic void clearSelectItems()
public SELECT GROUP_BY(Object... groupByFields)
orderByFields
.setGroupByClause(GROUP_BY)
for setting an GROUP_BY clause object directly. *groupByFields
- the fields to use in the GROUP BY clause of this SELECT object.setGroupByClause(GROUP_BY)
public SELECT HAVING(Object havingCondition)
havingCondition
- the having conditionpublic SELECT ORDER_BY(Object... orderByFields)
orderByFields
.setOrderByClause(ORDER_BY)
for setting an ORDER_BY clause object directly. *orderByFields
- the fields to use in the ORDER BY clause of this SELECT object.setOrderByClause(ORDER_BY)
public SELECT FETCH_FIRST(Integer n)
n
- the npublic SELECT OFFSET(Integer offsetRowCount)
offsetRowCount
- the skippublic SELECT UNION(SELECT unionSelect)
unionSelect
- the union selectpublic SELECT UNION_All(SELECT unionAllSelect)
unionAllSelect
- the union all selectpublic SELECT INTERSECT(SELECT intersectSelect)
intersectSelect
- the intersect selectpublic SELECT EXCEPT(SELECT exceptSelect)
exceptSelect
- the except selectpublic SELECT pack()
pack
in interface Query
pack
in class Query.Implementation
public SELECT setPacked(boolean packed)
setPacked
in interface Query
setPacked
in class Query.Implementation
public SELECT setSingleLineMode(boolean singleLineMode)
setSingleLineMode
in interface Query
setSingleLineMode
in class Query.Implementation
public SELECT singleLineMode()
singleLineMode
in interface Query
singleLineMode
in class Query.Implementation
public String keyword()
public SELECT AS(String newAlias)
TableExpression
AS
in interface TableExpression
newAlias
- TableExpression.AS(java.lang.String)
public ResultSet execute(Object... parameters) throws SQLEngineException
execute
in interface Query
execute
in interface ValueReadingQuery<ResultSet>
execute
in class Query.Implementation
parameters
- SQLEngineException
net.net.jadoth.sqlengine.interfaces.TableQuery#execute(java.lang.Object[])
public TableExpression getTable()
getTable
in interface TableQuery
net.net.jadoth.sqlengine.interfaces.TableQuery#getTable()
protected StringBuilder assemble(DbmsDMLAssembler<?> dmlAssembler, StringBuilder sb, int indentLevel, int flags)
QueryPart
assemble
in class TableQuery.Implementation
dmlAssembler
- sb
- indentLevel
- flags
- net.net.jadoth.sqlengine.interfaces.TableQuery#assemble(com.xdev.jadoth.sqlengine.dbms.DbmsDMLAssembler, java.lang.StringBuilder, int, int)
public SELECT AND(Object condition)
Conditional
AND
in interface Conditional<SELECT>
AND
in interface ConditionalTableQuery
condition
- the conditionpublic SELECT FROM(TableExpression table)
FROM
in interface ConditionalTableQuery
public SELECT INNER_JOIN(TableExpression table, Object joinCondition)
INNER_JOIN
in interface ConditionalTableQuery
public SELECT LEFT_JOIN(TableExpression table, Object joinCondition)
LEFT_JOIN
in interface ConditionalTableQuery
public SELECT OR(Object condition)
Conditional
OR
in interface Conditional<SELECT>
OR
in interface ConditionalTableQuery
condition
- the conditionpublic SELECT OUTER_JOIN(TableExpression table, Object joinCondition)
OUTER_JOIN
in interface ConditionalTableQuery
public SELECT RIGHT_JOIN(TableExpression table, Object joinCondition)
RIGHT_JOIN
in interface ConditionalTableQuery
public SELECT WHERE(Object condition)
WHERE
in interface ConditionalTableQuery
public SELECT addJoinClause(JoinClause joinClause)
addJoinClause
in interface ConditionalTableQuery
public List<SqlTableIdentity> getClauseTables()
getClauseTables
in interface ConditionalTableQuery
public FROM getFromClause()
getFromClause
in interface ConditionalTableQuery
public int getJoinCount()
getJoinCount
in interface ConditionalTableQuery
public List<JoinClause> getJoins()
getJoins
in interface ConditionalTableQuery
public ConditionClause<?> getLastConditionClause()
getLastConditionClause
in interface ConditionalTableQuery
public SqlClause<?>[] getSqlClauses()
getSqlClauses
in interface ConditionalTableQuery
public WHERE getWhereClause()
getWhereClause
in interface ConditionalTableQuery
public <C extends JoinClause> C registerJoinClause(C join) throws SQLEngineMissingFromClauseException
registerJoinClause
in interface ConditionalTableQuery
SQLEngineMissingFromClauseException
public SELECT clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
- is never thrown at the momentpublic String getAlias()
public Object executeSingle(Object... parameters) throws SQLEngineException
parameters
- the parametersSQLEngineException
- the sQL engine exceptionpublic SqlExpression toSqlExpression()
public void setSelectItems(List<SelectItem> selectItems)
selectItems
selectItems
- the selectItems to setpublic void addSelectItems(List<SelectItem> selectItems)
selectItems
via the internal selectitems' implementation of
java.util.List.addAll(Collection)
selectItems
- the selectItems to setpublic void addSelectItem(SelectItem selectItem)
selectItems
- the selectItems to setCopyright © 2003–2023 XDEV Software. All rights reserved.