Package org.hibernate.sql
Class Select
- java.lang.Object
-
- org.hibernate.sql.Select
-
public class Select extends java.lang.Object
A simple SQL SELECT statement
-
-
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(java.lang.String comment)
Select
setFromClause(java.lang.String fromClause)
Sets the fromClause.Select
setFromClause(java.lang.String tableName, java.lang.String alias)
Select
setGroupByClause(java.lang.String groupByClause)
Select
setLockMode(LockMode lockMode)
Deprecated.Instead use setLockOptionsSelect
setLockOptions(LockOptions lockOptions)
Set the lock optionsSelect
setOrderByClause(java.lang.String orderByClause)
Select
setOuterJoins(java.lang.String outerJoinsAfterFrom, java.lang.String outerJoinsAfterWhere)
Select
setSelectClause(java.lang.String selectClause)
Sets the selectClause.Select
setSelectClause(SelectFragment selectFragment)
Select
setWhereClause(java.lang.String whereClause)
Sets the whereClause.java.lang.String
toStatementString()
Construct an SQL SELECT statement from the given clauses
-
-
-
Field Detail
-
dialect
public final Dialect dialect
-
-
Constructor Detail
-
Select
public Select(Dialect dialect)
-
-
Method Detail
-
toStatementString
public java.lang.String toStatementString()
Construct an SQL SELECT statement from the given clauses
-
setFromClause
public Select setFromClause(java.lang.String fromClause)
Sets the fromClause.- Parameters:
fromClause
- The fromClause to set
-
setFromClause
public Select setFromClause(java.lang.String tableName, java.lang.String alias)
-
setOrderByClause
public Select setOrderByClause(java.lang.String orderByClause)
-
setGroupByClause
public Select setGroupByClause(java.lang.String groupByClause)
-
setOuterJoins
public Select setOuterJoins(java.lang.String outerJoinsAfterFrom, java.lang.String outerJoinsAfterWhere)
-
setSelectClause
public Select setSelectClause(java.lang.String selectClause)
Sets the selectClause.- Parameters:
selectClause
- The selectClause to set
-
setSelectClause
public Select setSelectClause(SelectFragment selectFragment)
-
setWhereClause
public Select setWhereClause(java.lang.String whereClause)
Sets the whereClause.- Parameters:
whereClause
- The whereClause to set
-
setComment
public Select setComment(java.lang.String comment)
-
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
-
-