Package org.apache.empire.db
Class DBCmdParamList
java.lang.Object
org.apache.empire.db.DBCmdParamList
- All Implemented Interfaces:
Iterable<DBCmdParam>,DBCmdParams
DBCmdParamList
This class handles command parameters for Prepared Statements
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<DBCmdParam>protected static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(DBCmdParam param) voidvoidclear(int capacity) voidinternally used to remove unused Command Params from list Note: Only one thread my generate an SQL statementObject[]booleanisEmpty()iterator()voidmergeSubqueryParams(DBCmdParams subQueryParams) Used to merge CmdParams from a subquery with the current command params listprotected voidnotifyParamUsage(DBCmdParam param) internally used to reorder the command params to match their order of occurancevoidremove(DBCmdParam param) voidresetParamUsage(DBCommand cmd) internally used to reset the command param usage count.intsize()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
log
protected static final org.slf4j.Logger log -
cmdParams
-
-
Constructor Details
-
DBCmdParamList
public DBCmdParamList() -
DBCmdParamList
-
DBCmdParamList
public DBCmdParamList(int size)
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceDBCmdParams
-
size
public int size()- Specified by:
sizein interfaceDBCmdParams
-
iterator
- Specified by:
iteratorin interfaceIterable<DBCmdParam>
-
clear
public void clear(int capacity) -
add
-
add
-
remove
-
getParamValues
-
resetParamUsage
internally used to reset the command param usage count. Note: Only one thread my generate an SQL statement- Parameters:
cmd- the command object
-
completeParamUsage
internally used to remove unused Command Params from list Note: Only one thread my generate an SQL statement- Parameters:
cmd- the command object
-
mergeSubqueryParams
Used to merge CmdParams from a subquery with the current command params list- Parameters:
subQueryParams- the subquery params
-
notifyParamUsage
internally used to reorder the command params to match their order of occurance- Parameters:
param- the param being used
-