Interface IEventService
public interface IEventService
-
Method Summary
Modifier and TypeMethodDescriptionCreate a query builder which searches in cassandra.Create a query builder which searches in either elastic.getAncestry
(AncestryRequest request) Returns the ancestries of a given set of EPCs or quantity elements (also known as genealogy).getAncestry
(String epc, int depth, ZonedDateTime at) Returns the ancestry of a given EPC (also known as genealogy)getConstituents
(ConstituentsSearchRequest request) Returns the constituents (made of) recursively for the given sets of epcs and quantity elements, under a given time range.getDerivatives
(DerivativesSearchRequest request) Returns the derivatives (turned into) recursively for the given sets of epcs and quantity elements, under a given time range.getDescendants
(String epc, int depth, ZonedDateTime at) Returns the descendants of a given epc (also known as hierarchy).getDescendants
(Collection<String> epcs, int depth, ZonedDateTime at) Returns the descendants of a given collection of epcs (also known as hierarchy).getInstanceLotMasterData
(Set<String> epcs) This method fetches ilmd data from the origin event of a given epc/epc class.query()
Create a query builder which searches in either cassandra or elastic, depending on the provided query parameters.traceEvent
(TraceRequest request) This method fetches trace data for a given epc.traceEvent
(String epc) This method fetches trace data for a given epc.
-
Method Details
-
cassandraQuery
ICassandraEventsQuery<?> cassandraQuery()Create a query builder which searches in cassandra.- Returns:
- Repository query builder
-
elasticQuery
IElasticEventsQuery<?> elasticQuery()Create a query builder which searches in either elastic.- Returns:
- Repository query builder
-
query
IRepositoryEventsQuery<?> query()Create a query builder which searches in either cassandra or elastic, depending on the provided query parameters.- Returns:
- Repository query builder
-
getAncestry
Returns the ancestry of a given EPC (also known as genealogy)epc <--- requested EPC | p1 <--- parent | gp1 <--- grand parent
- Parameters:
epc
- The epc to search bydepth
- The number of level up to searchat
- At what given time result should be based on (this compares to event time)- Returns:
- An ancestry structure
-
getAncestry
Returns the ancestries of a given set of EPCs or quantity elements (also known as genealogy). In case quantity element is aggregated into multiple containers, multiple ancestries will be returned.epc1 epc2 qe3(5kg) qe3(5kg) <--- requested EPCs and/or quantity elements | | | | p1 p2 p3 p4 <--- parent | | | | gp1 gp2 gp3 gp4 <--- grand parent
- Parameters:
request
- the EPCs and/or quantity elements, the depth of the genealogy and the date range to search by. For the EPCs the date `to` is the only one used.- Returns:
- a list of ancestry structures
-
getDescendants
Returns the descendants of a given epc (also known as hierarchy).( epc ) / | \ c1 c2 c3 <---- children / \ | / \ gc1 gc2 gc3 gc4 gc5 <---- grand children
- Parameters:
epc
- The epc to search bydepth
- The number of levels the descendants lookup should search throughat
- At what given time result should be based on (this compares to event time)- Returns:
- A descendants structure
-
getDescendants
Returns the descendants of a given collection of epcs (also known as hierarchy).- Parameters:
epcs
- The epcs to search bydepth
- The number of levels the descendants lookup should search throughat
- At what given time result should be based on (this compares to event time)- Returns:
- A descendants list structure
-
traceEvent
This method fetches trace data for a given epc. Trace data consists of all event which directly or indirectly has to do with the supplied epc- Parameters:
epc
- The epc to search by- Returns:
- A list of events pertaining to this epc
-
traceEvent
This method fetches trace data for a given epc. Trace data consists of all event which directly or indirectly has to do with the supplied epc- Parameters:
request
- The epc and date to search by- Returns:
- A list of events pertaining to this epc
-
getInstanceLotMasterData
This method fetches ilmd data from the origin event of a given epc/epc class.- Parameters:
epcs
- A set of epcs or EpcClasses- Returns:
- a map structure containing the ilmd data for the supplied epcs/epc classes
-
getConstituents
Returns the constituents (made of) recursively for the given sets of epcs and quantity elements, under a given time range.( epc ) / | \ c1 c2 q1 <---- input epcs and/or quantity elements / \ | / \ gc1 gc2 gc3 qc1 qc2 <---- input epcs and/or quantity elements for the above
- Parameters:
request
- A search request object where epcs, quantity elements, from and to dates and depth can be configured.- Returns:
- A constituents structure as displayed above.
-
getDerivatives
Returns the derivatives (turned into) recursively for the given sets of epcs and quantity elements, under a given time range.( epc ) <--- input epcs/quantity elements / | \ c1 c2 q1 <---- epcs/quantity elements transformed (derived) from the above epcs/quantity elements / \ | / \ gc1 gc2 gc3 qc1 qc2 <---- epcs/quantity elements transformed (derived) from the above epcs/quantity elements
- Parameters:
request
- A search request object where epcs, quantity elements, from and to dates and depth can be configured.- Returns:
- A derivatives structure as displayed above.
-