94 Commits

Author SHA1 Message Date
jude.niroshan11@gmail.com
c4135e68ed #2339 Support throwing an exception as an Enum Mapping option 2021-03-15 00:32:01 +01:00
Jeroen van Wilgenburg
d5703d3ee8 #2368 fix order of target parameter in documentation 2021-03-01 20:58:13 +01:00
Filip Hrisafov
630a8da904 Fix a typo in the Mapper#componentModel 2021-02-06 16:44:07 +01:00
Tomas Poledny
4223e3ab81 #2255 Add constants for componentModel 2021-01-17 15:13:42 +01:00
Filip Hrisafov
7dcbef349d
#2169 Add support for defining a custom unexpected value mapping exception
Expose definition via:

* `@EnumMapping`
* `@Mapper`
* `@MapperConfig`
* `EnumMappingStrategy` SPI

Rename `EnumNamingStrategy` to `EnumMappingStrategy`
2020-08-29 13:53:30 +02:00
Filip Hrisafov
609824037b #2167 Add missing @since 1.4 to new interfaces, classes and methods 2020-08-01 11:43:46 +02:00
Filip Hrisafov
7b5a54971f
Add EnumTransformationStrategy SPI (#2089)
Add a new custom EnumTransformationStrategy SPI which can be used for providing custom way of name based mapping for enums.

Add 4 out of the box transformation strategies:

* prefix - add a prefix to the name based enum mapping
* stripPrefix - remove a prefix from the name based enum mapping
* suffix - add a suffix to the name based enum mapping
* stripSuffix - remove a suffix from the name based enum mapping

This can be achieved by using the new `EnumMapping`

e.g.

Add suffix `_TYPE` to all enums:

`@EnumMapping(nameTransformationStrategy = "suffix", configuration = "_TYPE")`

With this it would be possible to achieve what is needed in #796, #1220, #1789.
2020-05-18 07:17:30 +02:00
Sjaak Derksen
58da2d293f
#695 user control over mapping means (direct, method, conversion, 2step) 2020-02-02 10:05:26 +01:00
Sjaak Derksen
c153c8bf5a
#1983 javadoc and doc on @ignore in @InheritInverseConfituration (#1986) 2019-12-23 20:41:38 +01:00
Sjaak Derksen
ee794d042c
#807 meta annotations and duck typing (#1979) 2019-12-07 22:20:11 +01:00
Sjaak Derksen
507ec1b384
#1557 & #1936 String-to-enum and enum-to-String (#1938)
* #1557 making enum-to-string and string-to-enum

* #1936 <ANY_REMAINING> and <ANY_UNMAPPED> not ignored when inverting
2019-10-07 20:30:20 +02:00
Andrei Arlou
61f941aa80
#166 Add code-examples to Javadoc of org.mapstruct.* annotations (#1876) 2019-09-22 21:25:57 +03:00
dekelpilli
f84f6501c8 #1851 Do not allow using qualifiedBy and qualifiedByName with expression in Mapping 2019-09-22 13:53:19 +02:00
Andrei Arlou
447bb00f89
#1773 Update documentation: componentModel=jsr330 with @DecoratedWith not longer experimental (#1907) 2019-09-18 07:18:05 +03:00
Sjaak Derksen
33710584d3
#1742 & #1661 refactoring and making builder optional (#1811) 2019-05-24 23:30:16 +02:00
Thibault Duperron
60208b67af #1435 add import to MapperConfig 2019-02-14 22:24:42 +01:00
Sjaak Derksen
0981959ff0
#1699 add sensible defaults to NullValuePropertyMapping.SET_TO_DEFAULT (#1702) 2019-01-28 22:47:37 +01:00
Sjaak Derksen
57caee250f
#1685 completing nullvaluepropertymappingstrategy (#1697) 2019-01-27 21:09:44 +01:00
Christian Bandowski
0e33ad4bbc #1657 Add Mappers.getMapperClass for getting the class of a Mapper 2018-12-22 15:19:39 +01:00
Filip Hrisafov
9a43b210d3 Add since tag to new API elements 2018-11-24 02:07:31 +01:00
Sjaak Derksen
e69647f756
#5 controlling lossy conversions (also solving #1504 partially and #1458) 2018-11-02 07:56:51 +00:00
Sjaak Derksen
288813fc3c
#1306 Add new NullValuePropertyMappingStrategy which leaves @MappingTarget untouched (#1618) 2018-10-25 22:14:26 +01:00
Florian Tavares
71e9bd3699 #1301 code improvements / adaptations after language-level upgrade 2018-10-19 20:36:07 +01:00
Florian Tavares
d81d3e46a4 #1301 Use Java 8 as baseline for MapStruct
* Move classes from mapstruct-common into mapstruct
* Use Java 8 @Repeatable for @Mappings and @ValueMappings in the mapstruct module
* Add relocation for mapstruct-jdk8 to mapstruct
* Use of 1.8 source and target versions from parent POM
* Update documentation to match
* Update versions of some maven plugin crashing build on Java 8
* Drop JDK 6 & 7 support in integration tests
* Remove mapstruct-common module (it was never deployed to Central)
2018-10-15 22:16:33 +02:00
Sjaak Derksen
459f57e805
#1571 apply nullvaluecheck strategy on all relevant levels 2018-09-24 23:35:35 +02:00
MapStruct Team
b35126e609 #1411 Update copyright header on all files
* Use new shorter copyright header without a year
* Use SLASHSTAR_STYLE for Java files
2018-07-15 19:29:28 +02:00
Christian Bandowski
9e299a2ba1 Use constants instead of strings in ValueMapping javadoc 2018-05-05 22:19:27 +02:00
sjaakd
ffb720dc29 #1459 javadoc on constant assigment 2018-04-29 09:12:49 +02:00
Filip Hrisafov
47ffb04106 #1436 Add since tag to new API elements 2018-04-22 16:33:14 +02:00
Jeff Smyth
48b9bd72be #1363 Add support for using default expression 2018-02-19 23:01:51 +01:00
Andreas Gudian
b02f8e5df5 #1032 Update license headers to 2017 2017-01-05 18:55:26 +01:00
sjaakd
b1f03689d9 #669 rework into sourcepresencecheck SPI and nullvaluecheckstrategy 2016-07-05 22:50:10 +02:00
seanjob
1af4441d2d #669 ispresentcheck and NULL check implementation 2016-07-05 22:50:10 +02:00
Andreas Gudian
b9bccdb225 #805 use basic ASCII chars in the javadoc ASCII art tables 2016-06-29 22:14:23 +02:00
sjaakd
3700052cc6 #679 Adding testcases, helpermethods for decimalconversion, doc update 2016-06-15 23:34:48 +02:00
cliedeman
607d0fd6f0 Implemented Feature from Issue #679: Support of numberFormat for Number to String mapping 2016-06-07 22:16:04 +02:00
sjaakd
d59873d923 Fixing some general javadoc issues. 2016-03-15 22:20:10 +01:00
sjaakd
ae4d0f77e1 #749 Introduction of @ValueMapping, @ValueMappings 2016-03-15 21:19:55 +01:00
Gunnar Morling
5e88dae8ce #750 Further expanding comment 2016-02-20 11:42:47 +01:00
sjaakd
bb1ccac434 #750 Introducing the @Named annotation 2016-02-16 21:10:30 +01:00
Gunnar Morling
34aceff5f8 #723 Updating year in license headers 2016-01-16 18:00:09 +01:00
Andreas Gudian
2a385c0ec8 #600 Improve generated assignment code when using default-values, enhance javadoc a little and remove unused attribute in PropertyMapping 2015-08-12 23:58:56 +02:00
luxmeter
964f676af6 #600 added defaultValue feature 2015-08-12 23:58:56 +02:00
Andreas Gudian
e31296d7f9 #494 Fix javadoc errors popping up during the build 2015-05-14 23:13:49 +02:00
Gunnar Morling
2d7ab089ff #304 Allowing to configure dependencies between properties via @Mapping#dependsOn() 2015-03-04 00:32:33 +01:00
Andreas Gudian
ea73669096 #168 Change retention of method-level annotations to CLASS, as they now need to be read from other classes as well 2015-02-25 14:50:39 +01:00
sjaakd
adcc89b184 #433 introduce resultType in @Mapping 2015-01-27 19:48:12 +01:00
Gunnar Morling
483b88c6d2 #271 Improving JavaDocs for @Mapping#expression() 2015-01-25 11:26:48 +01:00
Gunnar Morling
13f9a5027a #213 Updating license header 2015-01-07 20:11:59 +01:00
sjaakd
7948acf630 #348 Mapping parameters based on name when other mappings fail 2014-11-23 22:00:07 +01:00