Interface SzEngine
- All Known Implementing Classes:
SzCoreEngine
-
Method Summary
Modifier and TypeMethodDescriptionaddRecord
(SzRecordKey recordKey, String recordDefinition, Set<SzFlag> flags) void
closeExport
(long exportHandle) This function closes an export handle of a previously opened export to clean up system resources.long
Gets the number of redo records pending to be processed.deleteRecord
(SzRecordKey recordKey, Set<SzFlag> flags) Delete a previously loaded record identified by the data source code and record ID from the specifiedSzRecordKey
.long
exportCsvEntityReport
(String csvColumnList, Set<SzFlag> flags) Initiates an export of entity data in CSV format and returns an "export handle" that can be used to read the export data and must be closed when complete.long
exportJsonEntityReport
(Set<SzFlag> flags) Iniitiates an export of entity data as JSON-lines format and returns an "export handle" that can be used to read the export data and must be closed when complete.fetchNext
(long exportHandle) Fetches the next line of entity data from the export identified by the specified export handle.findNetwork
(SzEntityIds entityIds, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, Set<SzFlag> flags) Finds a network of entity relationships surrounding the paths between a set of entities identified by one or more entity ID's specified in an instance ofSzEntityIds
-- which is aSet
of non-nullLong
entity ID's.findNetwork
(SzRecordKeys recordKeys, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, Set<SzFlag> flags) Finds a network of entity relationships surrounding the paths between a set of entities having the constituent records identified by the data source code and record ID pairs contained in the specified instance ofSzRecordKeys
-- which is aSet
of one or more non-nullSzRecordKey
instances.findPath
(long startEntityId, long endEntityId, int maxDegrees, SzEntityIds avoidEntityIds, Set<String> requiredDataSources, Set<SzFlag> flags) Finds a relationship path between two entities identified by their entity ID's.findPath
(SzRecordKey startRecordKey, SzRecordKey endRecordKey, int maxDegrees, SzRecordKeys avoidRecordKeys, Set<String> requiredDataSources, Set<SzFlag> flags) Finds a relationship path between two entities identified by the data source codes and record ID's of their constituent records given by the specified start and endSzRecordKey
instances.This method is used to retrieve information about a specific resolved entity.getEntity
(SzRecordKey recordKey, Set<SzFlag> flags) This method is used to retrieve information about the resolved entity that contains a specific record that is identified by the data source code and record ID associated with the specifiedSzRecordKey
.getRecord
(SzRecordKey recordKey, Set<SzFlag> flags) Retrieves the record identified by the data source code and record ID from the specifiedSzRecordKey
.Retrieves a pending redo record from the reevaluation queue.getStats()
Returns the current internal engine workload statistics for the process.getVirtualEntity
(Set<SzRecordKey> recordKeys, Set<SzFlag> flags) Describes a hypothetically entity that would be composed of the one or more records identified by the data source code and record ID pairs in the specifiedSet
ofSzRecordKey
instances.Deterimes how an entity identified by the specified entity ID was constructed from its constituent records.preprocessRecord
(String recordDefinition, Set<SzFlag> flags) void
May optionally be called to pre-initialize some of the heavier weight internal resources of theSzEngine
.processRedoRecord
(String redoRecord, Set<SzFlag> flags) Processes the specified redo record using the specified flags.reevaluateEntity
(long entityId, Set<SzFlag> flags) Reevaluate a resolved entity identified by the specified entity ID.reevaluateRecord
(SzRecordKey recordKey, Set<SzFlag> flags) Reevaluate the record identified by the data source code and record ID from the specifiedSzRecordKey
.searchByAttributes
(String attributes, String searchProfile, Set<SzFlag> flags) This method searches for entities that match or relate to the provided search attributes using the optionally specified search profile.searchByAttributes
(String attributes, Set<SzFlag> flags) This method is equivalent to callingsearchByAttributes(String, String, Set)
with anull
value for the search profile parameter.whyEntities
(long entityId1, long entityId2, Set<SzFlag> flags) Determines the ways in which two entities identified by the specified entity ID's are related to each other.whyRecordInEntity
(SzRecordKey recordKey, Set<SzFlag> flags) Determines why the record identified by the data source code and record ID in the specified in anSzRecordKey
is included in its respective entity.whyRecords
(SzRecordKey recordKey1, SzRecordKey recordKey2, Set<SzFlag> flags) Determines ways in which two records identified by the data source code and record ID pairs from the specifiedSzRecordKey
instances are related to each other.
-
Method Details
-
primeEngine
May optionally be called to pre-initialize some of the heavier weight internal resources of theSzEngine
.- Throws:
SzException
- If a failure occurs.
-
getStats
Returns the current internal engine workload statistics for the process. The counters are reset after each call.- Returns:
- The
String
describing the statistics as JSON. - Throws:
SzException
- If a failure occurs.
-
addRecord
String addRecord(SzRecordKey recordKey, String recordDefinition, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzBadInputException, SzException Loads the record described by the specifiedString
record definition having the specified data source code and record ID using the specifiedSet
ofSzFlag
values. If a record already exists with the same data source code and record ID, then it will be replaced.The specified JSON data may optionally contain the
DATA_SOURCE
andRECORD_ID
properties, but, if so, they must match the specified parameters.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_MODIFY
group will be recognized (otherSzFlag
instances will be ignored). NOTE:EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- The non-nullSzRecordKey
that specifies the data source code and record ID of the record being added.recordDefinition
- TheString
that defines the record, typically in JSON format.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_MODIFY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
. SpecifySzFlag.SZ_WITH_INFO_FLAGS
for an INFO response.- Returns:
- The JSON
String
result produced by adding the record to the repository (depending on the specified flags). - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzBadInputException
- If the specified record definition has a data source or record ID value that conflicts with the specified data source code and/or record ID values.SzException
- If a failure occurs.- See Also:
-
preprocessRecord
Performs a hypothetical load of a the record described by the specifiedString
record definition using the specifiedSet
ofSzFlag
values.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_RECORD
group will be recognized (otherSzFlag
instances will be ignored). NOTE:EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordDefinition
- TheString
that defines the record, typically in JSON format.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_RECORD
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_RECORD_DEFAULT_FLAGS
.- Returns:
- The JSON
String
result produced by preprocessing the record (depending on the specified flags). - Throws:
SzException
- If a failure occurs.- See Also:
-
deleteRecord
String deleteRecord(SzRecordKey recordKey, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzException Delete a previously loaded record identified by the data source code and record ID from the specifiedSzRecordKey
. This method is idempotent, meaning multiple calls this method with the same method will all succeed regardless of whether or not the record is found in the repository.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_MODIFY
group will be recognized (otherSzFlag
instances will be ignored). NOTE:EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- The non-nullSzRecordKey
that specifies the data source code and record Id of the record to delete.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_MODIFY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
. SpecifySzFlag.SZ_WITH_INFO_FLAGS
for an INFO response.- Returns:
- The JSON
String
result produced by deleting the record from the repository (depending on the specified flags). - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzException
- If a failure occurs.- See Also:
-
reevaluateRecord
String reevaluateRecord(SzRecordKey recordKey, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzException Reevaluate the record identified by the data source code and record ID from the specifiedSzRecordKey
.If the data source code is not recognized then an
SzUnknownDataSourceException
is thrown but if the record for the record ID is not found, then the operation silently does nothing with no exception. This is to ensure consistent behavior in case of a race condition with record deletion. To ensure that the record was found, specify theSzFlag.SZ_WITH_INFO
flag and check the returned INFO document for affected entities.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_MODIFY
group will be recognized (otherSzFlag
instances will be ignored). NOTE:EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- The non-nullSzRecordKey
that specifies the data source code and record Id of the record to reevaluate.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_MODIFY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
. SpecifySzFlag.SZ_WITH_INFO_FLAGS
for an INFO response.- Returns:
- The JSON
String
result produced by reevaluating the record in the repository (depending on the specified flags). - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzException
- If a failure occurs.- See Also:
-
reevaluateEntity
Reevaluate a resolved entity identified by the specified entity ID. If the entity is not found then this method does nothing.If the entity for the entity ID is not found, then the operation silently does nothing with no exception. This is to ensure consistent behavior in case of a race condition with entity re-resolve or unresolve. To ensure that the entity was found, specify the
SzFlag.SZ_WITH_INFO
flag and check the returned INFO document for affected entities.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_MODIFY
group will be recognized (otherSzFlag
instances will be ignored). NOTE:EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
entityId
- The ID of the resolved entity to reevaluate.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_MODIFY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
. SpecifySzFlag.SZ_WITH_INFO_FLAGS
for an INFO response.- Returns:
- The JSON
String
result produced by reevaluating the entity in the repository (depending on the specified flags). - Throws:
SzException
- If a failure occurs.- See Also:
-
searchByAttributes
String searchByAttributes(String attributes, String searchProfile, Set<SzFlag> flags) throws SzException This method searches for entities that match or relate to the provided search attributes using the optionally specified search profile. The specified search attributes are treated as a hypothetical record and the search results are those entities that would match or relate to that hypothetical record on some level (depending on the specified flags).If the specified search profile is
null
then the default generic thresholds from the default search profile will be used for the search (alternatively, usesearchByAttributes(String, Set)
to omit the parameter). If your search requires different behavior using alternate generic thresholds, please contact support@senzing.com for details on configuring a custom search profile.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_SEARCH
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
attributes
- The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.searchProfile
- The optional search profile identifier, ornull
if the default search profile should be used for the search.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_SEARCH
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The resulting JSON
String
describing the result of the search. - Throws:
SzException
- If a failure occurs.- See Also:
-
searchByAttributes
This method is equivalent to callingsearchByAttributes(String, String, Set)
with anull
value for the search profile parameter. SeesearchByAttributes(String, String, Set)
documentation for details.- Parameters:
attributes
- The search attributes defining the hypothetical record to match and/or relate to in order to obtain the search results.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_SEARCH
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The resulting JSON
String
describing the result of the search. - Throws:
SzException
- If a failure occurs.- See Also:
-
getEntity
This method is used to retrieve information about a specific resolved entity. The result is returned as a JSON document describing the entity. The level of detail provided for the entity depends upon the specifiedSet
ofSzFlag
instances.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_ENTITY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
entityId
- The entity ID identifying the entity to retrieve.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_ENTITY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_ENTITY_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the entity. - Throws:
SzNotFoundException
- If no enitty could be found with the specified entity ID.SzException
- If a failure occurs.- See Also:
-
getEntity
String getEntity(SzRecordKey recordKey, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzNotFoundException, SzException This method is used to retrieve information about the resolved entity that contains a specific record that is identified by the data source code and record ID associated with the specifiedSzRecordKey
. The result is returned as a JSON document describing the entity. The level of detail provided for the entity depends upon the specifiedSet
ofSzFlag
instances.The specified
Set
ofSzFlag
instances may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_ENTITY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- The non-nullSzRecordKey
that specifies the data source code and record Id of the consituent record for the entity to retrieve.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_ENTITY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_ENTITY_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the entity. - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzNotFoundException
- If no enitty could be found with the specified entity ID.SzException
- If a failure occurs.- See Also:
-
findPath
String findPath(long startEntityId, long endEntityId, int maxDegrees, SzEntityIds avoidEntityIds, Set<String> requiredDataSources, Set<SzFlag> flags) throws SzNotFoundException, SzUnknownDataSourceException, SzException Finds a relationship path between two entities identified by their entity ID's.Entities to be avoided when finding the path may optionally be specified as a non-null
SzEntityIds
instance describing aSet
ofLong
entity ID's. If specified as non-null, then the avoidanceSzEntityIds
contains the non-nullLong
entity ID's that identify entities to be avoided. By default the specified entities will be avoided unless absolutely neccessary to find the path. To strictly avoid the specified entities specify theSzFlag.SZ_FIND_PATH_STRICT_AVOID
flag.Further, a JSON required data sources
Set
ofString
data source codes may optionally be specified. If specified as non-null, then the required data sourcesSet
contains non-nullString
data source codes that identify data sources for which a record from at least one must exist on the path.The optionally specified
Set
ofSzFlag
instances not only control how the operation is performed but also the level of detail provided for the path and the entities on the path. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_FIND_PATH
group will be recognized (otherSzFlag
instance will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
startEntityId
- The entity ID of the first entity.endEntityId
- The entity ID of the second entity.maxDegrees
- The maximum number of degrees for the path search.avoidEntityIds
- The optionalSzEntityIds
describing theSet
of non-nullLong
entity ID's identifying entities to be avoided when finding the path, ornull
if no entities identified by are to be avoided.requiredDataSources
- The optionalSet
of non-nullString
data source codes identifying the data sources for which at least one record must be included on the path, ornull
if none are required.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_FIND_PATH
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_FIND_PATH_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters. - Throws:
SzNotFoundException
- If either the path-start or path-end entities for the specified entity ID's cannot be found.SzUnknownDataSourceException
- If an unrecognized required data source is specified.SzException
- If a failure occurs.- See Also:
-
findPath
String findPath(SzRecordKey startRecordKey, SzRecordKey endRecordKey, int maxDegrees, SzRecordKeys avoidRecordKeys, Set<String> requiredDataSources, Set<SzFlag> flags) throws SzNotFoundException, SzUnknownDataSourceException, SzException Finds a relationship path between two entities identified by the data source codes and record ID's of their constituent records given by the specified start and endSzRecordKey
instances.Entities to be avoided when finding the path may be optionally specified as a non-null
SzRecordKeys
describing aSet
ofSzRecordKey
instances. If specified as non-null, then the avoidanceSzRecordKeys
contains the non-nullSzRecordKey
instances providing the data source code and record ID pairs that identify the constituent records of entities to be avoided. By default the associated entities will be avoided unless absolutely neccessary to find the path. To strictly avoid the associated entities specify theSzFlag.SZ_FIND_PATH_STRICT_AVOID
flag.Further, a JSON required data sources
Set
ofString
data source codes may optionally be specified. If specified as non-null, then the required data sourcesSet
contains non-nullString
data source codes that identify data sources for which a record from at least one must exist on the path.The optionally specified
Set
ofSzFlag
instances not only control how the operation is performed but also the level of detail provided for the path and the entities on the path. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_FIND_PATH
group will be recognized (otherSzFlag
instance will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
startRecordKey
- TheSzRecordKey
containing the data source code and record ID identifying the record at the start of the path.endRecordKey
- TheSzRecordKey
containing the data source code and record ID identifying the record at the end of the path.maxDegrees
- The maximum number of degrees for the path search.avoidRecordKeys
- The optionalSzRecordKeys
describing theSet
of non-nullSzRecordKey
instances providing the data source code and record ID pairs of the records whose entities are to be avoided when finding the path, ornull
if no entities identified by are to be avoided.requiredDataSources
- The optionalSet
of non-nullString
data source codes identifying the data sources for which at least one record must be included on the path, ornull
if none are required.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_FIND_PATH
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_FIND_PATH_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the resultant entity path which may be an empty path if no path exists between the two entities given the path parameters. - Throws:
SzNotFoundException
- If either the path-start or path-end records for the specified data source code and record ID pairs cannot be found.SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzException
- If a failure occurs.- See Also:
-
findNetwork
String findNetwork(SzEntityIds entityIds, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, Set<SzFlag> flags) throws SzNotFoundException, SzException Finds a network of entity relationships surrounding the paths between a set of entities identified by one or more entity ID's specified in an instance ofSzEntityIds
-- which is aSet
of non-nullLong
entity ID's.Additionally, the maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size. Further, a non-zero number of degrees to build out the network may be specified to find other related entities. If build out is specified, it can be limited to a maximum total number of build-out entities for the whole network.
The optionally specified
Set
ofSzFlag
instances not only control how the operation is performed but also the level of detail provided for the network and the entities on the network. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_FIND_NETWORK
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
entityIds
- TheSzEntityIds
describing theSet
of non-nullLong
entity ID's identifying the entities for which to build the network.maxDegrees
- The maximum number of degrees for the path search between the specified entities.buildOutDegrees
- The number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out.buildOutMaxEntities
- The maximum number of entities to build out for the entire network.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_FIND_NETWORK
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_FIND_NETWORK_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the resultant entity network and the entities on the network. - Throws:
SzNotFoundException
- If any of the entities for the specified entity ID's cannot be found.SzException
- If a failure occurs.- See Also:
-
findNetwork
String findNetwork(SzRecordKeys recordKeys, int maxDegrees, int buildOutDegrees, int buildOutMaxEntities, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzNotFoundException, SzException Finds a network of entity relationships surrounding the paths between a set of entities having the constituent records identified by the data source code and record ID pairs contained in the specified instance ofSzRecordKeys
-- which is aSet
of one or more non-nullSzRecordKey
instances.Additionally, the maximum degrees of separation for the paths between entities must be specified so as to prevent the network growing beyond the desired size. Further, a non-zero number of degrees to build out the network may be specified to find other related entities. If build out is specified, it can be limited to a maximum total number of build-out entities for the whole network.
The optionally specified
Set
ofSzFlag
instances not only control how the operation is performed but also the level of detail provided for the network and the entities on the network. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_FIND_NETWORK
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKeys
- TheSzRecordKeys
describing theSet
of non-nullSzRecordKey
instances providing the data source code and record ID pairs for the consituent records of the entities for which to build the network.maxDegrees
- The maximum number of degrees for the path search between the specified entities.buildOutDegrees
- The number of relationship degrees to build out from each of the found entities on the network, or zero to prevent network build-out.buildOutMaxEntities
- The maximum number of entities to build out for the entire network.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_FIND_NETWORK
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_FIND_NETWORK_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the resultant entity network and the entities on the network. - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzNotFoundException
- If any of the records for the specified data source code and record ID pairs cannot be found.SzException
- If a failure occurs.- See Also:
-
whyRecordInEntity
String whyRecordInEntity(SzRecordKey recordKey, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzNotFoundException, SzException Determines why the record identified by the data source code and record ID in the specified in anSzRecordKey
is included in its respective entity.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_WHY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- TheSzRecordKey
that has the data source code and record ID identifying the record.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_WHY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_WHY_RECORD_IN_ENTITY_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing why the record is included in its respective entity. - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzNotFoundException
- If any of the records for the specified data source code and record ID pairs cannot be found.SzException
- If a failure occurs.- See Also:
-
whyRecords
String whyRecords(SzRecordKey recordKey1, SzRecordKey recordKey2, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzNotFoundException, SzException Determines ways in which two records identified by the data source code and record ID pairs from the specifiedSzRecordKey
instances are related to each other.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_WHY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey1
- The non-nullSzRecordKey
providing the data source code and record ID for the first record.recordKey2
- The non-nullSzRecordKey
providing the data source code and record ID for the second record.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_WHY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_WHY_RECORDS_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the ways in which the records are related to one another. - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzNotFoundException
- If either of the records for the specified data source code and record ID pairs cannot be found.SzException
- If a failure occurs.- See Also:
-
whyEntities
String whyEntities(long entityId1, long entityId2, Set<SzFlag> flags) throws SzNotFoundException, SzException Determines the ways in which two entities identified by the specified entity ID's are related to each other.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_WHY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
entityId1
- The entity ID of the first entity.entityId2
- The entity ID of the second entity.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_WHY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_WHY_ENTITIES_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the ways in which the entities are related to one another. - Throws:
SzNotFoundException
- If either of the entities for the specified entity ID's could not be found.SzException
- If a failure occurs.- See Also:
-
howEntity
Deterimes how an entity identified by the specified entity ID was constructed from its constituent records.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_HOW
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
entityId
- The entity ID of the entity.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_HOW
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_HOW_ENTITY_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the how the entity was constructed. - Throws:
SzNotFoundException
- If the entity for the specified entity ID could not be found.SzException
- If a failure occurs.- See Also:
-
getVirtualEntity
String getVirtualEntity(Set<SzRecordKey> recordKeys, Set<SzFlag> flags) throws SzNotFoundException, SzException Describes a hypothetically entity that would be composed of the one or more records identified by the data source code and record ID pairs in the specifiedSet
ofSzRecordKey
instances.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_VIRTUAL_ENTITY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKeys
- The non-null non-emptySet
of non-nullSzRecordKey
instances that identify the records to use to build the virtual entity.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_VIRTUAL_ENTITY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_VIRTUAL_ENTITY_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the virtual entity having the specified constituent records. - Throws:
SzNotFoundException
- If any of the records for the specified data source code and record ID pairs cannot be found.SzException
- If a failure occurs.- See Also:
-
getRecord
String getRecord(SzRecordKey recordKey, Set<SzFlag> flags) throws SzUnknownDataSourceException, SzNotFoundException, SzException Retrieves the record identified by the data source code and record ID from the specifiedSzRecordKey
.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_RECORD
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
recordKey
- The non-nullSzRecordKey
providing the data source code and record ID that identify the record to retrieve.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_RECORD
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_RECORD_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The JSON
String
describing the record. - Throws:
SzUnknownDataSourceException
- If an unrecognized data source code is specified.SzNotFoundException
- If the record for the specified data source code and record ID pairs cannot be found.SzException
- If a failure occurs.- See Also:
-
exportJsonEntityReport
Iniitiates an export of entity data as JSON-lines format and returns an "export handle" that can be used to read the export data and must be closed when complete. Each output line contains the exported entity data for a single resolved entity.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_EXPORT
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_EXPORT
group to control how the operation is performed and the content of the export, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_EXPORT_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The export handle to use for retrieving the export data.
- Throws:
SzException
- If a failure occurs.- See Also:
-
exportCsvEntityReport
Initiates an export of entity data in CSV format and returns an "export handle" that can be used to read the export data and must be closed when complete. The first exported line contains the CSV header and each subsequent line contains the exported entity data for a single resolved entity.- Parameters:
csvColumnList
- Specify"*"
to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-sepatated list of column names.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_EXPORT
group to control how the operation is performed and the content of the export, ornull
to default toSzFlag.SZ_NO_FLAGS
orSzFlag.SZ_EXPORT_DEFAULT_FLAGS
for the default recommended flags.- Returns:
- The export handle to use for retrieving the export data.
- Throws:
SzException
- If a failure occurs.- See Also:
-
fetchNext
Fetches the next line of entity data from the export identified by the specified export handle. The specified export handle can be obtained fromexportJsonEntityReport(Set)
orexportCsvEntityReport(String, Set)
.- Parameters:
exportHandle
- The export handle to identify the export from which to retrieve the next line of data.- Returns:
- The next line of export data whose format depends on
which function was used to initiate the export, or
null
if there is no more data to be exported via the specified handle. - Throws:
SzException
- If a failure occurs.- See Also:
-
closeExport
This function closes an export handle of a previously opened export to clean up system resources. This function is idempotent and may be called for an export that has already been closed.- Parameters:
exportHandle
- The export handle of the export to close.- Throws:
SzException
- If a failure occurs.- See Also:
-
processRedoRecord
Processes the specified redo record using the specified flags. The redo record can be retrieved fromgetRedoRecord()
.The optionally specified
Set
ofSzFlag
instances that not only control how the operation is performed but also the level of detail provided for the entity and record being analyzed. TheSet
may contain anySzFlag
value, but only flags belonging to theSzFlagUsageGroup.SZ_MODIFY
group are guaranteed to be recognized (otherSzFlag
instances will be ignored unless they have equivalent bit flags).NOTE:
EnumSet
offers an efficient means of constructing aSet
ofSzFlag
.- Parameters:
redoRecord
- The redorecord to be processed.flags
- The optionalSet
ofSzFlag
instances belonging to theSzFlagUsageGroup.SZ_MODIFY
group to control how the operation is performed and the content of the response, ornull
to default toSzFlag.SZ_NO_FLAGS
. SpecifySzFlag.SZ_WITH_INFO_FLAGS
for an INFO response.- Returns:
- The JSON
String
result produced by adding the record to the repository (depending on the specified flags). - Throws:
SzException
- If a failure occurs.- See Also:
-
getRedoRecord
Retrieves a pending redo record from the reevaluation queue. If no redo records are availbale then this returns annull
.- Returns:
- The retrieved redo record or
null
if there were no pending redo records. - Throws:
SzException
- If a failure occurs.- See Also:
-
countRedoRecords
Gets the number of redo records pending to be processed.- Returns:
- The number of redo records pending to be processed.
- Throws:
SzException
- If a failure occurs.- See Also:
-