PersonStatisticsService

public abstract class PersonStatisticsService extends StatisticsService

Fields

cprDataOffset

public static final ZoneId cprDataOffset

Methods

applyAreaRestrictionsToQuery

protected void applyAreaRestrictionsToQuery(PersonRecordQuery query, DafoUserDetails user)

checkAndLogAccess

protected void checkAndLogAccess(LoggerHelper loggerHelper)

filterRecordsByEffect

public static <R extends CprBitemporalRecord> Set<R> filterRecordsByEffect(Collection<R> records, OffsetDateTime effectAt)

filterRecordsByRegistration

public static <R extends CprBitemporalRecord> Set<R> filterRecordsByRegistration(Collection<R> records, OffsetDateTime registrationAt)

filterUndoneRecords

public static <R extends CprBitemporalRecord> Set<R> filterUndoneRecords(Collection<R> records)

findMostImportant

public static <R extends CprBitemporalRecord> R findMostImportant(Collection<R> records)

Find the most important registration according to “bitemporalComparator” Records with a missing OriginDate is removed since they are considered invalid

Parametre:
  • records
  • <R>

findNewestAfterFilterOnEffect

public static <R extends CprBitemporalRecord> R findNewestAfterFilterOnEffect(Collection<R> records, OffsetDateTime effectAt)
Parametre:
  • records
  • effectAt
  • <R>

findNewestUnclosed

public static <R extends CprBitemporalRecord> R findNewestUnclosed(Collection<R> records)

Find the newest unclosed record from the list of records Records with a missing OriginDate is also removed since they are considered invalid

Parametre:
  • records
  • <R>

findNewestUnclosedWithSpecifiedEffect

public static <R extends CprBitemporalRecord> R findNewestUnclosedWithSpecifiedEffect(Collection<R> records, OffsetDateTime effectAt)

Find the newest unclosed record with specified effect from the list of records Records with a missing OriginDate is also removed since they are considered invalid

Parametre:
  • records
  • <R>

formatItems

public Stream<Map<String, String>> formatItems(Session personSession, Stream<PersonEntity> personEntities, Session lookupSession, Filter filter)

formatPerson

protected abstract List<Map<String, String>> formatPerson(PersonEntity person, Session session, LookupService lookupService, Filter filter)

getBitemporality

public static CprBitemporality getBitemporality(CprBitemporalRecord record)

getCprPlugin

protected abstract CprPlugin getCprPlugin()

getQuery

protected PersonRecordQuery getQuery(Filter filter)

getQueryList

protected List<PersonRecordQuery> getQueryList(Filter filter)

getUser

protected DafoUserDetails getUser(HttpServletRequest request)

requiredParameters

protected String[] requiredParameters()

run

public int run(Filter filter, OutputStream outputStream)

sortRecords

public static <R extends CprBitemporalRecord> List<R> sortRecords(Collection<R> records)