-
public final class JPADataProviderKt
-
-
Method Summary
Modifier and Type Method Description final <T extends Any> ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter>jpaDataProvider()Utility method to create JPADataProvider like this: jpaDataProvider<Person>()instead ofJPADataProvider(Person::class)final <T extends Any> ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter>configurableFilter(DataProvider<T, JPAFilter> $self)Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not. final <T extends Any> DataProvider<T, JPAFilter>and(DataProvider<T, JPAFilter> $self, JPAFilter other)Produces a new data provider which restricts rows returned by the original data provider to given filter. final <T extends Any> DataProvider<T, JPAFilter>and(DataProvider<T, JPAFilter> $self, Function1<JPAWhereBuilder<T>, JPAFilter> block)Produces a new data provider which restricts rows returned by the original data provider to given filter. final JPAFilterand(Set<JPAFilter> $self)final <T extends Any> UnitsetFilter(ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter> $self, Function1<JPAWhereBuilder<T>, JPAFilter> block)Removes the original filter and sets the new filter. final JPAFilteror(Set<JPAFilter> $self)-
-
Method Detail
-
jpaDataProvider
final <T extends Any> ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter> jpaDataProvider()
Utility method to create JPADataProvider like this:
jpaDataProvider<Person>()instead ofJPADataProvider(Person::class)
-
configurableFilter
final <T extends Any> ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter> configurableFilter(DataProvider<T, JPAFilter> $self)
Wraps this data provider in a configurable filter, regardless of whether this data provider is already a configurable filter or not.
-
and
final <T extends Any> DataProvider<T, JPAFilter> and(DataProvider<T, JPAFilter> $self, JPAFilter other)
Produces a new data provider which restricts rows returned by the original data provider to given filter.
Invoking this method multiple times will restrict the rows further.
- Parameters:
other- applies this filter
-
and
final <T extends Any> DataProvider<T, JPAFilter> and(DataProvider<T, JPAFilter> $self, Function1<JPAWhereBuilder<T>, JPAFilter> block)
Produces a new data provider which restricts rows returned by the original data provider to given filter. Allows you to write expressions like this:
jpaDataProvider<Person>().and { Person::age lt 25 }See JPAWhereBuilder for a complete list of applicable operators.Invoking this method multiple times will restrict the rows further.
- Parameters:
block- the block which allows you to build thewhereexpression.
-
setFilter
final <T extends Any> Unit setFilter(ConfigurableFilterDataProvider<T, JPAFilter, JPAFilter> $self, Function1<JPAWhereBuilder<T>, JPAFilter> block)
Removes the original filter and sets the new filter. Allows you to write expressions like this:
jpaDataProvider<Person>().and { Person::age lt 25 }. See JPAWhereBuilder for a complete list of applicable operators.Invoking this method multiple times will overwrite the previous filter.
- Parameters:
block- the block which allows you to build thewhereexpression.
-
-
-
-