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

public class <%= repository.imit.client_session_name %>
  extends org.realityforge.replicant.client.transport.ClientSession<<%= repository.imit.client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>>
  implements <%= repository.imit.qualified_client_session_interface_name %>
{
  public <%= repository.imit.client_session_name %>( @javax.annotation.Nonnull final org.realityforge.replicant.client.transport.AbstractDataLoaderService<<%= repository.imit.client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>> dataLoaderService, @javax.annotation.Nonnull final String sessionID )
  {
    super( dataLoaderService, sessionID );
  }

<%
  repository.imit.graphs.each do |graph|
  key = "#{repository.imit.qualified_graph_enum_name}.#{Domgen::Naming.uppercase_constantize(graph.name)}"
  graph_id = "null"
  cache_key = "null"
  graph_id_param = nil
  if graph.instance_root?
    entity = repository.entity_by_name(graph.instance_root)
    graph_id = "#{Domgen::Naming.camelize(entity.name)}#{entity.primary_key.name}"
    graph_id_param = "final #{Domgen::Java.java_type(entity.primary_key, :imit, :default)} #{graph_id}"
  elsif graph.cacheable?
    cache_key = "#{key}.name()"
  end
  filter_type = graph.filter_parameter ? "#{nullability_annotation(graph.filter_parameter.nullable?)} final #{Domgen::Java.java_type(graph.filter_parameter, :imit, :default)}" : nil
  filter_var = filter_type ? 'filter': 'null'
  filter_param = filter_type ? "#{filter_type} #{filter_var}" : nil
  std_param = "@javax.annotation.Nullable final Runnable action"
%>
  @Override
  public boolean isSubscribedTo<%= graph.name %>(<%= graph_id_param %>)
  {
    return isSubscribed( <%= key %><%= graph.instance_root? ? ", #{graph_id}" : '' %> );
  }

  @Override
  public void subscribeTo<%= graph.name %>(<%= [graph_id_param, filter_param, std_param].compact.join(", ") %>)
  {
    requestSubscribe( <%= key %>, <%= graph_id %>, <%= cache_key %>, <%= filter_var %>, action);
  }

<% if graph.filter_parameter %>
  public void update<%= graph.name %>Subscription(<%= [graph_id_param, filter_param, std_param].compact.join(", ") %>)
  {
    requestSubscriptionUpdate( <%= key %>, <%= graph_id %>, filter, action );
  }
<% end %>

  @Override
  public void unsubscribeFrom<%= graph.name %>(<%= [graph_id_param, std_param].compact.join(", ") %>)
  {
    requestUnsubscribe( <%= key %>, <%= graph_id %>, action );
  }

<% end %>
}<commit_msg>Whitespace cleanup<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.imit.qualified_client_session_name) %>;

public class <%= repository.imit.client_session_name %>
  extends org.realityforge.replicant.client.transport.ClientSession<<%= repository.imit.client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>>
  implements <%= repository.imit.qualified_client_session_interface_name %>
{
  public <%= repository.imit.client_session_name %>( @javax.annotation.Nonnull final org.realityforge.replicant.client.transport.AbstractDataLoaderService<<%= repository.imit.client_session_name %>, <%= repository.imit.qualified_graph_enum_name %>> dataLoaderService, @javax.annotation.Nonnull final String sessionID )
  {
    super( dataLoaderService, sessionID );
  }

<%
  repository.imit.graphs.each do |graph|
  key = "#{repository.imit.qualified_graph_enum_name}.#{Domgen::Naming.uppercase_constantize(graph.name)}"
  graph_id = "null"
  cache_key = "null"
  graph_id_param = nil
  if graph.instance_root?
    entity = repository.entity_by_name(graph.instance_root)
    graph_id = "#{Domgen::Naming.camelize(entity.name)}#{entity.primary_key.name}"
    graph_id_param = "final #{Domgen::Java.java_type(entity.primary_key, :imit, :default)} #{graph_id}"
  elsif graph.cacheable?
    cache_key = "#{key}.name()"
  end
  filter_type = graph.filter_parameter ? "#{nullability_annotation(graph.filter_parameter.nullable?)} final #{Domgen::Java.java_type(graph.filter_parameter, :imit, :default)}" : nil
  filter_var = filter_type ? 'filter': 'null'
  filter_param = filter_type ? "#{filter_type} #{filter_var}" : nil
  std_param = "@javax.annotation.Nullable final Runnable action"
-%>
  @Override
  public boolean isSubscribedTo<%= graph.name %>(<%= graph_id_param %>)
  {
    return isSubscribed( <%= key %><%= graph.instance_root? ? ", #{graph_id}" : '' %> );
  }

  @Override
  public void subscribeTo<%= graph.name %>(<%= [graph_id_param, filter_param, std_param].compact.join(", ") %>)
  {
    requestSubscribe( <%= key %>, <%= graph_id %>, <%= cache_key %>, <%= filter_var %>, action);
  }

<% if graph.filter_parameter -%>
  public void update<%= graph.name %>Subscription(<%= [graph_id_param, filter_param, std_param].compact.join(", ") %>)
  {
    requestSubscriptionUpdate( <%= key %>, <%= graph_id %>, filter, action );
  }

<% end -%>
  @Override
  public void unsubscribeFrom<%= graph.name %>(<%= [graph_id_param, std_param].compact.join(", ") %>)
  {
    requestUnsubscribe( <%= key %>, <%= graph_id %>, action );
  }
<% end -%>
}
{'fraction_non_alphanumeric': 0.1673753382296096, 'fraction_numerical': 0.0, 'mean_word_length': 5.3967861557478365, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3742491', 'n_tokens_mistral': 1780, 'n_tokens_neox': 1670, 'n_words': 273}