<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Projection on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/projection/</link>
    <description>Recent content in Projection on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Thu, 31 Mar 2022 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/projection/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Java Bean Mapping with MapStruct</title>
      <link>https://www.hascode.com/java-bean-mapping-with-mapstruct/</link>
      <pubDate>Thu, 31 Mar 2022 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/java-bean-mapping-with-mapstruct/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;&lt;a href=&#34;https://mapstruct.org/&#34;&gt;MapStruct&lt;/a&gt; is a nice tool to generate mappers for converting one Java bean into another
e.g. for projections, data-transfer-objects and so on …​&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;As long as fields in source and target beans do match, the mapper is able to generate the data setting automatically ..
else we may specify which source fields to map into which target fields or to register custom converters with ease.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add dependencies and plugin integration to our &lt;code&gt;pom.xml&lt;/code&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>XMLBeam: Snippets and Examples</title>
      <link>https://www.hascode.com/xmlbeam-snippets-and-examples/</link>
      <pubDate>Tue, 22 Jul 2014 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/xmlbeam-snippets-and-examples/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;XMLBeam is an interesting library using an approach of projecting parts of an XML DOM tree into Java using some simple interfaces, annotations and XPath expressions.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following article, I’d like to share three experiments of mine with this library for reading, writing XML and parsing a live RSS feed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;div class=&#34;title&#34;&gt;RSS Feed Projection Interface&lt;/div&gt;
&lt;p&gt;&lt;span class=&#34;image&#34;&gt;&lt;img src=&#34;rss-projection-interface.png&#34; alt=&#34;rss projection interface&#34;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_dependencies&#34;&gt;Dependencies&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Using Maven, we need to add only one dependency to our &lt;em&gt;pom.xml&lt;/em&gt;:&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Creating slim Database Projections using JPA2 Constructor Expressions</title>
      <link>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</link>
      <pubDate>Sun, 14 Apr 2013 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/creating-slim-database-projections-using-jpa2-constructor-expressions/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;One common question that you may encounter one day when using object-relational-mapping in your application is how to slim down data that you’re retrieving from the persistence layer down to a specific subset for your use-case in an efficient manner and without using complex additional mapping frameworks. In some situations you might declare lazy loaded fields but another approach that I’d like to share with you here are JPA2 constructor expressions.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
