}
protected Map<String, Object> generateRowIdentifiers(RowItem item) {
Map<String, Object> rowIdentifiers = new HashMap<String, Object>();
for (Object id : item.getItemPropertyIds()) {
ColumnProperty cp = (ColumnProperty) item.getItemProperty(id);
/* Prevent "rownum" usage as a column name if MSSQL or ORACLE */
if ((this instanceof MSSQLGenerator || this instanceof OracleGenerator)
&& cp.getPropertyId().equalsIgnoreCase("rownum")) {
continue;
}
if (cp.isRowIdentifier()) {
Object value;
if (cp.isPrimaryKey()) {
// If the value of a primary key has changed, its old value
// should be used to identify the row (#9145)
value = cp.getOldValue();
} else {
value = cp.getValue();
}
rowIdentifiers.put(cp.getPropertyId(), value);
}
}
return rowIdentifiers;
}