public class PredicateFilterBuilder<T>
Running block with this class as its receiver will allow you to write expressions like this:
Person::age lt 25. Does not support joins - just use the plain old SQL 92 where syntax for that ;)
Containing these functions in this class will prevent polluting of the KProperty1 interface and also makes it type-safe.
This looks like too much Kotlin syntax magic. Promise me to use this for simple Entities and/or programmatic where creation only ;)
| Constructor and Description |
|---|
PredicateFilterBuilder()
Running block with this class as its receiver will allow you to write expressions like this:
Person::age lt 25. Does not support joins - just use the plain old SQL 92 where syntax for that ;) |
| Modifier and Type | Method and Description |
|---|---|
<R extends Number & Comparable<? super R>> |
between(kotlin.reflect.KProperty1<T,? extends R> $receiver,
kotlin.ranges.ClosedRange<R> range)
Matches only values contained in given range.
|
<R extends Serializable> |
eq(kotlin.reflect.KProperty1<T,? extends R> $receiver,
R value) |
<R> com.vaadin.server.SerializablePredicate<T> |
ge(kotlin.reflect.KProperty1<T,? extends R> $receiver,
R value) |
com.vaadin.server.SerializablePredicate<T> |
ilike(kotlin.reflect.KProperty1<T,java.lang.String> $receiver,
java.lang.String value)
An ILIKE filter, performs case-insensitive matching. It performs the 'starts-with' matching which tends to perform quite well on indexed columns. If you need a substring
matching, then you actually need to employ full text search
capabilities of your database. For example PostgreSQL full-text search.
|
com.vaadin.server.SerializablePredicate<T> |
isFalse(kotlin.reflect.KProperty1<T,java.lang.Boolean> $receiver) |
com.vaadin.server.SerializablePredicate<T> |
isTrue(kotlin.reflect.KProperty1<T,java.lang.Boolean> $receiver) |
<R> com.vaadin.server.SerializablePredicate<T> |
le(kotlin.reflect.KProperty1<T,? extends R> $receiver,
R value) |
public PredicateFilterBuilder()
Running block with this class as its receiver will allow you to write expressions like this:
Person::age lt 25. Does not support joins - just use the plain old SQL 92 where syntax for that ;)
Containing these functions in this class will prevent polluting of the KProperty1 interface and also makes it type-safe.
This looks like too much Kotlin syntax magic. Promise me to use this for simple Entities and/or programmatic where creation only ;)
public <R extends Serializable> com.vaadin.server.SerializablePredicate<T> eq(kotlin.reflect.KProperty1<T,? extends R> $receiver, R value)
public <R> com.vaadin.server.SerializablePredicate<T> le(kotlin.reflect.KProperty1<T,? extends R> $receiver,
R value)
public <R> com.vaadin.server.SerializablePredicate<T> ge(kotlin.reflect.KProperty1<T,? extends R> $receiver,
R value)
public com.vaadin.server.SerializablePredicate<T> ilike(kotlin.reflect.KProperty1<T,java.lang.String> $receiver,
java.lang.String value)
An ILIKE filter, performs case-insensitive matching. It performs the 'starts-with' matching which tends to perform quite well on indexed columns. If you need a substring matching, then you actually need to employ full text search capabilities of your database. For example PostgreSQL full-text search.
There is no point in supporting substring matching: it performs a full table scan when used, regardless of whether the column contains the index or not. If you really wish for substring matching, you probably want a full-text search instead which is implemented using a different keywords.
value - the substring, automatically appended with % when the SQL query is constructed. The substring is matched
case-insensitive.public <R extends Number & Comparable<? super R>> com.vaadin.server.SerializablePredicate<T> between(kotlin.reflect.KProperty1<T,? extends R> $receiver, kotlin.ranges.ClosedRange<R> range)
Matches only values contained in given range.
range - the rangepublic com.vaadin.server.SerializablePredicate<T> isTrue(kotlin.reflect.KProperty1<T,java.lang.Boolean> $receiver)
public com.vaadin.server.SerializablePredicate<T> isFalse(kotlin.reflect.KProperty1<T,java.lang.Boolean> $receiver)