{"id":40927,"date":"2022-05-16T10:00:10","date_gmt":"2022-05-16T14:00:10","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=40927"},"modified":"2022-05-16T14:29:17","modified_gmt":"2022-05-16T18:29:17","slug":"java-bean-mapping-frameworks","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/","title":{"rendered":"Top 8 Frameworks to Help Java Developers with Bean Mapping"},"content":{"rendered":"<div class=\"cl-preview-section\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-40931 alignright\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8-square.png\" alt=\"\" width=\"282\" height=\"282\" \/>As a newbie Java programmer, you might want to know how you can build a large application without using tons of similar code that can exhaust you.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Building a large application on\u00a0<a href=\"https:\/\/simpleprogrammer.com\/learn-java-fast\/\" target=\"_blank\" rel=\"noopener\">Java<\/a>\u00a0that includes multiple layers requires models like domain, persistence, and data transfer objects (DTOs). Applications usually consist of different but similar object models where the data may be similar but the structure and objectives differ. It is crucial to converting different types of data or objects for business decisions or data hiding while executing a large application.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>With object mapping, it becomes easier to convert one model to another while isolating separate models.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Although it is common to map one object to another object, it can often be iterative and tedious as both the classes have similar or the same mapped properties. Fortunately, there are several Java mapping frameworks that one can use to copy data from one object to another recursively.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>But before moving on to the mapping\u00a0<a href=\"https:\/\/www.decipherzone.com\/blog-detail\/web-app-frameworks\" target=\"_blank\" rel=\"noopener\">frameworks<\/a>, let\u2019s get started with the basics of mapping in Java.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"what-is-javabean\">What is JavaBean?<\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p><a href=\"https:\/\/www.amazon.com\/Developing-Java-Beans-Robert-Englander\/dp\/1565922891\/\" target=\"_blank\" rel=\"noopener\">JavaBeans<\/a>\u00a0are Java classes that encapsulate different objects into one object or bean. Beans should be serializable (i.e. conversion of the object state into a byte stream), should have a public no-arg constructor, and the properties must be private with public getter and setter methods.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Let\u2019s look at an example that shows how a JavaBean class is structured.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<ol>\n<li><strong>package<\/strong>\u00a0mypack;<\/li>\n<li><strong>public<\/strong>\u00a0<strong>class<\/strong>\u00a0Student\u00a0<strong>implements<\/strong>\u00a0java.io.Serializable{<\/li>\n<li><strong>private<\/strong>\u00a0<strong>int<\/strong>\u00a0id;<\/li>\n<li><strong>private<\/strong>\u00a0String name;<\/li>\n<li><strong>public<\/strong>\u00a0Student(){}<\/li>\n<li><strong>public<\/strong>\u00a0<strong>void<\/strong>\u00a0setId(<strong>int<\/strong>\u00a0id){<strong>this<\/strong>.id=id;}<\/li>\n<li><strong>public<\/strong>\u00a0<strong>int<\/strong>\u00a0getId(){<strong>return<\/strong>\u00a0id;}<\/li>\n<li><strong>public<\/strong>\u00a0<strong>void<\/strong>\u00a0setName(String name){<strong>this<\/strong>.name=name;}<\/li>\n<li><strong>public<\/strong>\u00a0String getName(){<strong>return<\/strong>\u00a0name;}<\/li>\n<li>}<\/li>\n<\/ol>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Now to access JavaBean, getter and setter methods are used as follows:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<ol>\n<li><strong>package<\/strong>\u00a0mypack;<\/li>\n<li><strong>public<\/strong>\u00a0<strong>class<\/strong>\u00a0Test{<\/li>\n<li><strong>public<\/strong>\u00a0<strong>static<\/strong>\u00a0<strong>void<\/strong>\u00a0main(String args[]){<\/li>\n<li>Student s=<strong>new<\/strong>\u00a0Student(); \/\/object is created<\/li>\n<li>s.setName(\u201cAnna\u201d); \/\/setting value to the object<\/li>\n<li>System.out.println(e.getName());<\/li>\n<li>}}<\/li>\n<\/ol>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Although JavaBeans can be exposed to other applications to reuse the software components, JavaBeans are mutable (i.e. can be changed after creation) so they cannot benefit from immutable objects (like Strings in Java that can\u2019t be changed after creation). When you want to encapsulate (hide) data, it requires a get method to return its values and set methods to sets or update its value. However, creating getter and setter methods for every property can lead to repeated code in multiple areas with few to no variations also known as boilerplates.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>That\u2019s where the bean mapping framework comes to play its role in\u00a0<a href=\"https:\/\/www.decipherzone.com\/on-demand-solutions\" target=\"_blank\" rel=\"noopener\">project development<\/a>.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"what-is-bean-mapping-framework\">What is Bean Mapping Framework?<\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Sometimes building enterprise-level projects can be difficult due to unstructured, broad goals and nonlinear workflows that make the app more complex. Besides, completing certain functionalities of external systems\u2019 legacy components requires the transformation of objects with similar structures like external service response to domain objects and domain objects into external service requests which is difficult to obtain manually.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Let\u2019s look into a real-world scenario, these requests and response objects might include numerous columns. To copy one bean\/object into another with manual code will require tons of code lines such as destination.setABC(source.getABC()) which is recursive and error-prone.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>If you want to overcome the complexity and repetitiveness of writing similar lines of code for copying data from one bean to another, a bean mapping framework is highly useful as it offers simple configuration and fewer lines of code that streamlines your work.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"the-top-frameworks-for-mapping-in-java\">The Top Frameworks For Mapping in Java<\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Now that you know what JavaBean and Bean mapping frameworks in Java are and why they are being used in the first place. It is time to learn the top Java Bean Mapping\u00a0<a href=\"https:\/\/simpleprogrammer.com\/top-10-emerging-front-end-frameworks\/\">frameworks<\/a>\u00a0that you can use for mapping while working on your next project.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>dOOv<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Domain Object Oriented Validation (dOOv) is an API used for domain model validation and mapping. dOOv uses code generations, annotations, and type-safe Domain-specific language (DSL) to make mapping and validation easier and more rapid. Saving you both time and effort.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>dOOV is composed of a dOOv core, dOOv generator, and dOOv assertions where the core contains Abstract Syntax Tree (AST), DST, and annotations, generator consists of code generators for field information and model-map, and assertions include AssertJ assertions.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>For the following sections on recommended frameworks, I will offer an overview explanation of the framework and then coded segments for you to get started with whenever you\u2019re ready.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li><strong>Annotate Domain model<\/strong><\/li>\n<\/ul>\n<pre><span style=\"font-weight: 400;\">public class User {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0@TestPath(field = TestFieldId.FIRST_NAME, readable = \"user first name\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private String firstName;\n<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0@TestPath(field = TestFieldId.LAST_NAME, readable = \"user last name\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private String lastName;\n<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0@TestPath(field = TestFieldId.DATEOFDATE, readable = \"user date of birth\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private LocalDate birthDate;\n<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li>Generate DSL code with elements like userFirstName, userLastName, and userDateIOfBirth<\/li>\n<li>Write and execute validation rules<\/li>\n<\/ul>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre>ValidationRule rule = DOOV.when(userDateOfBirth.ageAt(today()).greaterOrEquals(18)).validate();<\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>You must write code in the instantiated model to execute it, where the instantiated model is the creation of a real instance or particular realization of abstraction such as a class of objects.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">\/\/ Execute the DSL on the model<\/span>\n<span style=\"font-weight: 400;\">DslModel model = new SampleModelWrapper(sampleModel);<\/span>\n<span style=\"font-weight: 400;\">Result result = rule.executeOn(model);<\/span>\n<span style=\"font-weight: 400;\">if (result.isFalse()) {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\/\/ do stuff on the model that didn't validate<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li><strong>Map<\/strong><\/li>\n<\/ul>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To map an object with others using dOOv you will write codes as:<\/p>\n<pre><span style=\"font-weight: 400;\">MappingRegistry mappings = mappings(<\/span>\n<span style=\"font-weight: 400;\"> \u00a0map(userFirstName, userLastName)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.using(biConverter((first, last) -&gt; first + \" \" + last))<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.to(accountFullName),<\/span>\n<span style=\"font-weight: 400;\"> \u00a0map(userDateOfBirth)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.using(date -&gt; Years.yearsBetween(date, LocalDate.now()))<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0.to(accountAge));<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Two instantiated models can then be used to execute the mapping code.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre>DslModel model1 = new SampleModelWrapper(sampleModel1);\nDslModel model2 = new SampleModelWrapper(sampleModel2);\nContext context = mappings.executeOn(model1, model2);\n\/\/ do stuff with model2 new values<\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li><strong>Test validation rules<\/strong><\/li>\n<\/ul>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Assertions are available in the doov-assertions jar. Since AssertJ is required, you can use the assertThat syntax.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre>ValidationRule rule = DOOV.when(userFirstName.isNotNull().or(userLastName.isNull())).validate();<\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre>assertThat(rule).validates(model).hasFailedNodeEmpty();<\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>JMapper<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>JMapper is the\u00a0<a href=\"https:\/\/www.amazon.com\/Core-Java-Fundamentals-Oracle-Press\/dp\/0137673620\/\" target=\"_blank\" rel=\"noopener\">Java<\/a>\u00a0mapping framework based on Javassist that uses byte code manipulation for fast mapping. JMapper offers the benefits of both dynamic conversions, relational mapping, and static code performance at zero memory consumption. It takes input in two classes, Destination (instance that will be created or modified) and Source (instance that contains data). So before mapping, you need to configure one class between Source and Destination and then invoke the method\u00a0<a href=\"https:\/\/www.w3schools.com\/java\/java_encapsulation.asp\" target=\"_blank\" rel=\"noopener\">Get method<\/a>.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p><strong>Annotation<\/strong><\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">class Destination {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0@JMap<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String id;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0@JMap(\"SourceField\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String destinationField;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String other;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\/\/ getter and setter<\/span>\n<span style=\"font-weight: 400;\">\u00a0}<\/span>\n\n<span style=\"font-weight: 400;\"> class Source {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0String id;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0String SourceField;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0String other;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\/\/ getter and setter<\/span>\n<span style=\"font-weight: 400;\">\u00a0}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To invoke the GetDestination method, you will create and use an XML file as follows:<\/p>\n<pre><span style=\"font-weight: 400;\">&lt;jmapper&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;class name=\"it.jmapper.bean.Destination\"&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;attribute name=\"id\"&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0&lt;value name=\"id\"\/&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;\/attribute&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;attribute name=\"destinationField\"&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0&lt;value name=\"SourceField\"&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;\/attribute&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;\/class&gt;<\/span>\n<span style=\"font-weight: 400;\">&lt;\/jmapper&gt;<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>For execution you will create API as below:<\/p>\n<pre><span style=\"font-weight: 400;\">JMapperAPI jmapperAPI = new JMapperAPI()<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.add(mappedClass(Destination.class)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.add(attribute(\"id\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.value(\"id\"))<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.add(attribute(\"destinationField\")<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.value(\"SourceField\")));<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>MapStruct<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>MapStruct is one of the most used Java annotation processors for performant and type-safe JavaBeans classes mappers. It comes with built-in conversions and sensible defaults that don\u2019t bother you while implementing or configuring specific behavior.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>MapStruct simplifies mapping by automating it as much as possible. It generates bean mappings compile time to ensure high performance, thorough error checking, and fast feedback.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>MapStruct, an annotation processor, is plugged into the compiler of Java and can be used in your preferred Integrated Development Environment (IDE) or command-line builds like Gradle and Maven.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To use MapStruct, you need to define the mapper interface declaring all the required methods of mapping.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Let\u2019s assume you have two classes one that represents cars and the other accompanying data transfer object (DTO) as below:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li>Car.java<\/li>\n<\/ul>\n<pre><span style=\"font-weight: 400;\">public class Car {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private String make;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private int numberOfSeats;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private CarType type;<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/constructor, getters, setters, etc.<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<ul>\n<li>CarDTO.java<\/li>\n<\/ul>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">public class CarDto {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private String make;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0private int seatCount;<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0private String type;<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/constructor, getters, setters, etc.<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p>Both the classes are almost identical except the attributes for seat count have different names and the enumeration type attribute in the Car class is the plain string in the DTO.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To create a mapper for carDTO, the mapper interface will be defined as:<\/p>\n<pre><span style=\"font-weight: 400;\">@Mapper<\/span>\n<span style=\"font-weight: 400;\">public interface TestMapper {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0TestMapper INSTANCE = Mappers.getMapper( TestMapper.class );\n<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0@Mapping(target = \"seatCount\", source = \"numberOfSeats\")<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0TestDto testToTestDto(Test test);<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Using the interface you have created for the mapper, object mapping can be done easily in a type-safe way as:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">@Test<\/span>\n<span style=\"font-weight: 400;\">public void shouldMapCarToDto() {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/given<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0Car car = new Car( \"Morris\", 5, CarType.SEDAN );<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/when<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0CarDto carDto = CarMapper.INSTANCE.carToCarDto( car );<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/then<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0assertThat( carDto ).isNotNull();<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0assertThat( carDto.getMake() ).isEqualTo( \"Morris\" );<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0assertThat( carDto.getSeatCount() ).isEqualTo( 5 );<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0assertThat( carDto.getType() ).isEqualTo( \"SEDAN\" );<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>ModelMapper<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>An intelligent mapping library, ModelMapper is capable of mapping objects automatically. It provides a simple refactoring safe API and uses a conventional approach to handle certain use cases.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>ModelMapper is a great Java Bean Mapper as it makes the object mapping easier by determining how one object can map to another through conventions automatically, so you don\u2019t have to worry about manual mapping.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>You can setup ModelMapper in Maven as follows:<\/p>\n<pre><span style=\"font-weight: 400;\">&lt;dependency&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;groupId&gt;org.modelmapper&lt;\/groupId&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;artifactId&gt;modelmapper&lt;\/artifactId&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;version&gt;3.0.0&lt;\/version&gt;<\/span>\n<span style=\"font-weight: 400;\">&lt;\/dependency&gt;<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To map an object with others using ModelMapper you can create source and destination model codes as:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Source Code:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">\/\/ Assume getters and setters on each class<\/span>\n<span style=\"font-weight: 400;\">class Order {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0Customer customer;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0Address billingAddress;<\/span>\n<span style=\"font-weight: 400;\">}<\/span>\n\n<span style=\"font-weight: 400;\">class Customer {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0Name name;<\/span>\n<span style=\"font-weight: 400;\">}<\/span>\n\n<span style=\"font-weight: 400;\">class Name {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String firstName;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String lastName;<\/span>\n<span style=\"font-weight: 400;\">}<\/span>\n\n<span style=\"font-weight: 400;\">class Address {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String street;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String city;<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Destination code:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">\/\/ Assume getters and setters<\/span>\n<span style=\"font-weight: 400;\">class OrderDTO {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String customerFirstName;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String customerLastName;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String billingStreet;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0String billingCity;<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>For executing ModelMapper implied map, use something like:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre>ModelMapper modelMapper = new ModelMapper();\nOrderDTO orderDTO = modelMapper.map(order, OrderDTO.class);<\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>At the time of the calling map method, the source model and destination model codes will be analyzed to identify the properties-simplicity based on the\u00a0<a href=\"https:\/\/docs.oracle.com\/html\/E68420_01\/mime_ref_chapter2.htm\" target=\"_blank\" rel=\"noopener\">matching configuration<\/a>\u00a0and strategy. Only after that data is mapped to other objects.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>reMap<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>ReMap is a Java mapping library that helps developers in simplifying object conversions attribute by attribute while reducing the mapper classes unit testing.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>ReMap is easily accessible through JCenter and Maven Central. Below is how you will map source and destination type in-app.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">Mapping.from(Customer.class)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.to(Person.class)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.omitInSource(Customer::getAddress)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.omitInDestination(Person::getBodyHeight)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.reassign(Customer::getTitle)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.to(Person::getSalutation)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0.replace(Customer::getGender, Person::getGender)<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0.withSkipWhenNull(Gender::valueOf)<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0.mapper();<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>Orika<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Orika is a JavaBean to Bean mapping framework that iteratively copies data from one object to another. It is highly recommended while developing a multi-layered web application, because of how Orika builds effective, comprehensive, and robust solutions for Java Bean mapping.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Orika makes the mapping of Java Beans much faster by using byte code generators with minimal overhead.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To map two beans or objects with each other first declare destination and source classes as follows:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">class BasicPerson {<\/span>\n<span style=\"font-weight: 400;\"> \u00a0private String name;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0private int age;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0private Date birthDate;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\/\/ getters\/setters omitted<\/span>\n<span style=\"font-weight: 400;\">}<\/span>\n<span style=\"font-weight: 400;\">class BasicPersonDto { <\/span>\n<span style=\"font-weight: 400;\"> \u00a0private String fullName;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0private int currentAge;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0private Date birthDate;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\/\/ getters\/setters omitted<\/span>\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Next, map the two classes as:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\"> \u00a0mapperFactory.classMap(BasicPerson.class, BasicPersonDto.class)<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">.field(\"name\", \"fullName\")<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">.field(\"age\", \"currentAge\")<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">.register();<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Orika mapping can also be customized if you create custom Mappers, Convertors, and ObjectFactory types where mappers can be used to apply properties of an object to another; ObjectFactory can be used to construct an instance in context to mapping, and Converter takes complete control of mapping process. Make an efficient Jave Bean Mapper for your next project.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><strong>Selma<\/strong><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Stupid Simple Statically Linked Mapper (AKA Selma) is an annotation processor-based bean to bean mapper for Java. It generates Java Code to handle field to field mapping and also works as a runtime library to invoke generated mappers.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To see Selma in action, follow the given steps:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">@Mapper<\/span>\n<span style=\"font-weight: 400;\">public interface SelmaMapper {<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/ Immutable mapping<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0OutBean asOutBean(InBean source);<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/ Update graph<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0OutBean updateOutBean(InBean source, OutBean destination);<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>To use Selma for mapping, we will:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">SelmaMapper mapper = Selma.mapper(SelmaMapper.class);<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0OutBean res = mapper.asOutBean(in);<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\/\/ Or<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0OutBean dest = dao.getById(42);<\/span>\n\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0OutBean res = mapper.updateOutBean(in, dest);<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\/\/ res is the value for the bean destination<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3><strong>Dozer<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Dozer is a Java mapping framework that copies data from one object to another using APL\/XML configuration and annotations. It is an open-source, robust, flexible, configurable, reusable, and generic mapping framework that supports complex, simple, implicit, explicit, bi-directional, and recursive mapping of JavaBeans. Dozer is ideal if you want to avoid unnecessary codes used while copying data from one bean to another. It not only supports the mapping of beans but also converts data types for mapping classes with DTOs automatically.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Using\u00a0<a href=\"https:\/\/maven.apache.org\/\" target=\"_blank\" rel=\"noopener\">Maven<\/a>, you can add Dozer in your project simply through:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">&lt;dependency&gt;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0&lt;groupId&gt;com.github.dozermapper&lt;\/groupId&gt;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0&lt;artifactId&gt;dozer-core&lt;\/artifactId&gt;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0&lt;version&gt;6.5.2&lt;\/version&gt;<\/span>\n\n<span style=\"font-weight: 400;\">&lt;\/dependency&gt;<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Create Source and Destination classes:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">&lt;mapping&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;class-a&gt;yourpackage.SourceClassName&lt;\/class-a&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0&lt;class-b&gt;yourpackage.DestinationClassName&lt;\/class-b&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;field&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0&lt;a&gt;yourSourceFieldName&lt;\/a&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0\u00a0\u00a0&lt;b&gt;yourDestinationFieldName&lt;\/b&gt;<\/span>\n<span style=\"font-weight: 400;\"> \u00a0\u00a0\u00a0&lt;\/field&gt;<\/span>\n<span style=\"font-weight: 400;\">&lt;\/mapping&gt;<\/span><\/pre>\n<\/div>\n<div class=\"cl-preview-section\">And map these classes as:<\/div>\n<div class=\"cl-preview-section\">\n<div class=\"cl-preview-section\">\n<pre><span style=\"font-weight: 400;\">SourceClassName sourceObject = new SourceClassName();<\/span>\n<span style=\"font-weight: 400;\">sourceObject.setYourSourceFieldName(\"Dozer\");<\/span>\n\n<span style=\"font-weight: 400;\">Mapper mapper = DozerBeanMapperBuilder.buildDefault();<\/span>\n<span style=\"font-weight: 400;\">DestinationClassName destObject = mapper.map(sourceObject, \nDestinationClassName.class);<\/span>\n<span style=\"font-weight: 400;\">\nassertTrue(destObject.getYourDestinationFieldName().equals(sourceObject.getYourSourceFieldName()));<\/span><\/pre>\n<\/div>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"make-javabeans-mapping-easier-with-frameworks\"><strong>Make JavaBeans Mapping Easier with Frameworks<\/strong><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p><a href=\"https:\/\/www.decipherzone.com\/blog-detail\/java-developers-roadmap-2021\" target=\"_blank\" rel=\"noopener\">Java<\/a>\u00a0Mapping frameworks are remarkable and crucial when it comes to developing software or web applications tailored to meet the needs of large-scale businesses.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Adopting Java Mapping frameworks will make it easier to copy data objects from one bean to another at a fast pace with more accuracy and minimum effort.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>These top frameworks of Java Mapping like MapStruck, reMap, dozer, and dOOv will help you in acquiring a professional advantage in the future.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Key takeaways:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<ul>\n<li>With object mapping, it becomes easier to convert one model to another while isolating separate models.<\/li>\n<li>Bean mapping frameworks are highly useful as it offers simple configuration and fewer lines of code that streamlines your work.<\/li>\n<li>Java Bean Mapping frameworks that you can use for mapping while working on your next project are dOOv, JMapper, MapStruct, ModelMapper, reMap, Orika, Selma, and Dozer.<\/li>\n<li>To map two objects you need to create source and destination classes.<\/li>\n<li>Java Bean Frameworks are easily accessible through command-line builds like Maven and Gradle.<\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single  &#8216;bean&#8217; that can be accessed from multiple locations. These frameworks suggested within this article will help developers streamline their bean mapping. <\/p>\n","protected":false},"author":1351,"featured_media":40926,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[2290,524297,45348,415,1017,162228491,264,31679,162229803],"tags":[],"class_list":["post-40927","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-architecture","category-code-reviews","category-frameworks","category-guest-post","category-java","category-javascript","category-learning","category-process-improvement","category-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer<\/title>\n<meta name=\"description\" content=\"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single &#039;bean&#039; that can be accessed from multiple locations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer\" \/>\n<meta property=\"og:description\" content=\"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single &#039;bean&#039; that can be accessed from multiple locations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-16T14:00:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-16T18:29:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Top 8 Frameworks to Help Java Developers with Bean Mapping\",\"datePublished\":\"2022-05-16T14:00:10+00:00\",\"dateModified\":\"2022-05-16T18:29:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/\"},\"wordCount\":1797,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/top-8.png\",\"articleSection\":[\"Architecture\",\"Code Reviews\",\"Frameworks\",\"Guest Post\",\"Java\",\"JavaScript\",\"Learning\",\"Process Improvement\",\"Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/\",\"name\":\"Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/top-8.png\",\"datePublished\":\"2022-05-16T14:00:10+00:00\",\"dateModified\":\"2022-05-16T18:29:17+00:00\",\"author\":{\"@id\":\"\"},\"description\":\"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single 'bean' that can be accessed from multiple locations.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/top-8.png\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/top-8.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/java-bean-mapping-frameworks\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Top 8 Frameworks to Help Java Developers with Bean Mapping\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer","description":"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single 'bean' that can be accessed from multiple locations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/","og_locale":"en_US","og_type":"article","og_title":"Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer","og_description":"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single 'bean' that can be accessed from multiple locations.","og_url":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/","og_site_name":"Simple Programmer","article_published_time":"2022-05-16T14:00:10+00:00","article_modified_time":"2022-05-16T18:29:17+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/"},"author":{"name":"","@id":""},"headline":"Top 8 Frameworks to Help Java Developers with Bean Mapping","datePublished":"2022-05-16T14:00:10+00:00","dateModified":"2022-05-16T18:29:17+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/"},"wordCount":1797,"commentCount":0,"image":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png","articleSection":["Architecture","Code Reviews","Frameworks","Guest Post","Java","JavaScript","Learning","Process Improvement","Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/","url":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/","name":"Top 8 Frameworks to Help Java Developers with Bean Mapping - Simple Programmer","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png","datePublished":"2022-05-16T14:00:10+00:00","dateModified":"2022-05-16T18:29:17+00:00","author":{"@id":""},"description":"Java Bean Mapping is a reusable software component that allows users to wrap numerous codes into a single 'bean' that can be accessed from multiple locations.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2022\/05\/top-8.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/java-bean-mapping-frameworks\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"Top 8 Frameworks to Help Java Developers with Bean Mapping"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"","url":"https:\/\/simpleprogrammer.com\/author\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/40927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/1351"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=40927"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/40927\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media\/40926"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=40927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=40927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=40927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}