Package com.identityworksllc.iiq.common
Interface Mappable
-
- All Known Implementing Classes:
AccessCheckResponse
public interface Mappable
An interface implementing atoMap()
default method to transform any object into a Map using Jackson.Simply implement this interface and enjoy the use of toMap() without any boilerplate code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Mappable.FilterMixin
Sneaky mixin to enable this class to use its custom filter on classes that don’t support it
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default Map<String,Object>
toMap()
Returns a non-null Map representation of this object.static Map<String,Object>
toMap(Object whatever, Set<String> exclusions)
Returns a non-null Map representation of the given object using Jackson as a transformation engine.default Set<String>
toMapFieldExclusions()
Optionally returns a list of fields to exclude from serialization.
-
-
-
Method Detail
-
toMap
static Map<String,Object> toMap(Object whatever, Set<String> exclusions)
Returns a non-null Map representation of the given object using Jackson as a transformation engine.If the input is null, an empty HashMap will be returned.
- Parameters:
whatever
- The object to transformexclusions
- A set of fields to exclude from serialization, or null if none- Returns:
- The resulting map
-
toMap
default Map<String,Object> toMap() throws sailpoint.tools.GeneralException
Returns a non-null Map representation of this object.Only non-null values will be included by default.
- Returns:
- A Map representation of this object.
- Throws:
sailpoint.tools.GeneralException
- if Map conversion fails for any reason
-
toMapFieldExclusions
default Set<String> toMapFieldExclusions()
Optionally returns a list of fields to exclude from serialization.This will be used in addition to any fields annotated with JsonIgnore.
- Returns:
- Returns a list of fields to exclude from serialization
-
-