ZenubisSpyke
ZenubisSpyke

Reputation: 1

Using alternate value check in Mapstruct

I'm trying to use Mapstruct to build out a large number of objects that will be converted. Due to the nature of the systems using the objects they are populated with default values and instead have a separate "is[fieldName]Set" field to determine if a value has actually been assigned to the field or not. For example:

public class exampleObject {
  private Integer id;
  private Boolean isIdSet;
  private String name;
  private Boolean isNameSet;
  private Float coolNumber;
  private Boolean isCoolNumberSet;
}

How would I change the base way that Mapstruct checks for value population from checking to make sure the value isn't null to checking to see if the isSet for the field is true or not?

Upvotes: 0

Views: 16

Answers (0)

Related Questions