Class DBCmdParamList

java.lang.Object
org.apache.empire.db.DBCmdParamList
All Implemented Interfaces:
Iterable<DBCmdParam>, DBCmdParams

public class DBCmdParamList extends Object implements DBCmdParams
DBCmdParamList This class handles command parameters for Prepared Statements
  • Field Details

    • log

      protected static final org.slf4j.Logger log
    • cmdParams

      protected ArrayList<DBCmdParam> cmdParams
  • Constructor Details

    • DBCmdParamList

      public DBCmdParamList()
    • DBCmdParamList

      public DBCmdParamList(DBCmdParams initial)
    • DBCmdParamList

      public DBCmdParamList(int size)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface DBCmdParams
    • size

      public int size()
      Specified by:
      size in interface DBCmdParams
    • iterator

      public Iterator<DBCmdParam> iterator()
      Specified by:
      iterator in interface Iterable<DBCmdParam>
    • clear

      public void clear(int capacity)
    • add

      public void add(DBCmdParam param)
    • add

      public void add(DBCommand cmd, DataType type, Object value)
    • remove

      public void remove(DBCmdParam param)
    • getParamValues

      public Object[] getParamValues()
    • resetParamUsage

      public void resetParamUsage(DBCommand cmd)
      internally used to reset the command param usage count. Note: Only one thread my generate an SQL statement
      Parameters:
      cmd - the command object
    • completeParamUsage

      public void completeParamUsage(DBCommand cmd)
      internally used to remove unused Command Params from list Note: Only one thread my generate an SQL statement
      Parameters:
      cmd - the command object
    • mergeSubqueryParams

      public void mergeSubqueryParams(DBCmdParams subQueryParams)
      Used to merge CmdParams from a subquery with the current command params list
      Parameters:
      subQueryParams - the subquery params
    • notifyParamUsage

      protected void notifyParamUsage(DBCmdParam param)
      internally used to reorder the command params to match their order of occurance
      Parameters:
      param - the param being used