<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(dao.arez.qualified_repository_name) %>;

@javax.annotation.Generated( "Domgen" )
@arez.annotations.ArezComponent( name = "<%= dao.data_module.name %>_<%= dao.name %>", service = arez.annotations.Feature.ENABLE, sting = arez.annotations.Feature.ENABLE )
@java.lang.SuppressWarnings( { "PMD.LocalVariableNamingConventions", "JavaDoc" } )
public abstract class <%= dao.arez.repository_name %>
  extends arez.component.internal.AbstractRepository<java.lang.Integer, <%= dao.entity.arez.qualified_name %>, <%= dao.arez.repository_name %>>
<% unless dao.arez.extensions.empty? -%>
  implements <%= dao.arez.extensions.join(', ') %>
<% end -%>
{
  @arez.annotations.Action
  @javax.annotation.Nonnull
  public <%= dao.entity.arez.qualified_name %> create( <%= (dao.entity.attributes.select{|attribute| attribute.immutable? && attribute.arez?}.collect { |attribute| "#{annotated_type(attribute, :arez, attribute.reference? ? :transport : :default, :final => true, :assume_generated => true)} #{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"} + dao.entity.attributes.select{|attribute| !attribute.immutable? && attribute.arez?}.collect { |attribute| "#{annotated_type(attribute, :arez, attribute.reference? ? :transport : :default, :final => true, :assume_generated => true)} #{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"}).join(', ') %> )
  {
    final <%= dao.entity.arez.qualified_name %> $entity = new <%= dao.entity.arez.qualified_arez_name %>( <%= (dao.entity.attributes.select{|attribute| attribute.immutable? && attribute.arez?}.collect { |attribute| "#{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"} + dao.entity.attributes.select{|attribute| !attribute.immutable? && attribute.arez?}.collect { |attribute| "#{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"}).join(', ') %> );
    attach( $entity );
    return $entity;
  }

  @javax.annotation.Nullable
  public <%= dao.entity.arez.qualified_name %> findBy<%= dao.entity.primary_key.name %>( final int id )
  {
    return findByArezId( id );
  }

  @javax.annotation.Nonnull
  public <%= dao.entity.arez.qualified_name %> getBy<%= dao.entity.primary_key.name %>( final int id )
  {
    return getByArezId( id );
  }

  @java.lang.Override
  @arez.annotations.Action( reportParameters = false )
  public void destroy( @javax.annotation.Nonnull final <%= dao.entity.arez.qualified_name %> entity )
  {
    super.destroy( entity );
  }
<% dao.queries.select{|q|q.arez?}.each do |query| -%>

  <%= nullability_annotation(query.multiplicity == :zero_or_one) %>
  public <%= query_result_type(query) %> <%= Reality::Naming.camelize(query.name) %>(<%= query.parameters.collect {|p| "#{p.arez.primitive? ? '' : nullability_annotation(p.nullable?)} final #{p.arez.java_type} #{Reality::Naming.camelize(p.name)}"}.join(', ') %> )
  {
<%
  if query.multiplicity == :zero_or_one
-%>
    return findByQuery( e -> <%= lambda_query(query) %> );
<%
  elsif query.multiplicity == :one
-%>
    return getByQuery( e -> <%= lambda_query(query) %> );
<%
  elsif query.multiplicity == :many
-%>
    return findAllByQuery( e -> <%= lambda_query(query) %> );
<%
  end
-%>
  }
<% end -%>
}<commit_msg>Avoid the need for transactions when accessing repository when change broker enabled<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= to_package(dao.arez.qualified_repository_name) %>;

@javax.annotation.Generated( "Domgen" )
@arez.annotations.ArezComponent( name = "<%= dao.data_module.name %>_<%= dao.name %>", service = arez.annotations.Feature.ENABLE, sting = arez.annotations.Feature.ENABLE )
@java.lang.SuppressWarnings( { "PMD.LocalVariableNamingConventions", "JavaDoc" } )
public abstract class <%= dao.arez.repository_name %>
  extends arez.component.internal.AbstractRepository<java.lang.Integer, <%= dao.entity.arez.qualified_name %>, <%= dao.arez.repository_name %>>
<% unless dao.arez.extensions.empty? -%>
  implements <%= dao.arez.extensions.join(', ') %>
<% end -%>
{
  @arez.annotations.Action
  @javax.annotation.Nonnull
  public <%= dao.entity.arez.qualified_name %> create( <%= (dao.entity.attributes.select{|attribute| attribute.immutable? && attribute.arez?}.collect { |attribute| "#{annotated_type(attribute, :arez, attribute.reference? ? :transport : :default, :final => true, :assume_generated => true)} #{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"} + dao.entity.attributes.select{|attribute| !attribute.immutable? && attribute.arez?}.collect { |attribute| "#{annotated_type(attribute, :arez, attribute.reference? ? :transport : :default, :final => true, :assume_generated => true)} #{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"}).join(', ') %> )
  {
    final <%= dao.entity.arez.qualified_name %> $entity = new <%= dao.entity.arez.qualified_arez_name %>( <%= (dao.entity.attributes.select{|attribute| attribute.immutable? && attribute.arez?}.collect { |attribute| "#{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"} + dao.entity.attributes.select{|attribute| !attribute.immutable? && attribute.arez?}.collect { |attribute| "#{Reality::Naming.camelize(attribute.arez.name(attribute.reference? ? :transport : :default))}"}).join(', ') %> );
    attach( $entity );
    return $entity;
  }

  @javax.annotation.Nullable
  public <%= dao.entity.arez.qualified_name %> findBy<%= dao.entity.primary_key.name %>( final int id )
  {
    return findByArezId( id );
  }

  @javax.annotation.Nonnull
  public <%= dao.entity.arez.qualified_name %> getBy<%= dao.entity.primary_key.name %>( final int id )
  {
    return getByArezId( id );
  }

  @java.lang.Override
  @arez.annotations.Action( reportParameters = false )
  public void destroy( @javax.annotation.Nonnull final <%= dao.entity.arez.qualified_name %> entity )
  {
    super.destroy( entity );
  }
<% dao.queries.select{|q|q.arez?}.each do |query| -%>

  <%= nullability_annotation(query.multiplicity == :zero_or_one) %>
  public <%= query_result_type(query) %> <%= Reality::Naming.camelize(query.name) %>(<%= query.parameters.collect {|p| "#{p.arez.primitive? ? '' : nullability_annotation(p.nullable?)} final #{p.arez.java_type} #{Reality::Naming.camelize(p.name)}"}.join(', ') %> )
  {
<%
  if query.multiplicity == :zero_or_one
-%>
    return findByQuery( e -> <%= lambda_query(query) %> );
<%
  elsif query.multiplicity == :one
-%>
    return getByQuery( e -> <%= lambda_query(query) %> );
<%
  elsif query.multiplicity == :many
-%>
    return findAllByQuery( e -> <%= lambda_query(query) %> );
<%
  end
-%>
  }
<% end -%>
<% if dao.entity.arez.enable_entity_broker? && dao.entity.imit? -%>

  @java.lang.Override
  protected boolean reportRead()
  {
    return context().isTrackingTransactionActive();
  }

  @java.lang.Override
  protected boolean reportWrite()
  {
    return context().isTrackingTransactionActive();
  }

  @arez.annotations.ContextRef
  abstract arez.ArezContext context();
<% end -%>
}
{'fraction_non_alphanumeric': 0.18648275862068966, 'fraction_numerical': 0.0, 'mean_word_length': 5.062709030100335, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 85, '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': '7580305', 'n_tokens_mistral': 2549, 'n_tokens_neox': 2343, 'n_words': 367}