Top Description Fields Constructors Methods
org.hibernate.sql

public Class Select

extends Object
Class Inheritance
Imports
org.hibernate.LockMode, .LockOptions, org.hibernate.dialect.Dialect, org.hibernate.util.StringHelper

A simple SQL SELECT statement
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private String
public final Dialect
private String
private String
private int
private LockOptions
private String
private String
private String
private String
private String

Constructor Summary

AccessConstructor and Description
public
Select(Dialect dialect)

Method Summary

Modifier and TypeMethod and Description
public LockMode

Returns:

LockMode
getLockMode
()

Deprecated Instead use getLockOptions
Get the current lock mode
public LockOptions

Returns:

LockOptions
getLockOptions
()

Get the current lock options

public Select
setComment(String comment)

public Select
setFromClause(String
The fromClause to set
fromClause
)

Sets the fromClause.

public Select
setFromClause(String tableName, String alias)

public Select
setGroupByClause(String groupByClause)

public Select

Returns:

this object
setLockMode
(LockMode lockMode)

Deprecated Instead use setLockOptions
Set the lock mode
public Select

Returns:

this object
setLockOptions
(LockOptions lockOptions)

Set the lock options

public Select
setOrderByClause(String orderByClause)

public Select
setOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)

public Select
setSelectClause(String
The selectClause to set
selectClause
)

Sets the selectClause.

public Select
setWhereClause(String
The whereClause to set
whereClause
)

Sets the whereClause.

public String
toStatementString()

Construct an SQL SELECT statement from the given clauses

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commentback to summary
private String comment
dialectback to summary
public final Dialect dialect
fromClauseback to summary
private String fromClause
groupByClauseback to summary
private String groupByClause
guesstimatedBufferSizeback to summary
private int guesstimatedBufferSize
lockOptionsback to summary
private LockOptions lockOptions
orderByClauseback to summary
private String orderByClause
outerJoinsAfterFromback to summary
private String outerJoinsAfterFrom
outerJoinsAfterWhereback to summary
private String outerJoinsAfterWhere
selectClauseback to summary
private String selectClause
whereClauseback to summary
private String whereClause

Constructor Detail

Selectback to summary
public Select(Dialect dialect)

Method Detail

getLockModeback to summary
public LockMode getLockMode()

Deprecated

Instead use getLockOptions

Get the current lock mode

Returns:LockMode

LockMode

getLockOptionsback to summary
public LockOptions getLockOptions()

Get the current lock options

Returns:LockOptions

LockOptions

setCommentback to summary
public Select setComment(String comment)
setFromClauseback to summary
public Select setFromClause(String fromClause)

Sets the fromClause.

Parameters
fromClause:String

The fromClause to set

setFromClauseback to summary
public Select setFromClause(String tableName, String alias)
setGroupByClauseback to summary
public Select setGroupByClause(String groupByClause)
setLockModeback to summary
public Select setLockMode(LockMode lockMode)

Deprecated

Instead use setLockOptions

Set the lock mode

Returns:Select

this object

setLockOptionsback to summary
public Select setLockOptions(LockOptions lockOptions)

Set the lock options

Returns:Select

this object

setOrderByClauseback to summary
public Select setOrderByClause(String orderByClause)
setOuterJoinsback to summary
public Select setOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)
setSelectClauseback to summary
public Select setSelectClause(String selectClause)

Sets the selectClause.

Parameters
selectClause:String

The selectClause to set

setWhereClauseback to summary
public Select setWhereClause(String whereClause)

Sets the whereClause.

Parameters
whereClause:String

The whereClause to set

toStatementStringback to summary
public String toStatementString()

Construct an SQL SELECT statement from the given clauses