anchor.diff:  <% unless dao.repository? -%>
   <% dao.queries.each do |query| -%>
     private static final String <%= Domgen::Naming.uppercase_constantize(query.name) %> = "<%= query.qualified_name %>";
  +<% end %>
   <% end -%>
  -<% end -%>
  -
  -  @javax.persistence.PersistenceContext(unitName = <%= dao.data_module.repository.jpa.qualified_unit_descriptor_name %>.NAME)
  +  @javax.persistence.PersistenceContext( unitName = <%= dao.data_module.repository.jpa.qualified_unit_descriptor_name %>.NAME )
     private javax.persistence.EntityManager em;
   
  -<% dao.queries.each do |query| %>
  -<%= description_javadoc_for(query) %>  @java.lang.Override
  +<% dao.queries.each do |query| -%>
  +  @java.lang.Override
     public <%= query_result_type(query) %> <%= Domgen::Naming.camelize(query.name) %>(<%= (query.parameters.collect {|p| "final #{p.jpa.primitive? ? '' : nullability_annotation(p.nullable?)} #{p.jpa.java_type} #{p.name}"} + [query.jpa.limit ? 'final int limit': nil] + [query.jpa.offset ? 'final int offset': nil]).compact.join(', ') %>)
     {
       final javax.persistence.TypedQuery<<%= query_component_result_type(query) %>> query =
  
positive.code: %>
      query.setParameter( <%= index + 1 %>, <%= param_value %> );
  <%  end
     end %>
  <% if query.jpa.offset -%>
      query.setFirstResult( offset );
  <% end %>
  <% if query.jpa.limit -%>
      query.setMaxResults( limit );
  <% end %>
  <% if query.query_type == :select %>
  <% if query.multiplicity == :many %>
      return query.getResultList();
  <% elsif query.multiplicity == :one %>
      return query.getSingleResult();
  <% else %>
      query.setMaxResults( 1 );
      final java.util.List<<%= query_component_result_type(query) %>> resultList = query.getResultList();
      if ( resultList.size() > 0 )
  
negative.code:     query.parameters.each do |p|
  %>    query.setParameter( <%= "\"#{p.name}\"" %>, <%= p.name %> );
  <%  end
     else -%>
  <%  query.parameters.each_with_index do |p, index|
      param_suffix = nil
      if p.reference?
  