Selma Java bean mapping that compiles

Related tags

Bean Mapping selma
Overview

Build Status

Selma logo

Selma Java bean mapping at compile time !

What is Selma ?

S3lm4 say Selma, stands for Stupid Simple Statically Linked Mapper. In fact it is on one side an Annotation Processor that generate Java code to handle the mapping from field to field at compile time. On the other side, it is a Runtime library to instantiate and invoke the generated Mapper.

How does it work ?

First add selma-processor as a provided dependency and selma as a compile dependency to your build. Then, define a Mapper interface describing the mapping you want:

@Mapper
public interface SelmaMapper {

    // Imutable mapping
    OutBean asOutBean(InBean source);

    // Update graph
    OutBean updateOutBean(InBean source, OutBean destination);

}

Then ? Well just use the generated Mapper:

    SelmaMapper mapper = Selma.mapper(SelmaMapper.class);

    OutBean res = mapper.asOutBean(in);

    // Or
    OutBean dest = dao.getById(42);

    OutBean res = mapper.updateOutBean(in, dest);
    // res is the updated bean dest with in values

And voilà !

Visit our site: (http://selma-java.org)

Features

  • Generate code for mapping bean to bean matching fields to fields ** Support for nested bean ** Bean should respect Java property convention
  • Custom field to (embedded)field name mapping
  • Maps Enum using identical values with default value
  • Maps Collection any to any
  • Maps Map any to any
  • Use strict memory duplication for all fields except immutables
  • Support for SourcedBeans to instantiate beans is out of the box
  • Support Type to Type custom mapping using custom mapping methods
  • Gives full feedback at compilation time
  • Break build when mapping does not work Say good bye to mapping errors in production

Usage

First add selma and selma-processor to your pom dependencies:

        <!-- scope provided because the processor is only needed for the compiler -->
        <dependency>
            <groupId>fr.xebia.extras</groupId>
            <artifactId>selma-processor</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- This is the only real dependency you will have in your binaries -->
        <dependency>
            <groupId>fr.xebia.extras</groupId>
            <artifactId>selma</artifactId>
            <version>1.0</version>
        </dependency>

Then, as I said earlier, build your interface with @Mapper annotation and enjoy.

Checkout the example module to have a deeper look.

Help needed, please report issues and ask for features :)

