Closed firatgursoy closed 3 years ago
added extract method to FluentQueryinterface subsequent to implemented and tested also created Extractors utility class.
extract
FluentQuery
Extractors
@Test void mapTest() { Map<Long, String> map = factory.newQuery() .append("select i.id, i.code from invoice i") .extract(Extractors.newHashMapExtractor(Long.class, String.class)); Assertions.assertFalse(map.isEmpty()); } @Test void multiValueMapTest() { MultiValueMap<String, BigDecimal> map = factory.newQuery() .append("select i.code as invoiceCode, idd.amount as invoiceDetailAmount from invoice i") .append("join invoice_detail idd on idd.invoice_id = i.id") .param(new InvoiceSearchForm()) .extract(Extractors.newMultiValueMapExtractor(String.class, BigDecimal.class)); Assertions.assertFalse(map.isEmpty()); }
added
extract
method toFluentQuery
interface subsequent to implemented and tested also createdExtractors
utility class.