类 SelectStatementBuilder
- java.lang.Object
-
- org.hibernate.loader.plan.exec.query.internal.SelectStatementBuilder
-
-
构造器概要
构造器 构造器 说明 SelectStatementBuilder(Dialect dialect)Constructs a select statement builder object.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidappendFromClauseFragment(String fragment)Appends the from clause fragment.voidappendFromClauseFragment(String tableName, String alias)Appends the specified table name and alias as a from clause fragment.voidappendOrderByFragment(String ordering)Appends the "order by" fragment, prefixed by a comma if the "order by" fragment already exists.voidappendRestrictions(String restrictions)Appends the specified restrictions after "cleaning" the specified value (by trimming and removing 'and ' from beginning and ' and' from the end).voidappendSelectClauseFragment(String selection)Appends a select clause fragmentvoidsetComment(String comment)Sets the comment for the select statement.voidsetLockMode(LockMode lockMode)Sets the lock mode for the select statement.voidsetLockOptions(LockOptions lockOptions)Sets the lock options for the select statement.voidsetOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)Sets the outer join fragments to be added to the "from" and "where" clauses.StringtoStatementString()Construct an SQL SELECT statement from the given clauses.
-
-
-
字段详细资料
-
dialect
public final Dialect dialect
-
-
构造器详细资料
-
SelectStatementBuilder
public SelectStatementBuilder(Dialect dialect)
Constructs a select statement builder object.- 参数:
dialect- The dialect.
-
-
方法详细资料
-
appendSelectClauseFragment
public void appendSelectClauseFragment(String selection)
Appends a select clause fragment- 参数:
selection- The selection fragment
-
appendFromClauseFragment
public void appendFromClauseFragment(String fragment)
Appends the from clause fragment.- 参数:
fragment- The from cause fragment.
-
appendFromClauseFragment
public void appendFromClauseFragment(String tableName, String alias)
Appends the specified table name and alias as a from clause fragment.- 参数:
tableName- The table name.alias- The table alias.
-
appendRestrictions
public void appendRestrictions(String restrictions)
Appends the specified restrictions after "cleaning" the specified value (by trimming and removing 'and ' from beginning and ' and' from the end). If the where clause already exists, this method ensure that ' and ' prefixes the cleaned restrictions.- 参数:
restrictions- The restrictions.
-
setOuterJoins
public void setOuterJoins(String outerJoinsAfterFrom, String outerJoinsAfterWhere)
Sets the outer join fragments to be added to the "from" and "where" clauses.- 参数:
outerJoinsAfterFrom- The outer join fragment to be appended to the "from" clause.outerJoinsAfterWhere- The outer join fragment to be appended to the "where" clause.
-
appendOrderByFragment
public void appendOrderByFragment(String ordering)
Appends the "order by" fragment, prefixed by a comma if the "order by" fragment already exists.- 参数:
ordering- The "order by" fragment to append.
-
setComment
public void setComment(String comment)
Sets the comment for the select statement.- 参数:
comment- The comment.
-
setLockMode
public void setLockMode(LockMode lockMode)
Sets the lock mode for the select statement.- 参数:
lockMode- The lock mode.
-
setLockOptions
public void setLockOptions(LockOptions lockOptions)
Sets the lock options for the select statement.- 参数:
lockOptions- The lock options.
-
toStatementString
public String toStatementString()
Construct an SQL SELECT statement from the given clauses.- 返回:
- the SQL SELECT statement.
-
-