Package org.opencms.db
Class CmsStatementBuilder
java.lang.Object
org.opencms.db.CmsStatementBuilder
A helper class used to accumulate SQL fragments together with the corresponding query parameters.
- Since:
- 8.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an SQL fragment and zero or more query parameters.void
Adds an SQL fragment and zero or more query parameters.Returns the list of accumulated query parameters.getQuery()
Returns the accumulated query string.
-
Constructor Details
-
CmsStatementBuilder
public CmsStatementBuilder()
-
-
Method Details
-
add
Adds an SQL fragment and zero or more query parameters.- Parameters:
fragment
- the SQL fragmentparams
- the query parameters
-
add
Adds an SQL fragment and zero or more query parameters.- Parameters:
fragment
- the SQL fragmentparams
- the query parameters
-
getParameters
Returns the list of accumulated query parameters.- Returns:
- the list of accumulated query parameters
-
getQuery
Returns the accumulated query string.- Returns:
- the accumulated query string
-