descriptor.setOptimisticLockingPolicy(new ChangedFieldsLockingPolicy());
} else if (m_type.name().equals(OptimisticLockingType.SELECTED_COLUMNS.name())) {
if (m_selectedColumns.isEmpty()) {
throw ValidationException.optimisticLockingSelectedColumnNamesNotSpecified(descriptor.getJavaClass());
} else {
SelectedFieldsLockingPolicy policy = new SelectedFieldsLockingPolicy();
// Process the selectedColumns
for (ColumnMetadata selectedColumn : m_selectedColumns) {
if (selectedColumn.getName().equals("")) {
throw ValidationException.optimisticLockingSelectedColumnNamesNotSpecified(descriptor.getJavaClass());
} else {
policy.addLockFieldName(selectedColumn.getName());
}
}
descriptor.setOptimisticLockingPolicy(policy);
}