<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<% if repository.jpa.version == '2.1' -%>
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm" version="2.1">
<% else -%>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm  http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
                 version="2.0">
<% end -%>
  <persistence-unit-metadata>
    <persistence-unit-defaults>
      <!-- Explicitly indicate that all identifiers will be quoted. -->
      <delimited-identifiers/>
    </persistence-unit-defaults>
  </persistence-unit-metadata>

<% repository.data_modules.each do |data_module| -%>
<% data_module.daos.select{|dao| !dao.repository?}.each do |dao| -%>
<% dao.queries.select{|query|query.jpa? && !query.jpa.native?}.each do |query| -%>
  <named-query name="<%= query.qualified_name %>" >
    <query><%= query.jpa.query_string.encode(:xml => :text) %></query>
<% query.jpa.hints.each do |k,v| -%>
    <hint name="<%= k %>" value="<%= v %>"/>
<% end -%>
  </named-query>
<% end -%>
<% dao.queries.select{|query|query.jpa? && query.jpa.native?}.each do |query| -%>
  <named-native-query name="<%= query.qualified_name %>"<% if query.result_entity? %> result-class="<%= query.entity.jpa.qualified_name %>"<% elsif query.result_struct? %> result-set-mapping="<%= query.qualified_name %>"<% end %>>
    <query><%= query.jpa.query_string.encode(:xml => :text) %></query>
<% query.jpa.hints.each do |k,v| -%>
    <hint name="<%= k %>" value="<%= v %>"/>
<% end -%>
  </named-native-query>

<% end -%>
<% end -%>
<% end -%>

<% repository.jpa.orm_file_fragments.each do |fragment| -%><commit_msg>Use CDATA rather than invoking encode as it works on earlier versions of ruby (i.e. jruby 1.6.7.2)<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT: File is auto-generated -->
<% if repository.jpa.version == '2.1' -%>
<entity-mappings xmlns="http://xmlns.jcp.org/xml/ns/persistence/orm" version="2.1">
<% else -%>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm  http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
                 version="2.0">
<% end -%>
  <persistence-unit-metadata>
    <persistence-unit-defaults>
      <!-- Explicitly indicate that all identifiers will be quoted. -->
      <delimited-identifiers/>
    </persistence-unit-defaults>
  </persistence-unit-metadata>

<% repository.data_modules.each do |data_module| -%>
<% data_module.daos.select{|dao| !dao.repository?}.each do |dao| -%>
<% dao.queries.select{|query|query.jpa? && !query.jpa.native?}.each do |query| -%>
  <named-query name="<%= query.qualified_name %>" >
    <query><%= query.jpa.query_string.encode(:xml => :text) %></query>
<% query.jpa.hints.each do |k,v| -%>
    <hint name="<%= k %>" value="<%= v %>"/>
<% end -%>
  </named-query>
<% end -%>
<% dao.queries.select{|query|query.jpa? && query.jpa.native?}.each do |query| -%>
  <named-native-query name="<%= query.qualified_name %>"<% if query.result_entity? %> result-class="<%= query.entity.jpa.qualified_name %>"<% elsif query.result_struct? %> result-set-mapping="<%= query.qualified_name %>"<% end %>>
    <query><![CDATA[<%= query.jpa.query_string %>]]></query>
<% query.jpa.hints.each do |k,v| -%>
    <hint name="<%= k %>" value="<%= v %>"/>
<% end -%>
  </named-native-query>

<% end -%>
<% end -%>
<% end -%>

<% repository.jpa.orm_file_fragments.each do |fragment| -%>
{'fraction_non_alphanumeric': 0.23060517195414557, 'fraction_numerical': 0.00959744068248467, 'mean_word_length': 3.5924112607099143, 'pattern_counts': {'":': 0, '<': 102, '<?xml version=': 2, '>': 105, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 21}, 'pii_count': 1, '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': '5033997', 'n_tokens_mistral': 1467, 'n_tokens_neox': 1388, 'n_words': 217}