|
4 | 4 | */ |
5 | 5 | package org.hibernate.sql; |
6 | 6 |
|
7 | | -import java.util.ArrayList; |
8 | | -import java.util.HashMap; |
9 | | -import java.util.HashSet; |
10 | | -import java.util.List; |
11 | | -import java.util.Map; |
12 | | -import java.util.Set; |
13 | | - |
14 | 7 | import org.hibernate.Internal; |
15 | 8 | import org.hibernate.LockMode; |
16 | 9 | import org.hibernate.LockOptions; |
17 | 10 | import org.hibernate.dialect.Dialect; |
18 | 11 | import org.hibernate.engine.jdbc.spi.JdbcServices; |
19 | 12 | import org.hibernate.engine.spi.SessionFactoryImplementor; |
20 | | -import org.hibernate.internal.util.StringHelper; |
21 | 13 | import org.hibernate.sql.ast.internal.ParameterMarkerStrategyStandard; |
22 | 14 | import org.hibernate.sql.ast.spi.ParameterMarkerStrategy; |
23 | 15 |
|
| 16 | +import java.util.ArrayList; |
| 17 | +import java.util.HashMap; |
| 18 | +import java.util.HashSet; |
| 19 | +import java.util.List; |
| 20 | +import java.util.Map; |
| 21 | +import java.util.Set; |
| 22 | + |
24 | 23 | /** |
25 | 24 | * A SQL {@code SELECT} statement with no table joins. |
26 | 25 | * |
|
29 | 28 | @Internal |
30 | 29 | public class SimpleSelect implements RestrictionRenderingContext { |
31 | 30 | protected String tableName; |
32 | | - protected String tableAlias; |
33 | 31 | protected String orderBy; |
34 | 32 | protected String comment; |
35 | 33 |
|
@@ -67,15 +65,7 @@ public String makeParameterMarker() { |
67 | 65 | * Sets the name of the table we are selecting from |
68 | 66 | */ |
69 | 67 | public SimpleSelect setTableName(String tableName) { |
70 | | - return setTableName( tableName, null ); |
71 | | - } |
72 | | - |
73 | | - /** |
74 | | - * Sets the name of the table we are selecting from |
75 | | - */ |
76 | | - public SimpleSelect setTableName(String tableName, String tableAlias) { |
77 | 68 | this.tableName = tableName; |
78 | | - this.tableAlias = tableAlias; |
79 | 69 | return this; |
80 | 70 | } |
81 | 71 |
|
@@ -225,9 +215,6 @@ private void applySelectClause(StringBuilder buf) { |
225 | 215 |
|
226 | 216 | private void applyFromClause(StringBuilder buf) { |
227 | 217 | buf.append( " from " ).append( dialect.appendLockHint( lockOptions, tableName ) ); |
228 | | - if ( StringHelper.isNotEmpty( tableAlias ) ) { |
229 | | - buf.append( " as " ).append( tableAlias ); |
230 | | - } |
231 | 218 | } |
232 | 219 |
|
233 | 220 | private void applyWhereClause(StringBuilder buf) { |
|
0 commit comments