public static ProcessedInformationEntry resolveValidationTargetEntry(
Map<String, ProcessedInformationEntry> keyToConvertedValueMapping,
String targetKey, CrossValidationStorageEntry crossValidationStorageEntry)
{
ProcessedInformationEntry processedInformationEntry =
keyToConvertedValueMapping.get(targetKey);
//simple case
if (processedInformationEntry.getFurtherEntries() == null)
{
return processedInformationEntry;
}
PropertyDetails propertyDetails = crossValidationStorageEntry.getMetaDataEntry()
.getProperty(PropertyInformationKeys.PROPERTY_DETAILS, PropertyDetails.class);
Object targetBean = propertyDetails.getBaseObject();
//process complex component entries (e.g. a table)
//supported: cross-component but no cross-entity validation (= locale validation)
if (processedInformationEntry.getBean().equals(targetBean))
{
return processedInformationEntry;
}
for (ProcessedInformationEntry entry : processedInformationEntry.getFurtherEntries())
{
if (entry.getBean().equals(targetBean))
{
return entry;
}