Class QueryPopulatorImpl

java.lang.Object
ch.tocco.nice2.persist.core.impl.util.QueryPopulatorImpl
All Implemented Interfaces:
QueryPopulator

@Component public class QueryPopulatorImpl extends Object implements QueryPopulator

Implements QueryPopulator using a list of contributed ArgumentFactorys.

Each ArgumentFactory can create the value for one named parameter. If the query string contains any named parameters that an ArgumentFactory exists for, the value from the factory is set into the query.

The ArgumentFactorys may be contributed via Spring beans:


 @Bean
 public ArgumentFactoryContribution todayStartArgumentFactory(DatetimeArgumentFactory factory) {
     return new ArgumentFactoryContribution("today_start", factory);
 }