<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(data_module.jpa.qualified_abstract_test_factory_name) %>;

@javax.annotation.Generated( "Domgen" )
@java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings( { "CE_CLASS_ENVY" } )
public abstract class <%= data_module.jpa.abstract_test_factory_name %>
{
  private final com.google.inject.Injector _injector;

  protected <%= data_module.jpa.abstract_test_factory_name %>( @javax.annotation.Nonnull final com.google.inject.Injector injector )
  {
    _injector = injector;
  }
<% if data_module.repository.jpa.include_default_unit? -%>

  @javax.annotation.Nonnull
  protected final javax.persistence.EntityManager em()
  {
    return getInjector().getInstance( com.google.inject.Key.get( javax.persistence.EntityManager.class, com.google.inject.name.Names.named( <%= data_module.repository.jpa.qualified_unit_descriptor_name %>.NAME ) ) );
  }
<% end -%>

<% data_module.repository.data_modules.select{|dm|dm.jpa? && dm.jpa.generate_test_factory? && dm.name != data_module.name}.each do |dm| -%>

  protected final <%= dm.jpa.qualified_test_factory_name %> <%= Reality::Naming.camelize(dm.name) %>()
  {
    return s( <%= dm.jpa.qualified_test_factory_name %>.class );
  }

<% end -%>
<% data_module.entities.select{|e|e.jpa?}.each do |entity| -%>
<% if entity.concrete? -%>
<% entity.jpa.create_defaults.select{|d| !entity.jpa.test_create_defaults.any?{|v| v.values.keys.sort == d.values.keys.sort}}.each do |defaults| -%>
  @javax.annotation.Nonnull
  public final <%= entity.jpa.qualified_name %> create<%= entity.name %>( <%= entity.attributes.select{|a| !a.generated_value? && a.jpa? && a.jpa.persistent? && !defaults.has_attribute?(a.name) }.collect{|a| "#{annotated_type(a, :jpa, :default, :final => true)} #{Reality::Naming.camelize(a.name)}"}.join(', ') %>)
  {
    return <%= Reality::Naming.camelize(entity.dao.jpa.dao_service_name) %>().create( <%= entity.attributes.select{|a|!a.generated_value? && a.jpa? && a.jpa.persistent?}.collect {|a| defaults.has_attribute?(a.name) ? defaults.value_for(a.name) : Reality::Naming.camelize(a.name) }.join(', ') %> );
  }

<% end -%>
<% entity.jpa.test_create_defaults.select{|defaults|!defaults.ignore?}.each do |defaults| -%><commit_msg>Add nullability annotation<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(data_module.jpa.qualified_abstract_test_factory_name) %>;

@javax.annotation.Generated( "Domgen" )
@java.lang.SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings( { "CE_CLASS_ENVY" } )
public abstract class <%= data_module.jpa.abstract_test_factory_name %>
{
  private final com.google.inject.Injector _injector;

  protected <%= data_module.jpa.abstract_test_factory_name %>( @javax.annotation.Nonnull final com.google.inject.Injector injector )
  {
    _injector = injector;
  }
<% if data_module.repository.jpa.include_default_unit? -%>

  @javax.annotation.Nonnull
  protected final javax.persistence.EntityManager em()
  {
    return getInjector().getInstance( com.google.inject.Key.get( javax.persistence.EntityManager.class, com.google.inject.name.Names.named( <%= data_module.repository.jpa.qualified_unit_descriptor_name %>.NAME ) ) );
  }
<% end -%>

<% data_module.repository.data_modules.select{|dm|dm.jpa? && dm.jpa.generate_test_factory? && dm.name != data_module.name}.each do |dm| -%>

  @javax.annotation.Nonnull
  protected final <%= dm.jpa.qualified_test_factory_name %> <%= Reality::Naming.camelize(dm.name) %>()
  {
    return s( <%= dm.jpa.qualified_test_factory_name %>.class );
  }

<% end -%>
<% data_module.entities.select{|e|e.jpa?}.each do |entity| -%>
<% if entity.concrete? -%>
<% entity.jpa.create_defaults.select{|d| !entity.jpa.test_create_defaults.any?{|v| v.values.keys.sort == d.values.keys.sort}}.each do |defaults| -%>
  @javax.annotation.Nonnull
  public final <%= entity.jpa.qualified_name %> create<%= entity.name %>( <%= entity.attributes.select{|a| !a.generated_value? && a.jpa? && a.jpa.persistent? && !defaults.has_attribute?(a.name) }.collect{|a| "#{annotated_type(a, :jpa, :default, :final => true)} #{Reality::Naming.camelize(a.name)}"}.join(', ') %>)
  {
    return <%= Reality::Naming.camelize(entity.dao.jpa.dao_service_name) %>().create( <%= entity.attributes.select{|a|!a.generated_value? && a.jpa? && a.jpa.persistent?}.collect {|a| defaults.has_attribute?(a.name) ? defaults.value_for(a.name) : Reality::Naming.camelize(a.name) }.join(', ') %> );
  }

<% end -%>
<% entity.jpa.test_create_defaults.select{|defaults|!defaults.ignore?}.each do |defaults| -%>
{'fraction_non_alphanumeric': 0.18613061050840246, 'fraction_numerical': 0.0, 'mean_word_length': 5.31989247311828, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 47, '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': '2977328', 'n_tokens_mistral': 1759, 'n_tokens_neox': 1668, 'n_words': 215}