Comments
  • Lombok

    Lombok

    How can I use Selma together with Lombok? It seems that Selma does not see the getters/setters generated by Lombok.

    Failed to generate mapping method for type ..OtpData to .....resources.OtpDataResource not supported on ....model.OtpData --> Add a custom mapper or 'withIgnoreFields' on @Mapper or @Maps to fix this ! If you think this a Bug in Selma please report issue here
    
    wontfix 
    opened by robertmircea 11
  • NullPointerException

    NullPointerException

    Hi,

    I encounter the following error while generating mappers:

    An annotation processor threw an uncaught exception.
    Consult the following stack trace for details.
    java.lang.NullPointerException
        at fr.xebia.extras.selma.codegen.CustomMapperWrapper.collectCustomMethods(CustomMapperWrapper.java:200)
        at fr.xebia.extras.selma.codegen.CustomMapperWrapper.collectCustomMappers(CustomMapperWrapper.java:173)
        at fr.xebia.extras.selma.codegen.CustomMapperWrapper.<init>(CustomMapperWrapper.java:64)
        at fr.xebia.extras.selma.codegen.MapperWrapper.<init>(MapperWrapper.java:93)
        at fr.xebia.extras.selma.codegen.MapperClassGenerator.<init>(MapperClassGenerator.java:60)
        at fr.xebia.extras.selma.codegen.MapperProcessor.generateMappingClassses(MapperProcessor.java:89)
        at fr.xebia.extras.selma.codegen.MapperProcessor.process(MapperProcessor.java:74)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
    

    It happens in v0.13 and v0.14-SNAPSHOT (last master).

    Trying to debug it I can see that this line:

    final TypeElement element = context.elements.getTypeElement(customMapper.replace(".class", ""));
    

    located in the private void collectCustomMappers() method is null.

    I really don't know what to do to solve my problem, please help !

    Thank you

    bug 
    opened by denouche 11
  • Mapper declaring  source don't use correct constructor

    Mapper declaring source don't use correct constructor

    I try to use a mapper with source. But in generated class this method called no args constructor and not constructor with my source.

    In documentation the sourced field is public final, is it a constraint ? why ?

    May be I'm doing something wrong ?

    
    @Mapper(withSources = Date.class)
    public interface PersonMapper {
    
    
        PersonDto personToPersonDto(Person person);
    }
    
    
    public class PersonDto {
    
        private String firstName;
    
        public final Date birthDate;
    
        public String getFirstName() {
            return firstName;
        }
    
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        }
    
        public PersonDto(Date birthDate) {
            this.birthDate = birthDate;
        }
    
        public PersonDto() {
            this.birthDate = null;
        }
    
    }
    
    
    
    public class Person {
    
        String firstName;
    
        public String getFirstName() {
            return firstName;
        }
    
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        }
    
        public Person (String firstName) {
            this.firstName = firstName;
        }
    }
    
    

    generated code :

    public final class PersonMapperSelmaGeneratedClass
        implements PersonMapper {
    
      @Override
      public final model.external.PersonDto personToPersonDto(model.internal.Person in) {
        model.external.PersonDto out = null;
        if (in != null) {
          out = new model.external.PersonDto();
          out.setFirstName(in.getFirstName());
        }
        return out;
      }
    
    
    
      /**
       * This field is used as source akka given as parameter to the Pojos constructors
       */
      private final java.util.Date source0;
    
      /**
       * Single constructor
       */
      public PersonMapperSelmaGeneratedClass(java.util.Date _source0) {
        this.source0 = _source0;
      }
    
    }
    
    question 
    opened by gderboux 8
  • Eclipse integration issue

    Eclipse integration issue

    Hi Séven,

    My projects work fine with gradle, but I couldn’t get them work with Eclipse 4.4:

    • I checked all the box under JavaCompiler/Annotation Processing
    • I had the 3 jars in Factory Path:
      • myProject/lib/selma-processor-0.8.jar
      • myProject/lib/selma-0.8.jar
      • myProject/lib/javawriter-2.2.1.jar
    • "Clean and Build All" projects just to be sure

    ==> no generated class and when I deploy it in Tomcat 8, I obviously have a nice "java.lang.ClassNotFoundException"

    It's really important for me that it work under Eclipse. What am I missing here ?

    Thanks.

    PS : My projects works fine with gradle, except selma generates the class at the root, it's a bit weird, it's not an issue but is it possible to choose the location ?

    question 
    opened by guillaumBrisard-zz 7
  • Generate method to map Collection of object directly

    Generate method to map Collection of object directly

    This is not a bug, but a feature request (Didn't find where to add correct label) Not talking about collection attribut but collection of object.

    @Mapper
    public interface MyMapper {
    	// Handle this kind of method
    	List<MyDto> convertToListMyDto(Set<MyEntity> source);
    
    	MyDto convertToMyDto(MyEntity source);
    }
    

    To convert from my Set of source, Selma would just loop and call the singular convert method convertToMyDto. Would save a bit of code on the service side, not having to instanciate the collection; loop, and call convert for each item, then adding them to the result list.

    Not a big deal, but i'd be nice and not very hard to implement I think ?

    question 
    opened by TehBakker 6
  • Need workaround for bugs in Eclipse JDT

    Need workaround for bugs in Eclipse JDT

    There is a bug in the Eclipse JDT where it Types.asMemberOf does not work properly with methods on interfaces or superinterfaces:

    https://bugs.eclipse.org/bugs/show_bug.cgi?id=382590 https://bugs.eclipse.org/bugs/show_bug.cgi?id=481555

    bug wontfix 
    opened by facboy 6
  • Api to update an existing instance from the mapped object

    Api to update an existing instance from the mapped object

    This is a feature request :)

    Here are some examples of what the api could look like (to provide context of use cases)

    immutable (create a new instance from the information in the dto , defaulting missing values to the corresponding values in the provided instance)

    
    private User chuck = new User("Chuck Noris", -1, "Chuck Noris");
    public static Result updateChuck() {
            JsonNode json = request().body().asJson();
            UserDTO userDTO = Json.fromJson(json, UserDTO.class);
            UserMapper userMapper = Selma.getMapper(UserMapper.class);
            chuck = userMapper.map(userDto, chuck); 
            return ok(Json.toJson(userDTO));
        }
    

    mutable api which copies fields from the dto to the target instance leaving alone unknown fields (and conversely)

    private Double chuckId = Double.NaN;
    public static User updateChuck(UserDto chuckDTO) {
           User chuck = UserDao.find(chukId);
           UserMapper userMapper = Selma.getMapper(UserMapper.class);
           userMapper.map(userDto, chuck);
           UserDao.save(chuck);
           return chuck;
    }
    

    Both apis should be bidirectional with regard to the mapping.

    new feature 
    opened by jeantil 6
  • Using interceptor with withIgnoreNullValue = true

    Using interceptor with withIgnoreNullValue = true

    Usage of interceptor and withIgnoreNullValue = true result in NPE

    @Mapper(
            withImmutables = {Calendar.class, Byte.class}, withCyclicMapping = false, withIgnoreMissing = IgnoreMissing.ALL,
            withIoC = IoC.SPRING, withIgnoreNullValue = true)
    public interface MyMapper {
        @Maps(withCustom = {CustomDateTimeInterceptor.class})
        Validation asValidation(ValidationJson in, Validation out);
    }
    
    @Component
    public class CustomDateTimeInterceptor {
    
        public void intercept(ValidationJson in, Validation out) {
                 ...
                out.setValidationDate(validationDate);
        }
    }
    

    Caused by: java.lang.NullPointerException at fr.xebia.extras.selma.codegen.SourceNodeVars.isOutPrimitive(SourceNodeVars.java:162) at fr.xebia.extras.selma.codegen.MappingBuilder.build(MappingBuilder.java:747) at fr.xebia.extras.selma.codegen.MapperMethodGenerator.buildMappingMethod(MapperMethodGenerator.java:190) at fr.xebia.extras.selma.codegen.MapperMethodGenerator.build(MapperMethodGenerator.java:69) at fr.xebia.extras.selma.codegen.MapperClassGenerator.build(MapperClassGenerator.java:161) at fr.xebia.extras.selma.codegen.MapperProcessor.generateMappingClassses(MapperProcessor.java:88) at fr.xebia.extras.selma.codegen.MapperProcessor.process(MapperProcessor.java:71) at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794) at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705) at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91) at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035) at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176) at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856) at com.sun.tools.javac.main.Main.compile(Main.java:523) ... 29 more

    Fix it using withIgnoreNullValue = false

    bug 
    opened by cbeaujoin 5
  • Mapper IoC.SPRING and custom mapper

    Mapper IoC.SPRING and custom mapper

    Hello, In the specific case of Mapper declared "withIoC = IoC.SPRING" and with a custom mapper for Money conversion in a SpringBoot project, I got a problem about Spring Autowiring beans:

    No qualifying bean of type 'com.***.converter.mapper.MoneyToMoneyCustomMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

    In fact I don't know if there is is a solution but it seems obvious that Spring tries converting a native object into bean whereas the Selma documentation doesn't specify modifications for this use case.

    Any idea ? Thanks in advance

    question 
    opened by surdsey 5
  • Issue with mapping 'enum' to 'String'

    Issue with mapping 'enum' to 'String'

    I'm not sure whether it is an issue or a feature (expected behavior). I'm trying to map data from one object to another where a property of source class is of enum type where as destination property is a String.

    // source class
    class Entity {
    	enum Status { ACTIVE, FAILED, PENDING }
    	private Integer code;
    	private String description;
    	private Status status;
    	// + getters / setters
    }
    
    // destination class
    class SimpleEntity {
    	private String numericCode;
    	private String text;
    	private String statusCode;
    	// + getters / setters
    }
    
    // mapping spec
    @Mapper
    interface EntityMapper {
    	@Maps(withCustomFields = {
    		@Field({ "code", "numericCode" }),
    		@Field({ "description", "text" }),
    		@Field({ "status", "statusCode" })
    	}, withIgnoreMissing = IgnoreMissing.DESTINATION)
    	SimpleEntity toSimpleEntity(Entity entity);
    }
    
    // unit test
    class MappingTest {
    	@Test
    	void mapping() {
    		Entity entity = new Entity();
    		entity.setCode(5);
    		entity.setDescription("active entity");
    		entity.setStatus(Status.ACTIVE);
    
    		EntityMapper mapper = Selma.getMapper(EntityMapper.class);
    		SimpleEntity result = mapper.toSimpleEntity(entity);
    
    		assertEquals(result.getNumericCode(), "5");
    		assertEquals(result.getText(), "active entity");
    		assertEquals(result.getStatusCode(), "ACTIVE");
    	}
    }
    

    The execution of unit test fails:

    ...
    Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.268 sec <<< FAILURE! - in test.MappingTest
    mapping(test.MappingTest)  Time elapsed: 0.011 sec  <<< FAILURE!
    java.lang.AssertionError: expected [ACTIVE] but found []
    	at org.testng.Assert.fail(Assert.java:94)
    	at org.testng.Assert.failNotEquals(Assert.java:513)
    	at org.testng.Assert.assertEqualsImpl(Assert.java:135)
    	at org.testng.Assert.assertEquals(Assert.java:116)
    	at org.testng.Assert.assertEquals(Assert.java:190)
    	at org.testng.Assert.assertEquals(Assert.java:200)
    	at test.MappingTest.mapping(MappingTest.java:26)
    ...
    

    I also noticed that code generated by processor for mapping has an interesting implementation of enum -> String:

      public final String asString(Entity.Status inStatus) {
        java.lang.String out = null;
        if (inStatus != null) {
          out = new java.lang.String();
        }
        return out;
      }
    

    why that? why not something like:

    ...
        if (inStatus != null) {
          out = String.valueOf(inStatus);
        }
    ...
    

    or simply use toString() or name() method of enum? Is there any hidden meaning of current implementation?

    Also out.setNumericCode(inEntity.getCode() + ""); implementation for Integer looks incorrect to me, this would be fine for primitive int, but null value of Integer should be converted to null but not a "null"

    bug 
    opened by darklynx 5
  • Unable to map Nested source attribute to nested Destination Attribute

    Unable to map Nested source attribute to nested Destination Attribute

    I am trying to map 2 Model objects & as part of that using @Field annotation. Whenever I try to map nested source attribute to nested destination attribute, it throws an error giving below message : Bad custom field to field mapping: both source and destination can not be embedded

    Why is this not supported ? For the object transformation I am working on, this is the most important thing.

    Please suggest.

    wontfix 
    opened by NitinGadgil 5
  • Intercept final result

    Intercept final result

    Hi !

    It would be nice to have the ability to intercept the final result of a mapping in order to apply some post mapping logics.

    For example :

    @Maps(withCustoms = {MyInterceptor.class})
    DTO asDTO(Entity in)
    
    class MyInterceptor {
        DTO intercept(Entity in, DTO out) {
            // Do some post mapping treatment, as conditionnal field aggregation for example
            return out;
        }
    }
    
    opened by naarl 0
  • Question: Could there be an annotation to ignore bean fields from mapping?

    Question: Could there be an annotation to ignore bean fields from mapping?

    Scenario:

    if i want to exclude certain common fields across beans, at present, i have to write the following on the mapper

    @Mapper(withIgnoreFields = {"age", "Person.indices", "fr.xebia.selma.Person.tags"})

    But if the properties are common across beans then it becomes boilerplate to do this across mappers

    e.g.

    Common entities/beans

    User { } 
    Employer { }
    

    Beans that has refs to the common entities

    Work {
        @MapperIgnore
        private User user;
        @MapperIgnore
        private Employer employer;
        private String name;
    }
    
    WorkDto {
        private String name;
    }
    
    Time {
        @MapperIgnore
        private User user;
        @MapperIgnore
        private Employer employer;
        private LocalDateTime startTime;
        private LocalDateTime endTime;
    }
    TimeDto {
        private LocalDateTime startTime;
        private LocalDateTime endTime;
    }
    

    Using an annotation at bean field level will help avoid additional need to ignore these fields on each mapper and looks clean. Thoughts on implementing an annotation that ignores the common fields ?

    opened by balachandra 0
  • Selma doesn't map Enum to string

    Selma doesn't map Enum to string

    Hello,

    I notice Selma can't automatically map a String to an Enum or an Enum to a String. We have to create a CustomMapper to do something like that :

        public String enumToString(MyEnum e) {
            return e.toString();
        }
    
        public MyEnum stringToEnum(String s) {
            return MyEnum.valueOf(s);
        }
    

    This is useless code, so I suggest to add this as a feature in Selma. I can try to do it, if someone can review PR.

    BR

    opened by sebvelay 0
  • Selma Mapper not working between List<ClassA> & List<ClassB> (Java, maven)

    Selma Mapper not working between List & List (Java, maven)

    I've the class "ArticleEntity", "CategoryEntity" and "Article". I've the ArticleEntity:

    public class ArticleEntity {
     ...
     @ManyToOne
     @JoinColumn
     private CategoryEntity categoryEntity;
    
     public CategoryEntity getCategoryEntity() {
    	return categoryEntity;
     }
    
     public void setCategoryEntity(CategoryEntity categoryEntity) {
    	this.categoryEntity = categoryEntity;
     }
    }
    

    And a class B

    public class CategoryEntity {
     ...
     private String name;
     ...getter & setter
    
     @OneToMany(mappedBy = "categoryEntity")
     private List<ArticleEntity> articles;
    
     public List<ArticleEntity> getArticles() {
    	if(articles == null) {
    		articles = new ArrayList<>();
    	}
    	return articles;
     }
    
     public void setArticles(List<ArticleEntity> articles) {
    	this.articles = articles;
     }
    }
    

    And a model class:

    public class Article {
     ...
     private String categoryName;
    
     public String getCategoryName() {
    	return categoryName;
     }
    
     public void setCategoryName(String categoryName) {
    	this.categoryName = categoryName;
     }
    }
    

    With Selma, I make this mapper:

    @Mapper(withIgnoreMissing = IgnoreMissing.ALL, withIoC = IoC.SPRING) 
    public interface ArticleMapper {
      ...
      @Maps(withCustomFields = {
       @Field({"categoryEntity.name", "categoryName"})
      })
      List<Article> articlesFromArticleEntity(List<ArticleEntity> articlesEntity);
    }
    

    The result of "List Article" mapping is for example:

    [0]-> 
    CategoryName: null
    Content: "Hello here my content"
    title: "My title here !"
    

    Why mapping list with List doesn't work (CategoryName is null) ?

    opened by krabouilleur 0
  • Issue on cyclic mapping with list

    Issue on cyclic mapping with list

    Hi,

    I'm trying to map a bean A which contains a list of beans B which itself contains a list of beans A.

    I have @Mapper(withCyclicMapping = true) annotation on each of interfaces.

    Example :

    public class Person {
    
        private String firstName;
        private String lastName;
        private Date birthDay;
        private List<Address> residencies;
    
        // + Getters and Setters
    }
    
    public class Address {
    
        private String line1;
        private String line2;
        private String zipCode;
        private String city;
        private String country;
        private List<Person> persons // Cyclic reference here !
    
        // + Getters and Setters
    }
    
    @Mapper(withCyclicMappings = true)
    public interface PersonMapper {
    
        // Returns a new instance of PersonDTO mapped from Person source
        PersonDto asPersonDTO(Person source);
    
    }
    
    @Mapper(withCyclicMappings = true)
    public interface AddressMapper {
    
        // Returns a new instance of AddressDTO mapped from Address source
        AddressDto asAddressDTO(Address source);
    
    }
    

    Implementations generated by SELMA from the interfaces do not compile because the mapping methods are duplicated.

    Any idea about what's going wrong ?

    Thanks

    opened by Romain-Alexandre 0
  • How to use selma with maven

    How to use selma with maven

    I have add the libs into pom.iml fr.xebia.extras selma-processor 1.0 provided fr.xebia.extras selma 1.0 But when do a getting start, it not work, just throw exception: Unable to load generated mapper class com.gavrilov.core.mappers.UserMapperSelmaGeneratedClass failed : com.gavrilov.core.mappers.UserMapperSelmaGeneratedClass] java.lang.IllegalArgumentException: Unable to load generated mapper class com.gavrilov.core.mappers.UserMapperSelmaGeneratedClass failed : com.gavrilov.core.mappers.UserMapperSelmaGeneratedClass at fr.xebia.extras.selma.Selma.createMapperInstance(Selma.java:255) at fr.xebia.extras.selma.Selma.getMapper(Selma.java:158) at fr.xebia.extras.selma.Selma.access$100(Selma.java:56) at fr.xebia.extras.selma.Selma$MapperBuilder.build(Selma.java:349)

    opened by lionchi 1
