fr.ouestfrance.querydsl.postgrest.model.Range Maven / Gradle / Ivy
The newest version!
package fr.ouestfrance.querydsl.postgrest.model;
import fr.ouestfrance.querydsl.service.ext.HasRange;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public class Range implements HasRange {
private T lower;
private T upper;
private boolean lowerInclusive;
private boolean upperInclusive;
public static Range between(T from, T to) {
return new Range<>(from, to, true, true);
}
public static Range exclusiveBetween(T from, T to) {
return new Range<>(from, to, false, false);
}
}