Package org.hibernate.sql
Class SimpleSelect
java.lang.Object
org.hibernate.sql.SimpleSelect
- All Implemented Interfaces:
RestrictionRenderingContext
A SQL
SELECT
statement with no table joins.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected LockOptions
protected String
protected List<Restriction>
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a selectionAdds a selection, with an aliasaddColumns
(String[] columnNames) Adds selectionsaddRestriction
(String columnName) Appends a restriction comparing thecolumnName
for equality with a parameteraddRestriction
(String... columnNames) Appends a restriction comparing each name incolumnNames
for equality with a parameteraddRestriction
(String lhs, ComparisonRestriction.Operator op, String rhs) Appends a restriction based on the comparison betweenlhs
andrhs
.addWhereToken
(String condition) Appends a complete where condition.setComment
(String comment) setLockMode
(LockMode lockMode) setLockOptions
(LockOptions lockOptions) setOrderBy
(String orderBy) setTableName
(String tableName) Sets the name of the table we are selecting from
-
Field Details
-
tableName
-
orderBy
-
comment
-
columns
-
aliases
-
restrictions
-
lockOptions
-
-
Constructor Details
-
SimpleSelect
-
-
Method Details
-
makeParameterMarker
- Specified by:
makeParameterMarker
in interfaceRestrictionRenderingContext
-
setTableName
Sets the name of the table we are selecting from -
addColumns
Adds selections -
addColumn
Adds a selection -
addColumn
Adds a selection, with an alias -
addWhereToken
Appends a complete where condition. Thecondition
is added as-is. -
addRestriction
Appends a restriction comparing thecolumnName
for equality with a parameter -
addRestriction
Appends a restriction based on the comparison betweenlhs
andrhs
. Therhs
is checked for parameter marker and processed viaParameterMarkerStrategy
if needed. -
addRestriction
Appends a restriction comparing each name incolumnNames
for equality with a parameter- See Also:
-
setLockOptions
-
setLockMode
-
setOrderBy
-
setComment
-
toStatementString
-