Class MapperUtils
- java.lang.Object
-
- dev.pcvolkmer.mv64e.datamapper.mapper.MapperUtils
-
@Deprecated(since="0.3.1") public class MapperUtils extends java.lang.ObjectDeprecated.Some basic util methods for Data Mappers- Since:
- 0.2
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> java.util.Optional<T>tryAndReturnOrLog(@NonNull java.util.function.Supplier<T> supplier)Deprecated.UseTryAndLog.tryAndLogWithResult(Supplier)instead.static <T> java.util.Optional<T>tryAndReturnOrLog(@NonNull java.util.function.Supplier<T> supplier, @NonNull org.slf4j.Logger logger)Deprecated.UseTryAndLog.tryAndLogWithResult(Supplier)instead.
-
-
-
Method Detail
-
tryAndReturnOrLog
@Deprecated(since="0.3.1") public static <T> java.util.Optional<T> tryAndReturnOrLog(@NonNull java.util.function.Supplier<T> supplier)
Deprecated.UseTryAndLog.tryAndLogWithResult(Supplier)instead.Executes supplier and returns Optional.empty() if an IgnorableMappingException occurs. The exceptions message will be logged as error.- Type Parameters:
T- The type of the supplied value- Parameters:
supplier- The supplier to be executed- Returns:
- An optional containing the supplied value or empty option.
-
tryAndReturnOrLog
@Deprecated(since="0.3.1") public static <T> java.util.Optional<T> tryAndReturnOrLog(@NonNull java.util.function.Supplier<T> supplier, @NonNull org.slf4j.Logger logger)Deprecated.UseTryAndLog.tryAndLogWithResult(Supplier)instead.Executes supplier and returns Optional.empty() if an IgnorableMappingException occurs. The exceptions message will be logged as error.- Type Parameters:
T- The type of the supplied value- Parameters:
supplier- The supplier to be executedlogger- The logger to be used for logging the exception message- Returns:
- An optional containing the supplied value or empty option.
-
-