<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_data_loader_service_name) %>;

public abstract class <%= repository.imit.data_loader_service_name %>
  extends org.realityforge.replicant.client.json.gwt.GwtDataLoaderService<<%= repository.imit.qualified_client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>>
{
  protected <%= repository.imit.data_loader_service_name %>( @javax.annotation.Nonnull final org.realityforge.replicant.client.ChangeMapper changeMapper, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityChangeBroker changeBroker, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityRepository repository, @javax.annotation.Nonnull final org.realityforge.replicant.client.transport.CacheService cacheService, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntitySubscriptionManager subscriptionManager, @javax.annotation.Nonnull final org.realityforge.replicant.client.json.gwt.ReplicantConfig replicantConfig )
  {
    super( changeMapper, changeBroker, repository, cacheService, subscriptionManager, replicantConfig );
  }

  @javax.annotation.Nonnull
  @Override
  protected <%= repository.imit.qualified_graph_enum_name %> channelToGraph( final int channel )
    throws IllegalArgumentException
  {
    return <%= repository.imit.qualified_graph_enum_name %>.values()[ channel ];
  }

  protected int updateSubscriptionForFilteredEntities( final <%= repository.imit.qualified_graph_enum_name %> graph,
                                                       final Object subChannelID,
                                                       final Object filter,
                                                       final org.realityforge.replicant.client.ChannelSubscriptionEntry graphEntry )
  {
    <% repository.imit.graphs.select{|g| g.filtered? }.each do |graph|
-%>if( graph == <%= repository.imit.qualified_graph_enum_name %>.<%= Domgen::Naming.uppercase_constantize(graph.name) %> )
    {
      int removedEntities = 0;
<% graph.reachable_entities.reverse.each do |entity| -%>
      {
        final java.util.Map<Object, org.realityforge.replicant.client.EntitySubscriptionEntry> map = graphEntry.getEntities().get( <%= repository.entity_by_name(entity).imit.qualified_name %>.class );
        if( null != map )
        {
          removedEntities += updateSubscriptionForFilteredEntities( graph, subChannelID, filter, map.values() );
        }
      }
<% end -%>
      return removedEntities;
    }
    else <% end
-%>

    {
      throw new IllegalStateException();
    }
  }

  @Override
  protected <%= repository.imit.qualified_repository_debugger_name %> getEntityRepositoryDebugger()
  {
    return new <%= repository.imit.qualified_repository_debugger_name %>();<commit_msg>Update to the next version of replicant<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_data_loader_service_name) %>;

public abstract class <%= repository.imit.data_loader_service_name %>
  extends org.realityforge.replicant.client.json.gwt.GwtDataLoaderService<<%= repository.imit.qualified_client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>>
{
  protected <%= repository.imit.data_loader_service_name %>( @javax.annotation.Nonnull final org.realityforge.replicant.client.ChangeMapper changeMapper, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityChangeBroker changeBroker, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntityRepository repository, @javax.annotation.Nonnull final org.realityforge.replicant.client.transport.CacheService cacheService, @javax.annotation.Nonnull final org.realityforge.replicant.client.EntitySubscriptionManager subscriptionManager, @javax.annotation.Nonnull final org.realityforge.replicant.client.json.gwt.ReplicantConfig replicantConfig )
  {
    super( changeMapper, changeBroker, repository, cacheService, subscriptionManager, replicantConfig );
  }

  @javax.annotation.Nonnull
  @Override
  protected <%= repository.imit.qualified_graph_enum_name %> channelToGraph( final int channel )
    throws IllegalArgumentException
  {
    return <%= repository.imit.qualified_graph_enum_name %>.values()[ channel ];
  }

  @Override
  protected int updateSubscriptionForFilteredEntities( @javax.annotation.Nonnull final org.realityforge.replicant.client.ChannelSubscriptionEntry entry, @javax.annotation.Nullable final Object filter )
  {
    <% repository.imit.graphs.select{|g| g.filtered? }.each do |graph|
-%>if( entry.getDescriptor().getGraph() == <%= repository.imit.qualified_graph_enum_name %>.<%= Domgen::Naming.uppercase_constantize(graph.name) %> )
    {
      int removedEntities = 0;
<% graph.reachable_entities.reverse.each do |entity| -%>
      {
        final java.util.Map<Object, org.realityforge.replicant.client.EntitySubscriptionEntry> map = entry.getEntities().get( <%= repository.entity_by_name(entity).imit.qualified_name %>.class );
        if( null != map )
        {
          removedEntities += updateSubscriptionForFilteredEntities( entry, filter, map.values() );
        }
      }
<% end -%>
      return removedEntities;
    }
    else <% end
-%>

    {
      throw new IllegalStateException();
    }
  }

  @Override
  protected <%= repository.imit.qualified_repository_debugger_name %> getEntityRepositoryDebugger()
  {
    return new <%= repository.imit.qualified_repository_debugger_name %>();
{'fraction_non_alphanumeric': 0.11024619840695149, 'fraction_numerical': 0.0003620564808110065, 'mean_word_length': 4.292145593869732, 'pattern_counts': {'":': 0, '<': 40, '<?xml version=': 0, '>': 40, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6075896', 'n_tokens_mistral': 1604, 'n_tokens_neox': 1530, 'n_words': 252}