if (dynamic) {
// for each column in the database, create a field
List<String> fieldNameList = new ArrayList<String>();
for (String columnName: table.getColumnNames()) {
Column storeColumn = table.getColumn(columnName);
DomainFieldHandlerImpl domainFieldHandler = null;
domainFieldHandler =
new DomainFieldHandlerImpl(this, table, numberOfFields++, storeColumn);
String fieldName = domainFieldHandler.getName();
fieldNameList.add(fieldName);
fieldNameToNumber.put(domainFieldHandler.getName(), domainFieldHandler.getFieldNumber());
persistentFieldHandlers.add(domainFieldHandler);
if (!storeColumn.isPrimaryKey()) {
nonPKFieldHandlers.add(domainFieldHandler);
}
}
fieldNames = fieldNameList.toArray(new String[fieldNameList.size()]);
} else {