TagMapperImpl.java
package io.featureprobe.api.mapper;
import io.featureprobe.api.dao.entity.Tag;
import io.featureprobe.api.dao.entity.Tag.TagBuilder;
import io.featureprobe.api.dto.TagRequest;
import io.featureprobe.api.dto.TagResponse;
import javax.annotation.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2023-10-07T17:43:36+0800",
comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_382 (Red Hat, Inc.)"
)
public class TagMapperImpl implements TagMapper {
@Override
public TagResponse entityToResponse(Tag tag) {
if ( tag == null ) {
return null;
}
TagResponse tagResponse = new TagResponse();
tagResponse.setName( tag.getName() );
return tagResponse;
}
@Override
public Tag requestToEntity(TagRequest tagRequest) {
if ( tagRequest == null ) {
return null;
}
TagBuilder tag = Tag.builder();
tag.name( tagRequest.getName() );
return tag.build();
}
}