edu.northwestern.at.monk.model
Class LongCriterion

java.lang.Object
  extended by edu.northwestern.at.monk.model.SearchCriterion
      extended by edu.northwestern.at.monk.model.NumericCriterion
          extended by edu.northwestern.at.monk.model.LongCriterion
Direct Known Subclasses:
AuthorBirthYearCriterion, AuthorDeathYearCriterion, AuthorNumCorporaCriterion, AuthorNumWorksCriterion, CirculationYearCriterion, CorpusNumAuthorsCriterion, CorpusNumWorksCriterion, CountCumCriterion, CountCumMainCriterion, CountNonCumCriterion, CountNonCumMainCriterion, LemmaHomonymCriterion, SentenceInWorkOrdinalCriterion, SpellingLengthCriterion, SummaryCountCriterion, WordColOrdinalCriterion, WordInSentenceOrdinalCriterion, WordNumPartsCriterion, WordWorkOrdinalCriterion, WorkNumAuthorsCriterion, WorkPartLevelCriterion

public abstract class LongCriterion
extends NumericCriterion

A type long numeric criterion.

A long numeric criterion is a numeric criterion where the attribute value is of type long.

Each long numeric criterion class offers constructors of the following forms, where T is the type of the criterion:

T (long val)

Creates a criterion that exactly matches val.

T (Long val)

Creates a criterion that exactly matches val.

T (long start, long end)

Creates a criterion for the range start through end inclusive.

T (Long start, long end)

Creates a criterion for the range start through end inclusive.

T (long start, Long end)

Creates a criterion for the range start through end inclusive.

T (Long start, Long end)

Creates a criterion for the range start through end inclusive.

T (LongRange... ranges)

Creates a criterion for a vararg list or array of LongRange ranges.

T (Collection<LongRange> ranges)

Creates a criterion for a collection of LongRange ranges.

The start and/or end of a range may be null, in which case no constraint is placed on the start and/or end. See NumericCriterion for details and examples.

An empty or "no-op" criterion that matches any value can be constructed with a null value, with start and end values both of which are null, or with an empty array or collection of ranges.

See Also:
MONK Datastore Overview, Licensing Agreement

Method Summary
 java.lang.Long getEnd()
          Gets the end of the range.
 LongRange getRange()
          Gets the range.
 java.util.Collection<LongRange> getRanges()
          Gets the ranges.
 java.lang.Long getStart()
          Gets the start of the range.
 java.lang.Long getValue()
          Gets the value.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRanges

public java.util.Collection<LongRange> getRanges()
Gets the ranges.

Returns:
The ranges, or null if none.

getRange

public LongRange getRange()
Gets the range.

Returns:
The range, or null if none or more than one.

getStart

public java.lang.Long getStart()
Gets the start of the range.

Returns:
The start of the range, or null if none or more than one.

getEnd

public java.lang.Long getEnd()
Gets the end of the range.

Returns:
The end of the range, or null if none or more than one.

getValue

public java.lang.Long getValue()
Gets the value.

Returns:
The value, or null if no ranges, more than one range, or range start is not equal to range end.