Class CmsStatementBuilder


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

    Since:
    8.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String fragment, java.lang.Object... params)
      Adds an SQL fragment and zero or more query parameters.
      void add​(java.lang.String fragment, java.util.List<java.lang.Object> params)
      Adds an SQL fragment and zero or more query parameters.
      java.util.List<java.lang.Object> getParameters()
      Returns the list of accumulated query parameters.
      java.lang.String getQuery()
      Returns the accumulated query string.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • add

        public void add​(java.lang.String fragment,
                        java.util.List<java.lang.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​(java.lang.String fragment,
                        java.lang.Object... params)
        Adds an SQL fragment and zero or more query parameters.

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

        public java.util.List<java.lang.Object> getParameters()
        Returns the list of accumulated query parameters.

        Returns:
        the list of accumulated query parameters
      • getQuery

        public java.lang.String getQuery()
        Returns the accumulated query string.

        Returns:
        the accumulated query string