|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.neo4j.index.lucene.LuceneTimeline<T>
public class LuceneTimeline<T extends PropertyContainer>
Constructor Summary | |
---|---|
LuceneTimeline(GraphDatabaseService db,
Index<T> index)
|
Method Summary | |
---|---|
void |
add(T entity,
long timestamp)
Adds an entity to this timeline with the given timestamp . |
IndexHits<T> |
getBetween(Long startTimestampOrNull,
Long endTimestampOrNull)
Query the timeline with optional lower/upper bounds and get back entities within that range, ordered by date with lowest first. |
IndexHits<T> |
getBetween(Long startTimestampOrNull,
Long endTimestampOrNull,
boolean reversed)
Query the timeline with optional lower/upper bounds and get back entities within that range, ordered by date. |
T |
getFirst()
|
T |
getLast()
|
void |
remove(T entity,
long timestamp)
Removes an entity from the timeline. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LuceneTimeline(GraphDatabaseService db, Index<T> index)
Method Detail |
---|
public T getLast()
getLast
in interface TimelineIndex<T extends PropertyContainer>
null
if the timeline is empty.public T getFirst()
getFirst
in interface TimelineIndex<T extends PropertyContainer>
null
if the timeline is empty.public void remove(T entity, long timestamp)
TimelineIndex
remove
in interface TimelineIndex<T extends PropertyContainer>
entity
- the entity to remove from this timeline.timestamp
- the timestamp this entity was added with.public void add(T entity, long timestamp)
TimelineIndex
timestamp
.
add
in interface TimelineIndex<T extends PropertyContainer>
entity
- the entity to add to this timeline.timestamp
- the timestamp to use.public IndexHits<T> getBetween(Long startTimestampOrNull, Long endTimestampOrNull)
TimelineIndex
getBetween
in interface TimelineIndex<T extends PropertyContainer>
startTimestampOrNull
- the start timestamp, entities with greater
timestamp value will be returned (exclusive). Will be ignored if null
.endTimestampOrNull
- the end timestamp, entities with lesser timestamp
value will be returned (exclude). Will be ignored if null
.
public IndexHits<T> getBetween(Long startTimestampOrNull, Long endTimestampOrNull, boolean reversed)
TimelineIndex
reversed
is
true
the order of the result is reversed.
getBetween
in interface TimelineIndex<T extends PropertyContainer>
startTimestampOrNull
- the start timestamp, entities with greater
timestamp value will be returned (exclusive). Will be ignored if null
.endTimestampOrNull
- the end timestamp, entities with lesser timestampreversed
- reverses the result order if true
.
value will be returned (exclude). Will be ignored if null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |