org.mapstruct.Mappings Java Examples
The following examples show how to use
org.mapstruct.Mappings.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OrderConverter.java From gpmall with Apache License 2.0 | 7 votes |
@Mappings({}) OrderItemDto item2dto(OrderItem item);
Example #2
Source File: User2UserVoMapper.java From dubbo-spring-boot-learning with MIT License | 6 votes |
/** * userDto to userVo * * @param user 用户 * @return UserVo */ @Mappings({ @Mapping(target = "id", source = "user.id"), @Mapping(target = "name", source = "user.name"), @Mapping(target = "birth", source = "user.birth") }) UserVo user2UserVo(UserDto user);
Example #3
Source File: ProductCateConverter.java From gpmall with Apache License 2.0 | 6 votes |
@Mappings({ @Mapping(source = "id",target = "id"), @Mapping(source = "name",target = "name"), @Mapping(source = "parentId",target = "parentId"), @Mapping(source = "isParent",target = "isParent"), @Mapping(source = "icon",target = "iconUrl") }) ProductCateDto item2Dto(ItemCat itemCat);
Example #4
Source File: ProductConverter.java From gpmall with Apache License 2.0 | 5 votes |
@Mappings({ @Mapping(source = "id",target = "productId"), @Mapping(source = "title",target = "productName"), @Mapping(source = "price",target = "salePrice"), @Mapping(source = "sell_point",target = "subTitle"), @Mapping(source = "image",target = "picUrl") }) ProductDto item2Dto(ItemDocument item);
Example #5
Source File: User2UserDtoMapper.java From dubbo-spring-boot-learning with MIT License | 5 votes |
/** * user to userDto * * @param user 用户 * @return UserDto */ @Mappings({ @Mapping(target = "id", source = "user.id"), @Mapping(target = "name", source = "user.name"), @Mapping(target = "birth", source = "user.birth") }) UserDto user2UserDto(UserEntity user);
Example #6
Source File: ProjectRoMapper.java From AuTe-Framework with Apache License 2.0 | 5 votes |
@Mappings({ @Mapping(target = "serviceUrl", source = "serviceUrl"), @Mapping(target = "dbUrl", source = "dbUrl"), @Mapping(target = "dbUser", source = "dbUser"), @Mapping(target = "dbPassword", source = "dbPassword"), @Mapping(target = "wireMockUrl", source = "wireMockUrl") }) abstract Stand updateStandFromRo(StandRo standRo);
Example #7
Source File: ProjectRoMapper.java From AuTe-Framework with Apache License 2.0 | 5 votes |
@Mappings({ @Mapping(target = "mqService", source = "mqService"), @Mapping(target = "host", source = "host"), @Mapping(target = "port", source = "port"), @Mapping(target = "username", source = "username"), @Mapping(target = "password", source = "password"), @Mapping(target = "channel", source = "channel"), @Mapping(target = "maxTimeoutWait", source = "maxTimeoutWait"), @Mapping(target = "useCamelNamingPolicyIbmMQ", source = "useCamelNamingPolicyIbmMQ") }) public abstract AmqpBroker updateAmqpBrokerFromRo(AmqpBrokerRo amqpBrokerRo);
Example #8
Source File: StepRoMapper.java From AuTe-Framework with Apache License 2.0 | 5 votes |
@Mappings({ @Mapping(target = "expectedServiceRequests", source = "expectedServiceRequestList"), @Mapping(target = "requestFile", ignore = true), @Mapping(target = "expectedResponseFile", ignore = true), @Mapping(target = "mqMessageFile", ignore = true), @Mapping(target = "ignoreMqRequestsInvocations", ignore = true) }) public abstract Step updateStep(StepRo stepRo, @MappingTarget Step step);
Example #9
Source File: User2UserDtoMapper.java From spring-cloud-learning with MIT License | 5 votes |
/** * user to userDto * * @param user 用户 * @return UserDto */ @Mappings({ @Mapping(target = "id", source = "user.id"), @Mapping(target = "name", source = "user.name"), @Mapping(target = "birth", source = "user.birth") }) UserDto user2UserDto(UserEntity user);
Example #10
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) ProductEntity apiToEntity(Product api);
Example #11
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rating", source="api.rate"), @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) RecommendationEntity apiToEntity(Recommendation api);
Example #12
Source File: ReviewMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) ReviewEntity apiToEntity(Review api);
Example #13
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rate", source="entity.rating"), @Mapping(target = "serviceAddress", ignore = true) }) Recommendation entityToApi(RecommendationEntity entity);
Example #14
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rating", source="api.rate"), @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) RecommendationEntity apiToEntity(Recommendation api);
Example #15
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Product entityToApi(ProductEntity entity);
Example #16
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Product entityToApi(ProductEntity entity);
Example #17
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rate", source="entity.rating"), @Mapping(target = "serviceAddress", ignore = true) }) Recommendation entityToApi(RecommendationEntity entity);
Example #18
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) ProductEntity apiToEntity(Product api);
Example #19
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Product entityToApi(ProductEntity entity);
Example #20
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rating", source="api.rate"), @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) RecommendationEntity apiToEntity(Recommendation api);
Example #21
Source File: ReviewMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Review entityToApi(ReviewEntity entity);
Example #22
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rate", source="entity.rating"), @Mapping(target = "serviceAddress", ignore = true) }) Recommendation entityToApi(RecommendationEntity entity);
Example #23
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Product entityToApi(ProductEntity entity);
Example #24
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rate", source="entity.rating"), @Mapping(target = "serviceAddress", ignore = true) }) Recommendation entityToApi(RecommendationEntity entity);
Example #25
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) ProductEntity apiToEntity(Product api);
Example #26
Source File: ReviewMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Review entityToApi(ReviewEntity entity);
Example #27
Source File: ReviewMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) ReviewEntity apiToEntity(Review api);
Example #28
Source File: ProductMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "serviceAddress", ignore = true) }) Product entityToApi(ProductEntity entity);
Example #29
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rating", source="api.rate"), @Mapping(target = "id", ignore = true), @Mapping(target = "version", ignore = true) }) RecommendationEntity apiToEntity(Recommendation api);
Example #30
Source File: RecommendationMapper.java From Hands-On-Microservices-with-Spring-Boot-and-Spring-Cloud with MIT License | 4 votes |
@Mappings({ @Mapping(target = "rate", source="entity.rating"), @Mapping(target = "serviceAddress", ignore = true) }) Recommendation entityToApi(RecommendationEntity entity);