Releases(selma-parent-1.0)
  • selma-parent-1.0(Apr 30, 2017)

    This is the first 1.0 release of Selma coming with bug fixes and many new features. Like custom mappers for field to field mapping, Maps inheritance, Bean Aggregation and CDI support.

    • #106: Add support for custom mapping method on per field basis
    • #108: Add support for abstract custom mappers
    • #100: Add support for aggregated bean mapping
    • #102: Fix default lower bound type resolution for generic types
    • #109: Fix custom mapper call with out parameter
    • #110: Properly match the fieldname when it ends with the name of the class thanks to Fanilo Randria
    • #111: Add support for inner mapper interface
    • #115: Add support for CDI injection thanks to Semiao Marco
    • #118: Filter enum private members to avoid
    • #119: Add support for mapping interfaces instead of beans
    • #120: Add support for abstract getters and setters in mapped beans thanks to @facboy
    • #126: Fix declared bean array mapping
    • #127: Fix any type to String default mapping
    • #133: Fix mapping embedded array of prime
    • #137: Improve CDI support with CDI and CDI_SINGLETON thanks to @Musikolo
    • #138: Add @InheritMaps to avoid @Maps duplication

    We now have a final 1.0 release enjoy it and give us feedback :).

    Source code(tar.gz)
    Source code(zip)
