Class CustomColumnMapper.MappingResult

java.lang.Object
com.pyranid.CustomColumnMapper.MappingResult
Enclosing interface:
CustomColumnMapper

@ThreadSafe public abstract static sealed class CustomColumnMapper.MappingResult extends Object
Result of a custom column mapping attempt.

Use of(Object) to indicate a successfully mapped value or fallback() to indicate "didn't map; fall back to the registered ResultSetMapper behavior".

Since:
3.0.0
Author:
Mark Allen
  • Method Details

    • of

      @Nonnull public static CustomColumnMapper.MappingResult of(@Nullable Object value)
      Indicates a successfully-mapped custom value.
      Parameters:
      value - the custom value, may be null
      Returns:
      a result which indicates a successfully-mapped custom value
    • fallback

      @Nonnull public static CustomColumnMapper.MappingResult fallback()
      Indicates that this mapper did not map a custom value and prefers to fall back to the behavior of the registered ResultSetMapper.
      Returns:
      a result which indicates that this mapper did not map a custom value