Package org.hibernate.sql
Class Select
- java.lang.Object
-
- org.hibernate.sql.Select
-
public class Select extends Object
A simple SQL SELECT statement
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcommentDialectdialectprotected StringfromClauseprotected StringgroupByClauseprotected LockOptionslockOptionsprotected StringorderByClauseprotected StringouterJoinsAfterFromprotected StringouterJoinsAfterWhereprotected StringselectClauseprotected StringwhereClause
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LockModegetLockMode()Deprecated.Instead use getLockOptionsLockOptionsgetLockOptions()Get the current lock optionsSelectsetComment(String comment)SelectsetFromClause(String fromClause)Sets the fromClause.SelectsetFromClause(String tableName, String alias)SelectsetGroupByClause(String groupByClause)SelectsetLockMode(LockMode lockMode)Deprecated.Instead use setLockOptionsSelectsetLockOptions(LockOptions lockOptions)Set the lock optionsSelectsetOrderByClause(String orderByClause)SelectsetOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)SelectsetSelectClause(String selectClause)Sets the selectClause.SelectsetSelectClause(SelectFragment selectFragment)SelectsetWhereClause(String whereClause)Sets the whereClause.StringtoStatementString()Construct an SQL SELECT statement from the given clauses
-
-
-
Field Detail
-
selectClause
protected String selectClause
-
fromClause
protected String fromClause
-
outerJoinsAfterFrom
protected String outerJoinsAfterFrom
-
whereClause
protected String whereClause
-
outerJoinsAfterWhere
protected String outerJoinsAfterWhere
-
orderByClause
protected String orderByClause
-
groupByClause
protected String groupByClause
-
comment
protected String comment
-
lockOptions
protected LockOptions lockOptions
-
dialect
public final Dialect dialect
-
-
Constructor Detail
-
Select
public Select(Dialect dialect)
-
-
Method Detail
-
toStatementString
public String toStatementString()
Construct an SQL SELECT statement from the given clauses
-
setFromClause
public Select setFromClause(String fromClause)
Sets the fromClause.- Parameters:
fromClause- The fromClause to set
-
setSelectClause
public Select setSelectClause(String selectClause)
Sets the selectClause.- Parameters:
selectClause- The selectClause to set
-
setSelectClause
public Select setSelectClause(SelectFragment selectFragment)
-
setWhereClause
public Select setWhereClause(String whereClause)
Sets the whereClause.- Parameters:
whereClause- The whereClause to set
-
getLockMode
@Deprecated public LockMode getLockMode()
Deprecated.Instead use getLockOptionsGet the current lock mode- Returns:
- LockMode
-
setLockMode
@Deprecated public Select setLockMode(LockMode lockMode)
Deprecated.Instead use setLockOptionsSet the lock mode- Parameters:
lockMode-- Returns:
- this object
-
getLockOptions
public LockOptions getLockOptions()
Get the current lock options- Returns:
- LockOptions
-
setLockOptions
public Select setLockOptions(LockOptions lockOptions)
Set the lock options- Parameters:
lockOptions-- Returns:
- this object
-
-