public abstract class TemporalRestriction extends Object
Criterions
. Specification can be found in:
Modifier and Type | Class and Description |
---|---|
static class |
TemporalRestriction.AfterRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.BeforeRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.BeginsRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.BegunByRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.ContainsRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.DuringRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.EndedByRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.EndsRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.MeetsRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.MetByRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.OverlappedByRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.OverlapsRestriction
Creates filters according to the following table.
|
static class |
TemporalRestriction.TEqualsRestriction
Creates filters according to the following table.
|
Modifier and Type | Field and Description |
---|---|
private static boolean |
ALLOW_EQUALITY
ISO 19108:2002 states (<, >) and not (≤, ≥).
|
Constructor and Description |
---|
TemporalRestriction() |
Modifier and Type | Method and Description |
---|---|
private Date |
checkInstantWithReducedPrecision(TimeInstant time)
Check if time is a instance with reduces precision that
describes a period (a day, a hour, etc.).
|
protected org.hibernate.criterion.Criterion |
filterInstantWithInstant(String selfPosition,
Date otherPosition)
Applies this restriction to the specified time instantes.
|
protected org.hibernate.criterion.Criterion |
filterInstantWithPeriod(String selfPosition,
Date otherBegin,
Date otherEnd,
boolean isOtherPeriodFromReducedPrecisionInstant)
Applies this restriction to the specified time instance and time period.
|
protected org.hibernate.criterion.Criterion |
filterPeriodWithInstant(String selfBegin,
String selfEnd,
Date otherPosition)
Applies this restriction to the specified time period and time instance.
|
protected abstract org.hibernate.criterion.Criterion |
filterPeriodWithPeriod(String selfBegin,
String selfEnd,
Date otherBegin,
Date otherEnd)
Applies this restriction to the specified time periods.
|
private org.hibernate.criterion.Criterion |
filterWithInstant(TimeInstant time,
TimePrimitiveFieldDescriptor r)
Creates a filter for the specfied instant and fields.
|
private org.hibernate.criterion.Criterion |
filterWithPeriod(TimePeriod time,
TimePrimitiveFieldDescriptor r,
boolean periodFromReducedPrecisionInstant)
Create a filter for the specified period and fields.
|
org.hibernate.criterion.Criterion |
get(TimePrimitiveFieldDescriptor ref,
Time time)
Creates a criterion from this restriction for the specified fields and
time.
|
protected org.hibernate.criterion.Criterion |
getPropertyCheckingCriterion(org.hibernate.criterion.Criterion periods,
org.hibernate.criterion.Criterion instants,
TimePrimitiveFieldDescriptor r)
Creates a Criterion that takes care of instants that are saved
as periods (begin == end).
|
protected org.hibernate.criterion.Criterion |
greater(String property,
Date value)
Creates a Criterion for the specified property.
|
protected org.hibernate.criterion.PropertyExpression |
isInstant(TimePrimitiveFieldDescriptor r)
Creates a Criterion that checks that the persisted period is a
instant period (begin == end).
|
protected org.hibernate.criterion.PropertyExpression |
isPeriod(TimePrimitiveFieldDescriptor r)
Creates a Criterion that checks that the persisted period is a
"real" period (begin !
|
protected org.hibernate.criterion.Criterion |
lower(String property,
Date value)
Creates a Criterion for the specified property.
|
private static final boolean ALLOW_EQUALITY
public org.hibernate.criterion.Criterion get(TimePrimitiveFieldDescriptor ref, Time time) throws UnsupportedTimeException
ref
- the descriptor holding the property name(s)time
- the compared timeUnsupportedTimeException
- if the supplied time can not be used with this restrictionprotected abstract org.hibernate.criterion.Criterion filterPeriodWithPeriod(String selfBegin, String selfEnd, Date otherBegin, Date otherEnd)
selfBegin
- the property name of the begin time stampselfEnd
- the property name of the end time stampotherBegin
- the begin instance of the compared time periodotherEnd
- the end instance of the compared time periodprotected org.hibernate.criterion.Criterion filterInstantWithPeriod(String selfPosition, Date otherBegin, Date otherEnd, boolean isOtherPeriodFromReducedPrecisionInstant)
selfPosition
- the property name of the instanceotherBegin
- the begin instance of the compared time periodotherEnd
- the end instance of the compared time periodisOtherPeriodFromReducedPrecisionInstant
- was the period interpreted from a reduced precision time?
see DateTimeHelper.setDateTime2EndOfMostPreciseUnit4RequestedEndPositionprotected org.hibernate.criterion.Criterion filterPeriodWithInstant(String selfBegin, String selfEnd, Date otherPosition)
selfBegin
- the property name of the begin time stampselfEnd
- the property name of the end time stampotherPosition
- the position of the compared time instanceprotected org.hibernate.criterion.Criterion filterInstantWithInstant(String selfPosition, Date otherPosition)
selfPosition
- the property name of the time instanceotherPosition
- the position of the compared time instanceprivate org.hibernate.criterion.Criterion filterWithPeriod(TimePeriod time, TimePrimitiveFieldDescriptor r, boolean periodFromReducedPrecisionInstant)
filterWithInstant()
.time
- the timer
- the property name(s)private org.hibernate.criterion.Criterion filterWithInstant(TimeInstant time, TimePrimitiveFieldDescriptor r)
filterWithPeriod()
.time
- the timer
- the property name(s)private Date checkInstantWithReducedPrecision(TimeInstant time)
time
- the instant to checkprotected org.hibernate.criterion.Criterion getPropertyCheckingCriterion(org.hibernate.criterion.Criterion periods, org.hibernate.criterion.Criterion instants, TimePrimitiveFieldDescriptor r)
periods
- the Criterion for "real" periods (may be
null)instants
- the Criterion for periods with equal begin and end
(may be null)r
- the TimePrimitiveFieldDescriptor that holds the
property namesprotected org.hibernate.criterion.Criterion lower(String property, Date value)
property
- the property namevalue
- the compared valueprotected org.hibernate.criterion.Criterion greater(String property, Date value)
property
- the property namevalue
- the compared valueprotected org.hibernate.criterion.PropertyExpression isPeriod(TimePrimitiveFieldDescriptor r)
r
- the property namesprotected org.hibernate.criterion.PropertyExpression isInstant(TimePrimitiveFieldDescriptor r)
r
- the property namesCopyright © 2012-2015 52north.org. All Rights Reserved.