Package org.projectbarbel.histo
Class DocumentJournal.JournalReader
- java.lang.Object
-
- org.projectbarbel.histo.DocumentJournal.JournalReader
-
- Enclosing class:
- DocumentJournal
public static class DocumentJournal.JournalReader extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <O> List<O>activeVersions()Get the versions currently active.<O> List<O>effectiveAfter(ZonedDateTime time)The active versions after the given time.<O> Optional<O>effectiveAt(ZonedDateTime time)<O> List<O>effectiveBetween(EffectivePeriod period)Get the active versions effective within the givenEffectivePeriod.<O> Optional<O>effectiveNow()The active version effective today.<O> List<O>inactiveVersions()Get the inactivated versions.
-
-
-
Method Detail
-
activeVersions
public <O> List<O> activeVersions()
Get the versions currently active.- Type Parameters:
O- the type to manage- Returns:
- the active versions
-
inactiveVersions
public <O> List<O> inactiveVersions()
Get the inactivated versions. Versions get inactivated when new versions are posted and there versions cross their effective periods.- Type Parameters:
O- the type to manage- Returns:
- the inactive versions
-
effectiveNow
public <O> Optional<O> effectiveNow()
The active version effective today. The "current" state of the object.- Type Parameters:
O- the type to manage- Returns:
- the effective version
-
effectiveAt
public <O> Optional<O> effectiveAt(ZonedDateTime time)
-
effectiveAfter
public <O> List<O> effectiveAfter(ZonedDateTime time)
The active versions after the given time. If due time is set to now, the query returns all the future versions that will become effective.- Type Parameters:
O- the type to manage- Parameters:
time- the due time- Returns:
- the active versions
-
effectiveBetween
public <O> List<O> effectiveBetween(EffectivePeriod period)
Get the active versions effective within the givenEffectivePeriod.- Type Parameters:
O- the type to manage- Parameters:
period- the intervall- Returns:
- the active versions
-
-