Owner
Publicis Sapient Engineering
Communauté Tech de Publicis Sapient, nous créons des logiciels de haute qualité. Nos terrains de jeu : Data, Cloud, Dev front, back, mobile, Coaching agile
Publicis Sapient Engineering
Simpler, better and faster Java bean mapping framework

Orika ! NEW We are pleased to announce the release of Orika 1.5.4 ! This version is available on Maven central repository What? Orika is a Java Bean m

null 1.2k Jan 6, 2023
dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

dOOv 77 Nov 20, 2022
Elegance, high performance and robustness all in one java bean mapper

JMapper Framework Fast as hand-written code with zero compromise. Artifact information Status Write the configuration using what you prefer: Annotatio

null 200 Dec 29, 2022
An annotation processor for generating type-safe bean mappers

MapStruct - Java bean mappings, the easy way! What is MapStruct? Requirements Using MapStruct Maven Gradle Documentation and getting help Building fro

null 5.8k Dec 31, 2022
Intelligent object mapping

ModelMapper ModelMapper is an intelligent object mapping library that automatically maps objects to each other. It uses a convention based approach wh

ModelMapper 2.1k Dec 28, 2022
A declarative mapping library to simplify testable object mappings.

ReMap - A declarative object mapper Table of Contents Long story short About ReMap Great News Mapping operations Validation Features Limitations The m

