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 String
comment
Dialect
dialect
protected String
fromClause
protected String
groupByClause
protected LockOptions
lockOptions
protected String
orderByClause
protected String
outerJoinsAfterFrom
protected String
outerJoinsAfterWhere
protected String
selectClause
protected String
whereClause
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LockMode
getLockMode()
Deprecated.Instead use getLockOptionsLockOptions
getLockOptions()
Get the current lock optionsSelect
setComment(String comment)
Select
setFromClause(String fromClause)
Sets the fromClause.Select
setFromClause(String tableName, String alias)
Select
setGroupByClause(String groupByClause)
Select
setLockMode(LockMode lockMode)
Deprecated.Instead use setLockOptionsSelect
setLockOptions(LockOptions lockOptions)
Set the lock optionsSelect
setOrderByClause(String orderByClause)
Select
setOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)
Select
setSelectClause(String selectClause)
Sets the selectClause.Select
setSelectClause(SelectFragment selectFragment)
Select
setWhereClause(String whereClause)
Sets the whereClause.String
toStatementString()
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
-
-