Constructor and Description |
---|
SelectStatementBuilder(Dialect dialect)
Constructs a select statement builder object.
|
Modifier and Type | Method and Description |
---|---|
void |
appendFromClauseFragment(String fragment)
Appends the from clause fragment.
|
void |
appendFromClauseFragment(String tableName,
String alias)
Appends the specified table name and alias as a from clause fragment.
|
void |
appendOrderByFragment(String ordering)
Appends the "order by" fragment, prefixed by a comma if the "order by" fragment already
exists.
|
void |
appendRestrictions(String restrictions)
Appends the specified restrictions after "cleaning" the specified value
(by trimming and removing 'and ' from beginning and ' and' from the end).
|
void |
appendSelectClauseFragment(String selection)
Appends a select clause fragment
|
void |
setComment(String comment)
Sets the comment for the select statement.
|
void |
setLockMode(LockMode lockMode)
Sets the lock mode for the select statement.
|
void |
setLockOptions(LockOptions lockOptions)
Sets the lock options for the select statement.
|
void |
setOuterJoins(String outerJoinsAfterFrom,
String outerJoinsAfterWhere)
Sets the outer join fragments to be added to the "from" and "where" clauses.
|
String |
toStatementString()
Construct an SQL SELECT statement from the given clauses.
|
public final Dialect dialect
public SelectStatementBuilder(Dialect dialect)
dialect
- The dialect.public void appendSelectClauseFragment(String selection)
selection
- The selection fragmentpublic void appendFromClauseFragment(String fragment)
fragment
- The from cause fragment.public void appendFromClauseFragment(String tableName, String alias)
tableName
- The table name.alias
- The table alias.public void appendRestrictions(String restrictions)
restrictions
- The restrictions.public void setOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)
outerJoinsAfterFrom
- The outer join fragment to be appended to the "from" clause.outerJoinsAfterWhere
- The outer join fragment to be appended to the "where" clause.public void appendOrderByFragment(String ordering)
ordering
- The "order by" fragment to append.public void setComment(String comment)
comment
- The comment.public void setLockMode(LockMode lockMode)
lockMode
- The lock mode.public void setLockOptions(LockOptions lockOptions)
lockOptions
- The lock options.public String toStatementString()
Copyright © 2021 JBoss by Red Hat. All rights reserved.