• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExpediaGroup / bull / #945

19 Apr 2024 01:22PM UTC coverage: 100.0%. Remained the same
#945

push

web-flow
Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.3 to 3.2.4 (#492)

* Bump org.apache.maven.plugins:maven-gpg-plugin from 3.2.3 to 3.2.4

Bumps [org.apache.maven.plugins:maven-gpg-plugin](https://github.com/apache/maven-gpg-plugin) from 3.2.3 to 3.2.4.
- [Release notes](https://github.com/apache/maven-gpg-plugin/releases)
- [Commits](https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.2.3...maven-gpg-plugin-3.2.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-gpg-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Trigger notification

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Fabio Borriello <fborriello@expediagroup.com>

1198 of 1198 relevant lines covered (100.0%)

1.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/bull-bean-transformer/src/main/java/com/expediagroup/beans/transformer/BeanTransformer.java
1
/**
2
 * Copyright (C) 2019-2023 Expedia, Inc.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package com.expediagroup.beans.transformer;
17

18
import com.expediagroup.transformer.Transformer;
19
import com.expediagroup.transformer.error.MissingFieldException;
20

21
/**
22
 * Utility methods for populating Mutable, Immutable and Hybrid JavaBeans properties via reflection.
23
 * The implementations are provided by {@link TransformerImpl}.
24
 */
25
public interface BeanTransformer extends Transformer<BeanTransformer> {
26
    /**
27
     * Copies all properties from an object to a new one.
28
     * @param sourceObj the source object
29
     * @param targetClass the destination object class
30
     * @param <T> the Source object type
31
     * @param <K> the target object type
32
     * @return a copy of the source object into the destination object
33
     * @throws IllegalArgumentException if any parameter is invalid
34
     */
35
    <T, K> K transform(T sourceObj, Class<? extends K> targetClass);
36

37
    /**
38
     * Copies all properties from an object to a new one.
39
     * @param sourceObj the source object
40
     * @param targetObject the destination object
41
     * @param <T> the Source object type
42
     * @param <K> the target object type
43
     * @throws IllegalArgumentException if any parameter is invalid
44
     */
45
    <T, K> void transform(T sourceObj, K targetObject);
46

47
    /**
48
     * It allows to configure the transformer in order to set a default value in case some field is missing in the source object.
49
     * If set to true the default value is set, if false if it raises a: {@link MissingFieldException} in case of missing fields.
50
     * @param useDefaultValue true in case the default value should be set, false if it should raise a:
51
     * {@link MissingFieldException} in case of missing field.
52
     * @return the {@link BeanTransformer} instance
53
     */
54
    BeanTransformer setDefaultValueForMissingField(boolean useDefaultValue);
55

56
    /**
57
     * It allows to enable/disable the set of the default value for primitive types in case they are null.
58
     * @param useDefaultValue if true the default value for the primitive type is set. By default it's true.
59
     * @return the {@link BeanTransformer} instance
60
     */
61
    BeanTransformer setDefaultValueForMissingPrimitiveField(boolean useDefaultValue);
62

63
    /**
64
     * It allows to configure the transformer in order to apply a transformation function on all fields matching the given name without keeping in consideration their full path.
65
     * If set to true the default value is set, if false if it raises a: {@link MissingFieldException} in case of missing fields.
66
     * @param useFlatTransformation indicates if the transformer function has to be performed on all fields matching the given name without keeping in consideration their full
67
     *                              path.
68
     * @return the {@link BeanTransformer} instance
69
     */
70
    BeanTransformer setFlatFieldNameTransformation(boolean useFlatTransformation);
71

72
    /**
73
     * It allows to enable the object validation.
74
     * @param validationEnabled if true the validation is performed.
75
     * @return the {@link BeanTransformer} instance
76
     */
77
    BeanTransformer setValidationEnabled(boolean validationEnabled);
78

79
    /**
80
     * Allows to specify all the fields for which the transformation have to be skipped.
81
     * @param fieldName the destination object's field(s) name that have to be skipped
82
     * @return the {@link BeanTransformer} instance
83
     */
84
    BeanTransformer skipTransformationForField(String... fieldName);
85

86
    /**
87
     * Removes all the configured fields to skip.
88
     */
89
    void resetFieldsTransformationSkip();
90

91
    /**
92
     * It allows to enable/disable the automatic conversion of primitive types.
93
     * @param primitiveTypeConversionEnabled if true primitive types are transformed automatically. By default it's false.
94
     * @return the {@link BeanTransformer} instance
95
     */
96
    BeanTransformer setPrimitiveTypeConversionEnabled(boolean primitiveTypeConversionEnabled);
97

98
    /**
99
     * It allows to enable/disable the transformation of Java Bean with a custom Builder pattern.
100
     * @param customBuilderEnabled if true Java Beans with a custom Builder pattern are transformed automatically. By default it's false.
101
     * @return the {@link BeanTransformer} instance
102
     */
103
    BeanTransformer setCustomBuilderTransformationEnabled(boolean customBuilderEnabled);
104
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc