当前位置: 首页>>代码示例>>Java>>正文


Java Mappers.getMapper方法代码示例

本文整理汇总了Java中org.mapstruct.factory.Mappers.getMapper方法的典型用法代码示例。如果您正苦于以下问题:Java Mappers.getMapper方法的具体用法?Java Mappers.getMapper怎么用?Java Mappers.getMapper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.mapstruct.factory.Mappers的用法示例。


在下文中一共展示了Mappers.getMapper方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: eventMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public EventMapper eventMapper(
        EventDao dao,
        HandicapGroupSetMapper handicapGroupSetMapper,
        HandicapGroupSetService handicapGroupSetService,
        CompetitionGroupSetMapper competitionGroupSetMapper,
        CompetitionGroupSetService competitionGroupSetService
) {
    EventMapper mapper = Mappers.getMapper(EventMapper.class);
    mapper.setDao(dao);
    mapper.setHandicapGroupSetMapper(handicapGroupSetMapper);
    mapper.setHandicapGroupSetService(handicapGroupSetService);
    mapper.setCompetitionGroupSetMapper(competitionGroupSetMapper);
    mapper.setCompetitionGroupSetService(competitionGroupSetService);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:18,代码来源:MapStructModule.java

示例2: registrationMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public RegistrationMapper registrationMapper(
        RegistrationDao dao,
        EventMapper eventMapper,
        HandicapGroupMapper handicapGroupMapper,
        HandicapGroupEntityService handicapGroupEntityService,
        CompetitionGroupMapper competitionGroupMapper,
        CompetitionGroupEntityService competitionGroupEntityService
) {
    RegistrationMapper mapper = Mappers.getMapper(RegistrationMapper.class);
    mapper.setDao(dao);
    mapper.setEventMapper(eventMapper);
    mapper.setHandicapGroupMapper(handicapGroupMapper);
    mapper.setHandicapGroupEntityService(handicapGroupEntityService);
    mapper.setCompetitionGroupMapper(competitionGroupMapper);
    mapper.setCompetitionGroupEntityService(competitionGroupEntityService);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:20,代码来源:MapStructModule.java

示例3: runMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public RunMapper runMapper(
        RunDao dao,
        EventMapper eventMapper,
        EventEntityService eventEntityService,
        RegistrationMapper registrationMapper,
        RegistrationEntityService registrationEntityService
) {
    RunMapper mapper = Mappers.getMapper(RunMapper.class);
    mapper.setDao(dao);
    mapper.setEventMapper(eventMapper);
    mapper.setEventEntityService(eventEntityService);
    mapper.setRegistrationMapper(registrationMapper);
    mapper.setRegistrationEntityService(registrationEntityService);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:18,代码来源:MapStructModule.java

示例4: KeyStorePasswordServiceImpl

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
public KeyStorePasswordServiceImpl(){
    transformer = Mappers.getMapper(KeyStorePasswordTransformer.class);
}
 
开发者ID:StnetixDevTeam,项目名称:ariADDna,代码行数:4,代码来源:KeyStorePasswordServiceImpl.java

示例5: testMapStructMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Test
public void testMapStructMapper() throws Exception {
	MapStructBlogEntryMapper mapper = Mappers.getMapper(MapStructBlogEntryMapper.class);
	BlogEntryResource result = mapper.toResourceBlogEntry(newBlogEntry());
	
	Assert.assertEquals("title goes here", result.getTitle());
	Assert.assertEquals("name", result.getAuthorName());
	Assert.assertEquals("signature", result.getAuthorSignature());
	Assert.assertEquals(1, result.getId().intValue());
	
	Assert.assertNotNull(result.getProperties());
	Assert.assertTrue(result.getProperties().isCommentsEnabled());
	Assert.assertTrue(result.getProperties().isEnabled());
	
	BlogEntry reverse = mapper.toJpaBlogEntry(result);
	
	Assert.assertEquals("title goes here", reverse.getTitle());
	Assert.assertEquals(1, reverse.getId().intValue());
	Assert.assertTrue(reverse.isCommentsEnabled());
	Assert.assertTrue(reverse.isEnabled());
	
	Assert.assertNotNull(reverse.getAuthor());
	Assert.assertEquals("name", reverse.getAuthor().getName());
	Assert.assertEquals("signature", reverse.getAuthor().getSignature());
}
 
开发者ID:aracrown,项目名称:ara-blog-examples,代码行数:26,代码来源:MapStructBlogEntryMapperTest.java

示例6: testMapStructMapperNullAuthor

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Test
public void testMapStructMapperNullAuthor() throws Exception {
	MapStructBlogEntryMapper mapper = Mappers.getMapper(MapStructBlogEntryMapper.class);
	Assert.assertNull(mapper.toJpaBlogEntry(null));
	Assert.assertNull(mapper.toResourceBlogEntry(null));

	BlogEntry be = newBlogEntry();
	be.setAuthor(null);

	BlogEntryResource result = mapper.toResourceBlogEntry(be);
	Assert.assertNotNull(result);

	Assert.assertEquals("title goes here", result.getTitle());
	Assert.assertNull(result.getAuthorName());
	Assert.assertNull(result.getAuthorSignature());
	Assert.assertEquals(1, result.getId().intValue());

	Assert.assertNotNull(result.getProperties());
	Assert.assertTrue(result.getProperties().isCommentsEnabled());
	Assert.assertTrue(result.getProperties().isEnabled());
}
 
开发者ID:aracrown,项目名称:ara-blog-examples,代码行数:22,代码来源:MapStructBlogEntryMapperTest.java

示例7: testBasicMapping

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Test
void testBasicMapping() {
    StockquoteBasic basic = new StockquoteBasic();
    StockquoteMapper map = Mappers.getMapper(StockquoteMapper.class);
    StockQuoteData stockdata = new StockQuoteData("123456789", Index.DAX);
    stockdata.setStockname("STOCKNAME");
    stockdata.setSymbol("SYMBOL");
    stockdata.setFinancialYear(LocalDate.of(0, 12, 31));
    SortedMap<YearEstimated, BigDecimal> treemap = new TreeMap<>();
    treemap.put(new YearEstimated(Year.of(2016), true), new BigDecimal("2.3"));
    stockdata.setEps(treemap);
    basic = map.quoteToBasic(stockdata, basic);

}
 
开发者ID:ixidion,项目名称:stocktool,代码行数:15,代码来源:StockquoteMapperTest.java

示例8: competitionGroupMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public CompetitionGroupMapper competitionGroupMapper(CompetitionGroupDao dao) {
    CompetitionGroupMapper mapper = Mappers.getMapper(CompetitionGroupMapper.class);
    mapper.setDao(dao);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:8,代码来源:MapStructModule.java

示例9: competitionGroupSetMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public CompetitionGroupSetMapper competitionGroupSetMapper(
        CompetitionGroupSetDao dao,
        CompetitionGroupMapper competitionGroupMapper
) {
    CompetitionGroupSetMapper mapper = Mappers.getMapper(CompetitionGroupSetMapper.class);
    mapper.setDao(dao);
    mapper.setCompetitionGroupMapper(competitionGroupMapper);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:12,代码来源:MapStructModule.java

示例10: handicapGroupMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public HandicapGroupMapper handicapGroupMapper(HandicapGroupDao dao) {
    HandicapGroupMapper mapper = Mappers.getMapper(HandicapGroupMapper.class);
    mapper.setDao(dao);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:8,代码来源:MapStructModule.java

示例11: handicapGroupSetMapper

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Provides
@Singleton
public HandicapGroupSetMapper handicapGroupSetMapper(
        HandicapGroupSetDao dao,
        HandicapGroupMapper handicapGroupMapper
) {
    HandicapGroupSetMapper mapper = Mappers.getMapper(HandicapGroupSetMapper.class);
    mapper.setDao(dao);
    mapper.setHandicapGroupMapper(handicapGroupMapper);
    return mapper;
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:12,代码来源:MapStructModule.java

示例12: setup

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Before
public void setup() {
     mapper = Mappers.getMapper(CompetitionGroupSetMapper.class);
     mapper.setDao(dao);
     CompetitionGroupMapper competitionGroupMapper = Mappers.getMapper(CompetitionGroupMapper.class);
     competitionGroupMapper.setDao(competitionGroupDao);
     mapper.setCompetitionGroupMapper(competitionGroupMapper);
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:9,代码来源:CompetitionGroupSetMapperTest.java

示例13: setup

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Before
public void setup() {
    mapper = Mappers.getMapper(EventMapper.class);
    mapper.setHandicapGroupSetMapper(handicapGroupSetMapper);
    mapper.setHandicapGroupSetService(handicapGroupSetService);
    mapper.setCompetitionGroupSetMapper(competitionGroupSetMapper);
    mapper.setCompetitionGroupSetService(competitionGroupSetService);
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:9,代码来源:EventMapperTest.java

示例14: setup

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Before
public void setup() {
    mapper = Mappers.getMapper(HandicapGroupSetMapper.class);
    mapper.setDao(dao);
    HandicapGroupMapper handicapGroupMapper = Mappers.getMapper(HandicapGroupMapper.class);
    handicapGroupMapper.setDao(handicapGroupDao);
    mapper.setHandicapGroupMapper(handicapGroupMapper);
}
 
开发者ID:caeos,项目名称:coner-core,代码行数:9,代码来源:HandicapGroupSetMapperTest.java

示例15: testMapStructMapperNullAuthorName

import org.mapstruct.factory.Mappers; //导入方法依赖的package包/类
@Test
public void testMapStructMapperNullAuthorName() throws Exception {
	MapStructBlogEntryMapper mapper = Mappers.getMapper(MapStructBlogEntryMapper.class);

	BlogEntry be = newBlogEntry();
	be.getAuthor().setName(null);
	BlogEntryResource result = mapper.toResourceBlogEntry(be);

	Assert.assertEquals("title goes here", result.getTitle());
	Assert.assertNull(result.getAuthorName());
	Assert.assertEquals("signature", result.getAuthorSignature());
	Assert.assertEquals(1, result.getId().intValue());

	Assert.assertNotNull(result.getProperties());
	Assert.assertTrue(result.getProperties().isCommentsEnabled());
	Assert.assertTrue(result.getProperties().isEnabled());

	BlogEntry reverse = mapper.toJpaBlogEntry(result);

	Assert.assertEquals("title goes here", reverse.getTitle());
	Assert.assertEquals(1, reverse.getId().intValue());
	Assert.assertTrue(reverse.isCommentsEnabled());
	Assert.assertTrue(reverse.isEnabled());

	Assert.assertNotNull(reverse.getAuthor());
	Assert.assertNull(reverse.getAuthor().getName());
	Assert.assertEquals("signature", reverse.getAuthor().getSignature());
}
 
开发者ID:aracrown,项目名称:ara-blog-examples,代码行数:29,代码来源:MapStructBlogEntryMapperTest.java


注:本文中的org.mapstruct.factory.Mappers.getMapper方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。