title: Cannot mapping with MapStruct an Enum from Integer
body: <p>I Have a problem attempting mapping to an ENUM from an Integer value, my method mapping its:</p>
  <pre><code>@Mapping(
        target = &quot;myModel.states&quot;,// this is my ENUM
        source = &quot;source.stateId&quot;) // this is the Integer Value
    ClsTargetModel mapCreditCard(ClsMyClass source);
  </code></pre>
  <p>ENUM and entity model:</p>
  <p>Entity:</p>
  <pre><code>@Getter
  @Setter
  @Entity
  @Table(name = &quot;my_table&quot;)
  public class MyEntityModel {
    @Id
    @Column(name = &quot;id&quot;)
    private Integer id;
  
    @Basic
    @Column(name = &quot;description&quot;)
    private String description;
  }
  </code></pre>
  <p>ENUM:</p>
  <pre><code>@Getter
  @ToString
  public enum EnumStates {
    STATE1(1),
    STATE2(2),
    STATE3(3);
  
    public Integer id;
  
    EnumStates(Integer id) {
      this.id = id;
    }
  
    public static EnumStates getStateById(Integer stateId) {
      return Arrays.stream(EnumStates.values())
          .filter(enumStateValue -&gt; enumStateValue.id == stateId)
          .findFirst()
          .orElse(null);
    }
  }
  </code></pre>
  <p>When Im trying of mapping the ID from Model Entity to the ENUM, then mapstruct show me an error:</p>
  <pre><code>error: Can't map property &quot;java.lang.Integer Id&quot; to &quot;EnumStates states&quot;. Consider to declare/implement a mapping method: &quot;EnumStates map(java.lang.Integer value)&quot;.
  </code></pre>
  <p>I think that the method was declare in the enum, but mapstruct always responds that error, can you check my code please ?</p>