Class CmsStatementBuilder

java.lang.Object
org.opencms.db.CmsStatementBuilder

public class CmsStatementBuilder extends Object
A helper class used to accumulate SQL fragments together with the corresponding query parameters.

Since:
8.0.0
  • Constructor Details

  • Method Details

    • add

      public void add(String fragment, List<Object> params)
      Adds an SQL fragment and zero or more query parameters.

      Parameters:
      fragment - the SQL fragment
      params - the query parameters
    • add

      public void add(String fragment, Object... params)
      Adds an SQL fragment and zero or more query parameters.

      Parameters:
      fragment - the SQL fragment
      params - the query parameters
    • getParameters

      Returns the list of accumulated query parameters.

      Returns:
      the list of accumulated query parameters
    • getQuery

      public String getQuery()
      Returns the accumulated query string.

      Returns:
      the accumulated query string