private EntryEventType getCQCEventTypeOrNull ( EntryEventType eventType , EventFilter eventFilter , Data dataKey , Data dataNewValue , Data dataOldValue , String mapName ) { boolean newValueMatching = filteringStrategy . doFilter ( eventFilter , dataKey , dataOldValue , dataNewValue , eventType , mapName ) != FilteringStrategy . FILTER_DOES_NOT_MATCH ; if ( eventType == UPDATED ) { // UPDATED event has a special handling as it might result in either ADDING or REMOVING an entry to/from CQC // depending on a predicate boolean oldValueMatching = filteringStrategy . doFilter ( eventFilter , dataKey , null , dataOldValue , EntryEventType . ADDED , mapName ) != FilteringStrategy . FILTER_DOES_NOT_MATCH ; if ( oldValueMatching ) { if ( ! newValueMatching ) { eventType = REMOVED ; } } else { if ( newValueMatching ) { eventType = ADDED ; } else { //neither old value nor new value is matching -> it's a non-event for the CQC return null ; } } } else if ( ! newValueMatching ) { return null ; } return eventType ; }
other filtering strategy is in place