if (idMap == null) {
// assume null object, and bind all null values
if (sqlColumns == null || idColumns == null) {
throw new ParseErrorException("Invalid parameters. "
+ "Either object has to be set "
+ "or sqlColumns and idColumns or both.");
}
idMap = Collections.EMPTY_MAP;
}
else if (sqlColumns == null || idColumns == null) {
// infer SQL columns from ID columns
sqlColumns = idMap.keySet().toArray();
idColumns = sqlColumns;
}
Object[] sqlColumnsArray = toArray(sqlColumns);
Object[] idColumnsArray = toArray(idColumns);
if (sqlColumnsArray.length != idColumnsArray.length) {
throw new ParseErrorException(
"SQL columns and ID columns arrays have different sizes.");
}
for (int i = 0; i < sqlColumnsArray.length; i++) {