statement.setString(1, bindingKey.toString());
int listSize = keyRefs.size();
for (int categoryID = 0; categoryID < listSize; categoryID++)
{
KeyedReference keyRef = (KeyedReference) keyRefs.elementAt(categoryID);
// extract values to insert
String tModelKeyValue = null;
if (keyRef.getTModelKey() != null)
tModelKeyValue = keyRef.getTModelKey().toString();
// set the values
statement.setInt(2, categoryID);
statement.setString(3, tModelKeyValue);
statement.setString(4, keyRef.getKeyName());
statement.setString(5, keyRef.getKeyValue());
if (log.isDebugEnabled()) {
log.debug(
"insert into " + tablePrefix + "BINDING_CATEGORY table:\n\n\t"
+ insertSQL
+ "\n\t BINDING_KEY="
+ bindingKey.toString()
+ "\n\t CATEGORY_ID="
+ categoryID
+ "\n\t TMODEL_KEY_REF="
+ tModelKeyValue
+ "\n\t KEY_NAME="
+ keyRef.getKeyName()
+ "\n\t KEY_VALUE="
+ keyRef.getKeyValue()
+ "\n");
}
// insert
statement.executeUpdate();