Class BindParams

    • Method Detail

      • reset

        public void reset()
        Reset positioned parameters (usually due to bind parameter expansion).
      • calcQueryPlanHash

        public String calcQueryPlanHash()
        Return the hash that should be included with the query plan.

        This is to handle binding collections to in clauses. The number of values in the collection effects the query (number of bind values) and so must be taken into account when calculating the query hash.

      • copy

        public BindParams copy()
        Return a deep copy of the BindParams.
      • isEmpty

        public boolean isEmpty()
        Return true if there are no bind parameters.
      • size

        public int size()
      • requiresNamedParamsPrepare

        public boolean requiresNamedParamsPrepare()
        Return true if named parameters are being used and they have not yet been ordered. The sql needs to be prepared (named replaced with ?) and the parameters ordered.
      • setNullParameter

        public void setNullParameter​(int position,
                                     int jdbcType)
        Set a null parameter using position.
      • setParameter

        public void setParameter​(int position,
                                 Object value,
                                 int outType)
        Set an In Out parameter using position.
      • setParameter

        public void setParameter​(int position,
                                 Object value)
        Using position set the In value of a parameter. Note that for nulls you must use setNullParameter.
      • registerOut

        public void registerOut​(int position,
                                int outType)
        Register the parameter as an Out parameter using position.
      • setNullParameter

        public void setNullParameter​(String name,
                                     int jdbcType)
        Set a named In parameter that is null.
      • registerOut

        public void registerOut​(String name,
                                int outType)
        Register the named parameter as an Out parameter.
      • setPreparedSql

        public void setPreparedSql​(String preparedSql)
        Set the sql with named parameters replaced with place holder ?.
      • getPreparedSql

        public String getPreparedSql()
        Return the sql with ? place holders (named parameters have been processed and ordered).
      • isSameBindHash

        public boolean isSameBindHash()
        Return true if the bind hash and count has not changed.