259 Commits

Author SHA1 Message Date
Filip Hrisafov
2fede3583d [maven-release-plugin] prepare for next development iteration 2020-07-18 01:12:05 +02:00
Filip Hrisafov
fc4f65ddb6 [maven-release-plugin] prepare release 1.4.0.Beta2 2020-07-05 23:11:41 +02:00
SahinSarkar
13df6a21bc Fixed typo in documentation 2020-07-04 16:55:24 +02:00
Filip Hrisafov
d87d75a7a8 [maven-release-plugin] prepare for next development iteration 2020-06-01 13:42:32 +02:00
Filip Hrisafov
72ce5f3bd2 [maven-release-plugin] prepare release 1.4.0.Beta1 2020-06-01 13:42:32 +02:00
Filip Hrisafov
fc5e1ffe6b Upgrade to latest 1.6.2 asciidoc and fix incorrect closing documentation tag 2020-05-30 15:34:54 +02:00
Filip Hrisafov
c23592a7fe
Add EnumNamingStrategy SPI (#2100)
Add a new EnumNamingStrategy SPI which can be used for customising the way enums are matched by name.
It is similar to the AccessorNamingStrategy such that it allows implementors to provide a custom way of defining a property.

Related to #796, #1220, #1789 and #1667
2020-05-25 21:31:29 +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
Filip Hrisafov
2b2299a730 #73 Add support for using constructor arguments when instantiating mapping targets
By default the constructor argument names are used to extract the target properties.
If a constructor is annotated with an annotation named `@ConstructorProperties` (from any package) then it would be used to extract the target properties.

If a mapping target has a parameterless empty constructor it would be used to instantiate the target.
When there are multiple constructors then an annotation named `@Default` (from any package) can be used to mark a constructor that should be used by default when instantiating the target.

Supports mapping into Java 14 Records and Kotlin data classes out of the box
2020-04-26 12:44:41 +02:00
Pawel Radzinski
bbd68baf64
Update chapter-10-advanced-mapping-options.asciidoc (#2050)
Correct some typos and punctuation here and there.
2020-03-30 21:11:07 +02:00
Sean C. Sullivan
273487f152 maven-compiler-plugin 3.8.1 2020-02-18 07:16:31 +01:00
Sjaak Derksen
58da2d293f
#695 user control over mapping means (direct, method, conversion, 2step) 2020-02-02 10:05:26 +01:00
Marcel Overdijk
327730127b Updated docs to add compilerArgs instead of replacing them.
When configuring MapStruct compilerArgs *add* them, no *replace*
2020-01-24 21:59:46 +01:00
Sjaak Derksen
076f3ba839
#1995 follow up, small typo 2020-01-10 20:16:25 +01:00
Sjaak Derksen
57cfd35afc
#1995 and mapstruct/mapstruct.org#101 nesting calling custom method (#1999)
Co-authored-by: coffman21 <fire2low@gmail.com>
2020-01-09 20:59:36 +01:00
Sjaak Derksen
c153c8bf5a
#1983 javadoc and doc on @ignore in @InheritInverseConfituration (#1986) 2019-12-23 20:41:38 +01:00
fml2
84062bf78f docs: Fix typo in the builder section 2019-12-09 21:01:19 +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
Sjaak Derksen
0d23f09e37
#1918 multiple target this mappings (#1920) 2019-09-23 20:04:56 +02:00
Dainius Figoras
88a8669642 #1406 targeting . as current object 2019-09-22 19:08:05 +02:00
Andrei Arlou
f4c9313972
#1791 Support for conversion between java.time.LocalDateTime and javax.xml.datatype.XMLGregorianCalendar (#1894) 2019-09-21 22:27:45 +03:00
Andrei Arlou
750ce48023 #1792 Annotation processor option for default injection strategy 2019-09-18 19:51:36 +02:00
Andrei Arlou
447bb00f89
#1773 Update documentation: componentModel=jsr330 with @DecoratedWith not longer experimental (#1907) 2019-09-18 07:18:05 +03:00
Andrei Arlou
ba90c95f23 #991 Split reference guide source into an adoc file per chapter 2019-08-24 20:51:16 +03:00
Sjaak Derksen
66e57b0dfe
#1862 Update @MappingTarget documentation to take builders (#1864) 2019-08-13 18:44:49 +02:00
Matt Drees
9c33199a66 Improve terms in qualifier docs (#1814)
This sentence is talking about `@Target`, not `@Retention`.
Also, let's use 'type' instead of 'class' to line up with `ElementType.TYPE`.
2019-05-25 11:34:30 +02:00
Sjaak Derksen
33710584d3
#1742 & #1661 refactoring and making builder optional (#1811) 2019-05-24 23:30:16 +02:00
Sjaak Derksen
648ebceb30
#1819 documentation clarification on obtaining Mapper (#1820) 2019-05-16 22:23:37 +02:00
Sjaak Derksen
871353fccb
#1784 NullValueMappingStrategy.RETURN_DEFAULT refers wrongly to primitive types (#1785) 2019-04-07 21:38:22 +02:00
power721
7e112ccc2f Fix typo and code error in documentation (#1779)
* fix typo in documentation "Using builders"

* fix generated code example in stream mapping
2019-04-03 20:21:08 +02:00
juliojgd
63c5fc8eff Fix typo in documentation (#1760)
It is "then" instead "than
2019-03-20 21:37:47 +01:00
Sjaak Derksen
b53741d960
#37 Rudimentary logging in mapstruct (#1741)
* #37 Rudimentary logging in mapstruct

* #37 Rudimentary logging in mapstruct changed order

* #37 rework

* #37 documentation

* #37 comments

* #37 docmentation revisited

* #37 review comments

* #37 unit test

* #37 unit test fixing empty mapper

* #37 rework comments christian

* #37 adding deferred mapper logging

* #37 adding unit test for deferred mapper logging

* #37 processing comments Filip
2019-03-17 16:45:22 +01:00
Sjaak Derksen
160549a788
#1142 update documentation (#1710)
* #1142 update documentation

* #1142 comment
2019-02-10 22:08:38 +01:00
Filip Hrisafov
a28f2cb9cf [maven-release-plugin] prepare for next development iteration 2019-02-10 11:48:20 +01:00
Filip Hrisafov
984423dfee [maven-release-plugin] prepare release 1.3.0.Final 2019-02-10 11:48:19 +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
Andres Jose Sebastian Rincon Gonzalez
abd1cfb6a1 #1695 update gradle installation 2019-01-22 22:49:30 +01:00
Taras Mychaskiw
780fd73928 #1656 Support for mapping between String and java.time Duration, Period, Instant 2018-12-08 20:25:42 +01:00
Filip Hrisafov
2977c2e614
#1645 Use Repeatable Mapping annotation in the reference documentation 2018-11-11 13:57:42 +01:00
Filip Hrisafov
ced7f3b024 [maven-release-plugin] prepare for next development iteration 2018-11-11 09:19:06 +01:00
Filip Hrisafov
3f2c1cee55 [maven-release-plugin] prepare release 1.3.0.Beta2 2018-11-11 09:19:05 +01:00
Filip Hrisafov
60611d94cf Add more info for the FreeBuilder support in the documentation
* Add the usage of the FreeBuilderAccessorNamingStrategy when FreeBuilder is present
* And the fact that the JavaBean convention should be followed when using FreeBuilder
2018-11-03 09:03:22 +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
dgruntz
cfe0f6250c Renames MAPPER field to INSTANCE (#1632) 2018-10-25 18:26:39 +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
Filip Hrisafov
20bff96e99
#1591 Update reference guide with implicit conversion between java.time.LocaDate and java.sql.Date 2018-10-15 21:46:23 +02:00
Filip Hrisafov
6d5243dc2f #1551 Use javax.annotation.processing.Generated if it is available and source version is at least RELEASE_9 2018-10-13 19:07:24 +02:00