REMONDIS IT Services GmbH & Co. KG 103 Dec 27, 2022
Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another.

Dozer Active Contributors We are always looking for more help. The below is the current active list: Core @garethahealy @orange-buffalo ?? Protobuf @j

null 2k Jan 5, 2023
Simpler, better and faster Java bean mapping framework

Orika ! NEW We are pleased to announce the release of Orika 1.5.4 ! This version is available on Maven central repository What? Orika is a Java Bean m

null 1.2k Jan 6, 2023
dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

dOOv 77 Nov 20, 2022
dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

dOOv 77 Nov 20, 2022
Compiler that compiles our language flowg to g-code (4th semester project)

flowg FlowG is a language that greatly simplifies manual g-code programming. It is a high-level language that supports functions, for loops, if statem

Mads Mogensen 4 Jun 15, 2022
Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention

Beanmapper Beanmapper is a Java library for mapping dissimilar Java classes with similar names. The use cases for Beanmapper are the following: mappin

null 26 Nov 15, 2022
Elegance, high performance and robustness all in one java bean mapper

JMapper Framework Fast as hand-written code with zero compromise. Artifact information Status Write the configuration using what you prefer: Annotatio

null 200 Dec 29, 2022
An annotation processor for generating type-safe bean mappers

MapStruct - Java bean mappings, the easy way! What is MapStruct? Requirements Using MapStruct Maven Gradle Documentation and getting help Building fro

