public function getFilterByIsChangedCallback( $source )
    {

        $changed = !( $source & self::CHANGED );
        $unchanged = !( $source & self::UNCHANGED );

        if( $changed and $unchanged ) {
            return function() {
                return false;
            };
        }

        if( !$changed and !$unchanged ) {
            return function() {
                return true;
            };
        }

        return function ($entity) use ( $changed ) {
            return $entity->isChanged() !== $changed;
        };

    }