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 Stringprotected LockOptionsprotected Stringprotected List<Restriction> protected String -
Constructor Summary
ConstructorsConstructorDescriptionSimpleSelect(Dialect dialect) SimpleSelect(Dialect dialect, ParameterMarkerStrategy parameterMarkerStrategy) SimpleSelect(SessionFactoryImplementor factory) -
Method Summary
Modifier and TypeMethodDescriptionAdds a selectionAdds a selection, with an aliasaddColumns(String[] columnNames) Adds selectionsaddRestriction(String columnName) Appends a restriction comparing thecolumnNamefor equality with a parameteraddRestriction(String... columnNames) Appends a restriction comparing each name incolumnNamesfor equality with a parameteraddRestriction(String lhs, ComparisonRestriction.Operator op, String rhs) Appends a restriction based on the comparison betweenlhsandrhs.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
-
SimpleSelect
-
SimpleSelect
-
-
Method Details
-
makeParameterMarker
- Specified by:
makeParameterMarkerin 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. Theconditionis added as-is. -
addRestriction
Appends a restriction comparing thecolumnNamefor equality with a parameter- See Also:
-
addRestriction
Appends a restriction based on the comparison betweenlhsandrhs. Therhsis checked for parameter marker and processed viaParameterMarkerStrategyif needed. -
addRestriction
Appends a restriction comparing each name incolumnNamesfor equality with a parameter- See Also:
-
setLockOptions
-
setLockMode
-
setOrderBy
-
setComment
-
toStatementString
-