<commit_before>/* DO NOT EDIT: File is auto-generated */
package <%= entity.data_module.imit.entity_package %>;

import org.realityforge.replicant.client.EntityChangeBroker;
import org.realityforge.replicant.client.EntityRepository;

<%= description_javadoc_for(entity, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public <%= entity.abstract? ? "abstract " : "" %>class <%= entity.imit.name %>
<%= entity.extends ?
  "    extends #{entity.data_module.entity_by_name(entity.extends).imit.qualified_name}\n" :
  "    implements org.realityforge.replicant.client.Linkable, org.realityforge.replicant.client.Verifiable" %>
{
  public static final String TYPE_KEY = "<%= entity.qualified_name %>";
<% if !entity.abstract? %>
  public static final int TRANSPORT_ID = <%= entity.imit.transport_id %>;
<% end %>
<% entity.declared_attributes.select{ |attribute| attribute.imit? && attribute.imit.client_side? }.each do |attribute|
%>  public static final String <%= Domgen::Naming.uppercase_constantize( attribute.name ) %> = "<%= attribute.name %>";
<% end %>
<% entity.referencing_attributes.select{ |attribute| attribute.imit? && attribute.imit.client_side? && !attribute.abstract? && attribute.inverse.imit? && attribute.inverse.imit.traversable?}.each do |attribute|
%>  public static final String <%= Domgen::Naming.uppercase_constantize(attribute.inverse.name) %> = "<%= attribute.inverse.name %>";
<% end %>
<%= entity.extends.nil? ? "  protected EntityRepository _repository;\n" : ""
%><%= entity.extends.nil? ? "  protected EntityChangeBroker _broker;\n" : ""
%><% entity.declared_attributes.select{ |attribute| !attribute.abstract? && attribute.imit? && attribute.imit.client_side? }.each do |attribute|
  if !attribute.reference?
%>
  private <%= annotated_type(attribute, :imit) %> _<%= attribute.imit.name %>;
<% else
%>  private <%= attribute.imit.java_type %> _<%= attribute.imit.name %>;
  private <%= "#{nullability_annotation(attribute.nullable?)} #{attribute.imit.java_type(:transport)}" %> _<%= attribute.imit.name(:transport) %>;
<%
   end
   end
%>
<% entity.imit.referencing_client_side_attributes.each do |attribute| %><%= if attribute.inverse.multiplicity == :many
          "  private java.util.List<#{attribute.entity.imit.qualified_name}> #{Domgen::Naming.pluralize(attribute.inverse.name)};\n"
        else # attribute.inverse.multiplicity == :one || attribute.inverse.multiplicity == :zero_or_one
          "  private #{attribute.entity.imit.qualified_name} #{attribute.inverse.name};\n"
        end %>
<% end %>
<% if entity.extends.nil? %>
  private boolean _created;
  private boolean _linking;
  private boolean _delinking;
  private boolean _linked;
<% end %>
  protected <%= entity.imit.name %>( final EntityRepository repository, final EntityChangeBroker broker )
  {
    <%= entity.extends.nil? ? "_repository = repository;\n    _broker = broker" : "super( repository, broker )" %>;
  }
<% entity.declared_attributes.select{|attribute| attribute.abstract? && attribute.imit? && attribute.imit.client_side?}.each do |attribute|
%>  public abstract <%= annotated_type(attribute, :imit) %> <%= getter_prefix(attribute) %><%= attribute.imit.name %>();
<% if attribute.attribute_type == :reference
  %>  abstract <%= attribute.imit.java_type(:transport) %> <%= getter_prefix(attribute) %><%= attribute.imit.name(:transport) %>();
<% end %>
    abstract void set<%= attribute.imit.name(:transport) %>( <%= attribute.imit.java_type(:transport) %> value );
<% end %>
<% entity.declared_attributes.select{|attribute| !attribute.abstract? && attribute.imit? && attribute.imit.client_side?}.each do |attribute|
%>  public <%= annotated_type(attribute, :imit) %> <%= getter_prefix(attribute) %><%= attribute.imit.name %>()
  {
    <% if !attribute.primary_key? %>check<%= attribute.reference? ? "Linked" : "Validity" %>();<% end %>
    return _<%= attribute.imit.name %>;
  }
<% if attribute.attribute_type == :reference
%>
  final <%= attribute.imit.java_type(:transport) %> <%= getter_prefix(attribute) %><%= attribute.imit.name(:transport) %>()
  {
    return _<%= attribute.referencing_link_name %>;
  }
<% end %>
  final void set<%= attribute.imit.name(:transport) %>( final <%= annotated_type(attribute, :imit, :transport) %> value )
  {
    checkValidity();
<% if attribute.reference?
%>
    _<%= attribute.imit.name %> = null;
    _<%= attribute.referencing_link_name %> = value;
<% elsif attribute.enumeration?
%>
<% if !attribute.imit.primitive?(:transport)
%>    if( null != value )<commit_msg>Make sure transport accessor is accessiblt to subclasses<commit_after>/* DO NOT EDIT: File is auto-generated */
package <%= entity.data_module.imit.entity_package %>;

import org.realityforge.replicant.client.EntityChangeBroker;
import org.realityforge.replicant.client.EntityRepository;

<%= description_javadoc_for(entity, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public <%= entity.abstract? ? "abstract " : "" %>class <%= entity.imit.name %>
<%= entity.extends ?
  "    extends #{entity.data_module.entity_by_name(entity.extends).imit.qualified_name}\n" :
  "    implements org.realityforge.replicant.client.Linkable, org.realityforge.replicant.client.Verifiable" %>
{
  public static final String TYPE_KEY = "<%= entity.qualified_name %>";
<% if !entity.abstract? %>
  public static final int TRANSPORT_ID = <%= entity.imit.transport_id %>;
<% end %>
<% entity.declared_attributes.select{ |attribute| attribute.imit? && attribute.imit.client_side? }.each do |attribute|
%>  public static final String <%= Domgen::Naming.uppercase_constantize( attribute.name ) %> = "<%= attribute.name %>";
<% end %>
<% entity.referencing_attributes.select{ |attribute| attribute.imit? && attribute.imit.client_side? && !attribute.abstract? && attribute.inverse.imit? && attribute.inverse.imit.traversable?}.each do |attribute|
%>  public static final String <%= Domgen::Naming.uppercase_constantize(attribute.inverse.name) %> = "<%= attribute.inverse.name %>";
<% end %>
<%= entity.extends.nil? ? "  protected EntityRepository _repository;\n" : ""
%><%= entity.extends.nil? ? "  protected EntityChangeBroker _broker;\n" : ""
%><% entity.declared_attributes.select{ |attribute| !attribute.abstract? && attribute.imit? && attribute.imit.client_side? }.each do |attribute|
  if !attribute.reference?
%>
  private <%= annotated_type(attribute, :imit) %> _<%= attribute.imit.name %>;
<% else
%>  private <%= attribute.imit.java_type %> _<%= attribute.imit.name %>;
  private <%= "#{nullability_annotation(attribute.nullable?)} #{attribute.imit.java_type(:transport)}" %> _<%= attribute.imit.name(:transport) %>;
<%
   end
   end
%>
<% entity.imit.referencing_client_side_attributes.each do |attribute| %><%= if attribute.inverse.multiplicity == :many
          "  private java.util.List<#{attribute.entity.imit.qualified_name}> #{Domgen::Naming.pluralize(attribute.inverse.name)};\n"
        else # attribute.inverse.multiplicity == :one || attribute.inverse.multiplicity == :zero_or_one
          "  private #{attribute.entity.imit.qualified_name} #{attribute.inverse.name};\n"
        end %>
<% end %>
<% if entity.extends.nil? %>
  private boolean _created;
  private boolean _linking;
  private boolean _delinking;
  private boolean _linked;
<% end %>
  protected <%= entity.imit.name %>( final EntityRepository repository, final EntityChangeBroker broker )
  {
    <%= entity.extends.nil? ? "_repository = repository;\n    _broker = broker" : "super( repository, broker )" %>;
  }
<% entity.declared_attributes.select{|attribute| attribute.abstract? && attribute.imit? && attribute.imit.client_side?}.each do |attribute|
%>  public abstract <%= annotated_type(attribute, :imit) %> <%= getter_prefix(attribute) %><%= attribute.imit.name %>();
<% if attribute.attribute_type == :reference
  %>  abstract <%= attribute.imit.java_type(:transport) %> <%= getter_prefix(attribute) %><%= attribute.imit.name(:transport) %>();
<% end %>
    abstract void set<%= attribute.imit.name(:transport) %>( <%= attribute.imit.java_type(:transport) %> value );
<% end %>
<% entity.declared_attributes.select{|attribute| !attribute.abstract? && attribute.imit? && attribute.imit.client_side?}.each do |attribute|
%>  public <%= annotated_type(attribute, :imit) %> <%= getter_prefix(attribute) %><%= attribute.imit.name %>()
  {
    <% if !attribute.primary_key? %>check<%= attribute.reference? ? "Linked" : "Validity" %>();<% end %>
    return _<%= attribute.imit.name %>;
  }
<% if attribute.attribute_type == :reference
%>
  protected final <%= attribute.imit.java_type(:transport) %> <%= getter_prefix(attribute) %><%= attribute.imit.name(:transport) %>()
  {
    return _<%= attribute.referencing_link_name %>;
  }
<% end %>
  final void set<%= attribute.imit.name(:transport) %>( final <%= annotated_type(attribute, :imit, :transport) %> value )
  {
    checkValidity();
<% if attribute.reference?
%>
    _<%= attribute.imit.name %> = null;
    _<%= attribute.referencing_link_name %> = value;
<% elsif attribute.enumeration?
%>
<% if !attribute.imit.primitive?(:transport)
%>    if( null != value )
{'fraction_non_alphanumeric': 0.18014107433532284, 'fraction_numerical': 0.0, 'mean_word_length': 5.2228224172856175, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 0, '>': 141, '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': '4263577', 'n_tokens_mistral': 3057, 'n_tokens_neox': 2772, 'n_words': 484}