null 5.8k Dec 31, 2022
Plugin for fixing crash caused by dispensing shulker box by Union of Black Bean.

UBBDispenserShulkerBoxCrashFixer 繁體中文(香港) Purpose In servers lower than 1.13, when a dispenser is placed at y=0 and facing downwards / y=(max build he

Union of Black Bean 44 Dec 24, 2022
Spring Bean 容器创建

Spring手撸专栏:small-spring-step-01 作者: 小傅哥,Java Developer, ✏️ 虫洞 · 科技栈,博主, ?? 《重学Java设计模式》图书作者 本仓库以 Spring 源码学习为目的,通过手写简化版 Spring 框架,了解 Spring 核心原理。 在手写的

Spring 手撸专栏 13 Jul 18, 2021
Magic Bean: A very basic library which will generate POJOs.

Magic Bean: A very basic library which will generate POJOs.

Ethan McCue 48 Dec 27, 2022
DAO oriented database mapping framework for Java 8+

Doma Doma 2 is a database access framework for Java 8+. Doma has various strengths: Verifies and generates source code at compile time using annotatio

domaframework 353 Dec 28, 2022
Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper

Simple Flat Mapper Release Notes Getting Started Docs Building it The build is using Maven. git clone https://github.com/arnaudroger/SimpleFlatMapper.

Arnaud Roger 418 Dec 17, 2022
Reladomo is an enterprise grade object-relational mapping framework for Java.

Reladomo What is it? Reladomo is an object-relational mapping (ORM) framework for Java with the following enterprise features: Strongly typed compile-

Goldman Sachs 360 Nov 2, 2022