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

@javax.annotation.Generated( "Domgen" )
@javax.enterprise.context.ApplicationScoped
@javax.transaction.Transactional( javax.transaction.Transactional.TxType.NEVER )
@javax.ws.rs.Path( "/sync" )
@javax.ws.rs.Produces( javax.ws.rs.core.MediaType.APPLICATION_JSON )
public class <%= repository.syncrecord.control_rest_service_name %>
  extends iris.syncrecord.server.rest.AbstractSyncControlService
{
<% repository.syncrecord.sync_methods.collect{|m| m.service}.uniq.each do |service| -%>
  @javax.inject.Inject
  private <%= service.ejb.generate_boundary? ? service.ejb.qualified_boundary_interface_name : service.ejb.qualified_service_name %> _<%= Reality::Naming.camelize(service.qualified_name.gsub('.','')) %>;
<% end -%>
  @javax.ws.rs.GET
  public javax.json.JsonArray syncAll( @javax.ws.rs.QueryParam( "fields" ) @javax.ws.rs.DefaultValue( DEFAULT_FIELDS ) @javax.annotation.Nonnull final org.realityforge.rest.field_filter.FieldFilter filter )
    throws Exception
  {
    return javax.json.Json.createArrayBuilder().
<% repository.syncrecord.sync_methods.each do |method| -%>
      add( <%= Reality::Naming.camelize(method.qualified_name.gsub(/[#\.]/,'')) %>( filter ) ).
<% end -%>
      build();
  }
<% repository.syncrecord.sync_methods.each do |method|
  datasource =
    method.parameters.empty? ?
    "#{method.service.data_module.repository.syncrecord.qualified_datasources_name}.#{Reality::Naming.uppercase_constantize(method.syncrecord.data_source.key)}" :
    "#{Reality::Naming.camelize(method.parameters[0].name)}"

-%>
  @javax.ws.rs.GET
  @javax.ws.rs.Path( <%= datasource %> )
  public javax.json.JsonObject <%= Reality::Naming.camelize(method.qualified_name.gsub(/[#\.]/,'')) %>( @javax.ws.rs.QueryParam( "fields" ) @javax.ws.rs.DefaultValue( DEFAULT_FIELDS ) @javax.annotation.Nonnull final org.realityforge.rest.field_filter.FieldFilter filter )
    throws Exception
  {
    return emitSynchronizationStatus( _<%= Reality::Naming.camelize(method.service.qualified_name.gsub('.','')) %>.<%= Reality::Naming.camelize(method.name) %>(), filter );
  }
<% end -%>
<% if repository.sync? && !repository.sync.standalone? && repository.sync.sync_out_of_master? -%>

  @javax.inject.Inject
  private <%= repository.data_module_by_name(repository.sync.master_data_module).service_by_name(:SynchronizationService).ejb.qualified_service_name %> $_masterToCoreSynchronizationService;

  @javax.ws.rs.GET
  @javax.ws.rs.Path( "/master/{dataSourceCode}" )<commit_msg>Move field to top of class<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(repository.syncrecord.qualified_control_rest_service_name) %>;

@javax.annotation.Generated( "Domgen" )
@javax.enterprise.context.ApplicationScoped
@javax.transaction.Transactional( javax.transaction.Transactional.TxType.NEVER )
@javax.ws.rs.Path( "/sync" )
@javax.ws.rs.Produces( javax.ws.rs.core.MediaType.APPLICATION_JSON )
public class <%= repository.syncrecord.control_rest_service_name %>
  extends iris.syncrecord.server.rest.AbstractSyncControlService
{
<% repository.syncrecord.sync_methods.collect{|m| m.service}.uniq.each do |service| -%>
  @javax.inject.Inject
  private <%= service.ejb.generate_boundary? ? service.ejb.qualified_boundary_interface_name : service.ejb.qualified_service_name %> _<%= Reality::Naming.camelize(service.qualified_name.gsub('.','')) %>;
<% end -%>
<% if repository.sync? && !repository.sync.standalone? && repository.sync.sync_out_of_master? -%>
  @javax.inject.Inject
  private <%= repository.data_module_by_name(repository.sync.master_data_module).service_by_name(:SynchronizationService).ejb.qualified_service_name %> $_masterToCoreSynchronizationService;
<% end -%>

  @javax.ws.rs.GET
  public javax.json.JsonArray syncAll( @javax.ws.rs.QueryParam( "fields" ) @javax.ws.rs.DefaultValue( DEFAULT_FIELDS ) @javax.annotation.Nonnull final org.realityforge.rest.field_filter.FieldFilter filter )
    throws Exception
  {
    return javax.json.Json.createArrayBuilder().
<% repository.syncrecord.sync_methods.each do |method| -%>
      add( <%= Reality::Naming.camelize(method.qualified_name.gsub(/[#\.]/,'')) %>( filter ) ).
<% end -%>
      build();
  }
<% repository.syncrecord.sync_methods.each do |method|
  datasource =
    method.parameters.empty? ?
    "#{method.service.data_module.repository.syncrecord.qualified_datasources_name}.#{Reality::Naming.uppercase_constantize(method.syncrecord.data_source.key)}" :
    "#{Reality::Naming.camelize(method.parameters[0].name)}"

-%>
  @javax.ws.rs.GET
  @javax.ws.rs.Path( <%= datasource %> )
  public javax.json.JsonObject <%= Reality::Naming.camelize(method.qualified_name.gsub(/[#\.]/,'')) %>( @javax.ws.rs.QueryParam( "fields" ) @javax.ws.rs.DefaultValue( DEFAULT_FIELDS ) @javax.annotation.Nonnull final org.realityforge.rest.field_filter.FieldFilter filter )
    throws Exception
  {
    return emitSynchronizationStatus( _<%= Reality::Naming.camelize(method.service.qualified_name.gsub('.','')) %>.<%= Reality::Naming.camelize(method.name) %>(), filter );
  }
<% end -%>
<% if repository.sync? && !repository.sync.standalone? && repository.sync.sync_out_of_master? -%>

  @javax.ws.rs.GET
  @javax.ws.rs.Path( "/master/{dataSourceCode}" )
{'fraction_non_alphanumeric': 0.16536167039522745, 'fraction_numerical': 0.0003728560775540641, 'mean_word_length': 5.495157384987894, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '6344496', 'n_tokens_mistral': 1884, 'n_tokens_neox': 1823, 'n_words': 206}