14
14
15
15
public class EventDeadLettersRedeliveryTaskAdditionalInformationDTO implements AdditionalInformationDTO {
16
16
public static class EventDeadLettersRedeliveryTaskAdditionalInformationForAll extends EventDeadLettersRedeliveryTaskAdditionalInformation {
17
- public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForAll , EventDeadLettersRedeliveryTaskAdditionalInformationDTO > MODULE =
17
+
18
+ public static class DTO extends EventDeadLettersRedeliveryTaskAdditionalInformationDTO {
19
+ public DTO (@ JsonProperty ("type" ) String type ,
20
+ @ JsonProperty ("successfulRedeliveriesCount" ) long successfulRedeliveriesCount ,
21
+ @ JsonProperty ("failedRedeliveriesCount" ) long failedRedeliveriesCount ,
22
+ @ JsonProperty ("group" ) Optional <String > group ,
23
+ @ JsonProperty ("insertionId" ) Optional <String > insertionId ,
24
+ @ JsonProperty ("timestamp" ) Instant timestamp ) {
25
+ super (type , successfulRedeliveriesCount , failedRedeliveriesCount , group ,insertionId , timestamp );
26
+ }
27
+ }
28
+
29
+ public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForAll , DTO > MODULE =
18
30
DTOModule
19
31
.forDomainObject (EventDeadLettersRedeliveryTaskAdditionalInformationForAll .class )
20
- .convertToDTO (EventDeadLettersRedeliveryTaskAdditionalInformationDTO .class )
32
+ .convertToDTO (DTO .class )
21
33
.toDomainObjectConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::fromAll )
22
- .toDTOConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::toDTO )
34
+ .toDTOConverter ((domainObject , typeName ) -> new DTO (typeName ,
35
+ domainObject .getSuccessfulRedeliveriesCount (),
36
+ domainObject .getFailedRedeliveriesCount (),
37
+ domainObject .getGroup (),
38
+ domainObject .getInsertionId (),
39
+ domainObject .timestamp ()))
23
40
.typeName (EventDeadLettersRedeliverAllTask .TYPE .asString ())
24
41
.withFactory (AdditionalInformationDTOModule ::new );
25
42
@@ -30,12 +47,29 @@ public static class EventDeadLettersRedeliveryTaskAdditionalInformationForAll ex
30
47
}
31
48
32
49
public static class EventDeadLettersRedeliveryTaskAdditionalInformationForGroup extends EventDeadLettersRedeliveryTaskAdditionalInformation {
33
- public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForGroup , EventDeadLettersRedeliveryTaskAdditionalInformationDTO > MODULE =
50
+
51
+ public static class DTO extends EventDeadLettersRedeliveryTaskAdditionalInformationDTO {
52
+ public DTO (@ JsonProperty ("type" ) String type ,
53
+ @ JsonProperty ("successfulRedeliveriesCount" ) long successfulRedeliveriesCount ,
54
+ @ JsonProperty ("failedRedeliveriesCount" ) long failedRedeliveriesCount ,
55
+ @ JsonProperty ("group" ) Optional <String > group ,
56
+ @ JsonProperty ("insertionId" ) Optional <String > insertionId ,
57
+ @ JsonProperty ("timestamp" ) Instant timestamp ) {
58
+ super (type , successfulRedeliveriesCount , failedRedeliveriesCount , group ,insertionId , timestamp );
59
+ }
60
+ }
61
+
62
+ public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForGroup , DTO > MODULE =
34
63
DTOModule
35
64
.forDomainObject (EventDeadLettersRedeliveryTaskAdditionalInformationForGroup .class )
36
- .convertToDTO (EventDeadLettersRedeliveryTaskAdditionalInformationDTO .class )
65
+ .convertToDTO (DTO .class )
37
66
.toDomainObjectConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::fromGroup )
38
- .toDTOConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::toDTO )
67
+ .toDTOConverter ((domainObject , typeName ) -> new DTO (typeName ,
68
+ domainObject .getSuccessfulRedeliveriesCount (),
69
+ domainObject .getFailedRedeliveriesCount (),
70
+ domainObject .getGroup (),
71
+ domainObject .getInsertionId (),
72
+ domainObject .timestamp ()))
39
73
.typeName (EventDeadLettersRedeliverGroupTask .TYPE .asString ())
40
74
.withFactory (AdditionalInformationDTOModule ::new );
41
75
@@ -46,12 +80,28 @@ public static class EventDeadLettersRedeliveryTaskAdditionalInformationForGroup
46
80
}
47
81
48
82
public static class EventDeadLettersRedeliveryTaskAdditionalInformationForOne extends EventDeadLettersRedeliveryTaskAdditionalInformation {
49
- public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForOne , EventDeadLettersRedeliveryTaskAdditionalInformationDTO > MODULE =
83
+ public static class DTO extends EventDeadLettersRedeliveryTaskAdditionalInformationDTO {
84
+ public DTO (@ JsonProperty ("type" ) String type ,
85
+ @ JsonProperty ("successfulRedeliveriesCount" ) long successfulRedeliveriesCount ,
86
+ @ JsonProperty ("failedRedeliveriesCount" ) long failedRedeliveriesCount ,
87
+ @ JsonProperty ("group" ) Optional <String > group ,
88
+ @ JsonProperty ("insertionId" ) Optional <String > insertionId ,
89
+ @ JsonProperty ("timestamp" ) Instant timestamp ) {
90
+ super (type , successfulRedeliveriesCount , failedRedeliveriesCount , group ,insertionId , timestamp );
91
+ }
92
+ }
93
+
94
+ public static final AdditionalInformationDTOModule <EventDeadLettersRedeliveryTaskAdditionalInformationForOne , DTO > MODULE =
50
95
DTOModule
51
96
.forDomainObject (EventDeadLettersRedeliveryTaskAdditionalInformationForOne .class )
52
- .convertToDTO (EventDeadLettersRedeliveryTaskAdditionalInformationDTO .class )
97
+ .convertToDTO (DTO .class )
53
98
.toDomainObjectConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::fromOne )
54
- .toDTOConverter (EventDeadLettersRedeliveryTaskAdditionalInformationDTO ::toDTO )
99
+ .toDTOConverter ((domainObject , typeName ) -> new DTO (typeName ,
100
+ domainObject .getSuccessfulRedeliveriesCount (),
101
+ domainObject .getFailedRedeliveriesCount (),
102
+ domainObject .getGroup (),
103
+ domainObject .getInsertionId (),
104
+ domainObject .timestamp ()))
55
105
.typeName (EventDeadLettersRedeliverOneTask .TYPE .asString ())
56
106
.withFactory (AdditionalInformationDTOModule ::new );
57
107
@@ -66,16 +116,6 @@ public static class EventDeadLettersRedeliveryTaskAdditionalInformationForOne ex
66
116
}
67
117
}
68
118
69
- private static EventDeadLettersRedeliveryTaskAdditionalInformationDTO toDTO (EventDeadLettersRedeliveryTaskAdditionalInformation domainObject , String typeName ) {
70
- return new EventDeadLettersRedeliveryTaskAdditionalInformationDTO (
71
- typeName ,
72
- domainObject .getSuccessfulRedeliveriesCount (),
73
- domainObject .getFailedRedeliveriesCount (),
74
- domainObject .getGroup (),
75
- domainObject .getInsertionId (),
76
- domainObject .timestamp ());
77
- }
78
-
79
119
private static EventDeadLettersRedeliveryTaskAdditionalInformationForAll fromAll (EventDeadLettersRedeliveryTaskAdditionalInformationDTO dto ) {
80
120
return new EventDeadLettersRedeliveryTaskAdditionalInformationForAll (
81
121
dto .successfulRedeliveriesCount ,
0 commit comments