Class SelectWithOffsetLimitCommand.Builder
java.lang.Object
com.atlassian.confluence.upgrade.dml.SelectWithOffsetLimitCommand.Builder
- Enclosing class:
- SelectWithOffsetLimitCommand
Builds a 
SelectWithOffsetLimitCommand- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionSet the arguments to be substituted into the query.build()Builds aSelectWithOffsetLimitCommandSet the content of the "from" clause.Set the content of the "group by" clause.Set the content of the "having" clause.insertInto(String insertStatement) Set the insert into statement resulting in an "insert into ...limit(long limit) Set the maximum number of rows returned by the query.offset(long offset) Set the offset of the results returned by the query.Set the content of the "order by" clause.Set the list of columns to select.Set the content of the "where" clause.
- 
Constructor Details- 
Builderpublic Builder(com.atlassian.config.db.HibernateConfig hibernateConfig) 
 
- 
- 
Method Details- 
insertIntoSet the insert into statement resulting in an "insert into ... select" type of query- Parameters:
- insertStatement- the insert string including the table name and optionally the columns without the words "insert into"
- Returns:
- this builder
 
- 
selectSet the list of columns to select. The default value results in aselect *- Parameters:
- selectColumns- a list of columns to select
- Returns:
- this builder
 
- 
select- See Also:
 
- 
fromSet the content of the "from" clause. This includes the table and any joins. Calling this is required.- Parameters:
- fromClause- the from clause, without the word "from"
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if the from clause is blank
 
- 
whereSet the content of the "where" clause. Optional.- Parameters:
- whereClause- the "where" clause, without the word "where"
- Returns:
- this builder
 
- 
groupBySet the content of the "group by" clause. Optional.- Parameters:
- groupByClause- the "group by" clause without the words "group by"
- Returns:
- this builder
 
- 
havingSet the content of the "having" clause. Optional.- Parameters:
- havingClause- the "having" clause, without the word "having"
- Returns:
- this builder
 
- 
orderBySet the content of the "order by" clause. Calling this is required.- Parameters:
- orderByClause- the "order by" clause, without the words "order by"
- Returns:
- this builder
- Throws:
- IllegalArgumentException- if the "order by" clause is blank
 
- 
offsetSet the offset of the results returned by the query. Optional - defaults to 0.- Parameters:
- offset- the numeric offset, starting at 0
- Returns:
- this builder
 
- 
limitSet the maximum number of rows returned by the query. Optional - defaults to returning all rows.- Parameters:
- limit- the maximum number of rows to return
- Returns:
- this builder
 
- 
argumentsSet the arguments to be substituted into the query. Optional - defaults to an empty list.- Parameters:
- arguments- the argument list
- Returns:
- this builder
 
- 
buildBuilds aSelectWithOffsetLimitCommand- Returns:
- a new SelectWithOffsetLimitCommandwith the specified fields
- Throws:
- IllegalArgumentException- if any required fields were not set
 
 
-