Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
senzing::sdk::core::SzCoreEngine Class Referencefinal

Core implementation of SzEngine backed by the native Sz_* module. More...

#include <SzCoreEngine.hpp>

Inheritance diagram for senzing::sdk::core::SzCoreEngine:
Collaboration diagram for senzing::sdk::core::SzCoreEngine:

Public Member Functions

 SzCoreEngine (SzCoreEnvironment &env)
 Constructs and initializes the native engine module using the owning environment's settings.
 ~SzCoreEngine () override=default
 SzCoreEngine (const SzCoreEngine &)=delete
SzCoreEngine & operator= (const SzCoreEngine &)=delete
void PrimeEngine () override
 Pre-loads engine resources to reduce first-call latency.
std::string GetStats () override
 Returns JSON workload statistics for this engine instance.
std::string AddRecord (const std::string &dataSourceCode, const std::string &recordID, const std::string &recordDefinition, SzFlags flags=SzAddRecordDefaultFlags) override
std::string GetRecordPreview (const std::string &recordDefinition, SzFlags flags=SzRecordPreviewDefaultFlags) override
std::string DeleteRecord (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzDeleteRecordDefaultFlags) override
std::string ReevaluateRecord (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzReevaluateRecordDefaultFlags) override
std::string ReevaluateEntity (int64_t entityID, SzFlags flags=SzReevaluateEntityDefaultFlags) override
std::string SearchByAttributes (const std::string &attributes, const std::string &searchProfile, SzFlags flags=SzSearchByAttributesDefaultFlags) override
std::string SearchByAttributes (const std::string &attributes, SzFlags flags=SzSearchByAttributesDefaultFlags) override
std::string WhySearch (const std::string &attributes, int64_t entityID, const std::string &searchProfile="", SzFlags flags=SzWhySearchDefaultFlags) override
std::string GetEntity (int64_t entityID, SzFlags flags=SzEntityDefaultFlags) override
std::string GetEntity (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzEntityDefaultFlags) override
std::string GetRecord (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzRecordDefaultFlags) override
std::string FindInterestingEntities (int64_t entityID, SzFlags flags=SzFindInterestingEntitiesDefaultFlags) override
std::string FindInterestingEntities (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzFindInterestingEntitiesDefaultFlags) override
std::string FindPath (int64_t startEntityID, int64_t endEntityID, int32_t maxDegrees, const std::set< int64_t > &avoidEntityIDs={}, const std::set< std::string > &requiredDataSources={}, SzFlags flags=SzFindPathDefaultFlags) override
std::string FindPath (const std::string &startDataSourceCode, const std::string &startRecordID, const std::string &endDataSourceCode, const std::string &endRecordID, int32_t maxDegrees, const std::set< std::pair< std::string, std::string > > &avoidRecordKeys={}, const std::set< std::string > &requiredDataSources={}, SzFlags flags=SzFindPathDefaultFlags) override
std::string FindNetwork (const std::set< int64_t > &entityIDs, int32_t maxDegrees, int32_t buildOutDegrees, int32_t buildOutMaxEntities, SzFlags flags=SzFindNetworkDefaultFlags) override
std::string FindNetwork (const std::set< std::pair< std::string, std::string > > &recordKeys, int32_t maxDegrees, int32_t buildOutDegrees, int32_t buildOutMaxEntities, SzFlags flags=SzFindNetworkDefaultFlags) override
std::string WhyRecordInEntity (const std::string &dataSourceCode, const std::string &recordID, SzFlags flags=SzWhyRecordInEntityDefaultFlags) override
std::string WhyRecords (const std::string &dataSourceCode1, const std::string &recordID1, const std::string &dataSourceCode2, const std::string &recordID2, SzFlags flags=SzWhyRecordsDefaultFlags) override
std::string WhyEntities (int64_t entityID1, int64_t entityID2, SzFlags flags=SzWhyEntitiesDefaultFlags) override
std::string HowEntity (int64_t entityID, SzFlags flags=SzHowEntityDefaultFlags) override
std::string GetVirtualEntity (const std::set< std::pair< std::string, std::string > > &recordKeys, SzFlags flags=SzVirtualEntityDefaultFlags) override
SzExportHandle ExportJsonEntityReport (SzFlags flags=SzExportDefaultFlags) override
SzExportHandle ExportCsvEntityReport (const std::string &csvColumnList, SzFlags flags=SzExportDefaultFlags) override
std::string FetchNext (SzExportHandle exportHandle) override
void CloseExportReport (SzExportHandle exportHandle) override
std::string ProcessRedoRecord (const std::string &redoRecord, SzFlags flags=SzRedoDefaultFlags) override
std::string GetRedoRecord () override
int64_t CountRedoRecords () override
void Destroy ()
 Destroys the native engine module.
bool IsDestroyed ()
 True once the native module has been destroyed.
Public Member Functions inherited from senzing::sdk::SzEngine
virtual ~SzEngine ()=default

Static Public Member Functions

static std::string EncodeEntityIDs (const std::set< int64_t > &entityIDs)
 Encodes a set of entity IDs as {"ENTITIES":[{"ENTITY_ID":n},...]}.
static std::string EncodeRecordKeys (const std::set< std::pair< std::string, std::string > > &recordKeys)
 Encodes a set of (dataSource, recordID) keys as {"RECORDS":[{"DATA_SOURCE":..,"RECORD_ID":..},...]}.
static std::string EncodeDataSources (const std::set< std::string > &dataSources)
 Encodes a set of data source codes as {"DATA_SOURCES":[..]}.

Detailed Description

Core implementation of SzEngine backed by the native Sz_* module.

Constructor & Destructor Documentation

◆ SzCoreEngine() [1/2]

senzing::sdk::core::SzCoreEngine::SzCoreEngine ( SzCoreEnvironment & env)
explicit

Constructs and initializes the native engine module using the owning environment's settings.

Throws the mapped SzException on init failure.

◆ ~SzCoreEngine()

senzing::sdk::core::SzCoreEngine::~SzCoreEngine ( )
overridedefault

◆ SzCoreEngine() [2/2]

senzing::sdk::core::SzCoreEngine::SzCoreEngine ( const SzCoreEngine & )
delete

Member Function Documentation

◆ AddRecord()

std::string senzing::sdk::core::SzCoreEngine::AddRecord ( const std::string & dataSourceCode,
const std::string & recordID,
const std::string & recordDefinition,
SzFlags flags = SzAddRecordDefaultFlags )
overridevirtual

◆ CloseExportReport()

void senzing::sdk::core::SzCoreEngine::CloseExportReport ( SzExportHandle exportHandle)
overridevirtual

◆ CountRedoRecords()

int64_t senzing::sdk::core::SzCoreEngine::CountRedoRecords ( )
overridevirtual

◆ DeleteRecord()

std::string senzing::sdk::core::SzCoreEngine::DeleteRecord ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzDeleteRecordDefaultFlags )
overridevirtual

◆ Destroy()

void senzing::sdk::core::SzCoreEngine::Destroy ( )

Destroys the native engine module.

Idempotent; called by the owning environment during teardown.

◆ EncodeDataSources()

std::string senzing::sdk::core::SzCoreEngine::EncodeDataSources ( const std::set< std::string > & dataSources)
static

Encodes a set of data source codes as {"DATA_SOURCES":[..]}.

◆ EncodeEntityIDs()

std::string senzing::sdk::core::SzCoreEngine::EncodeEntityIDs ( const std::set< int64_t > & entityIDs)
static

Encodes a set of entity IDs as {"ENTITIES":[{"ENTITY_ID":n},...]}.

◆ EncodeRecordKeys()

std::string senzing::sdk::core::SzCoreEngine::EncodeRecordKeys ( const std::set< std::pair< std::string, std::string > > & recordKeys)
static

Encodes a set of (dataSource, recordID) keys as {"RECORDS":[{"DATA_SOURCE":..,"RECORD_ID":..},...]}.

◆ ExportCsvEntityReport()

SzExportHandle senzing::sdk::core::SzCoreEngine::ExportCsvEntityReport ( const std::string & csvColumnList,
SzFlags flags = SzExportDefaultFlags )
overridevirtual

◆ ExportJsonEntityReport()

SzExportHandle senzing::sdk::core::SzCoreEngine::ExportJsonEntityReport ( SzFlags flags = SzExportDefaultFlags)
overridevirtual

◆ FetchNext()

std::string senzing::sdk::core::SzCoreEngine::FetchNext ( SzExportHandle exportHandle)
overridevirtual

◆ FindInterestingEntities() [1/2]

std::string senzing::sdk::core::SzCoreEngine::FindInterestingEntities ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzFindInterestingEntitiesDefaultFlags )
overridevirtual

◆ FindInterestingEntities() [2/2]

std::string senzing::sdk::core::SzCoreEngine::FindInterestingEntities ( int64_t entityID,
SzFlags flags = SzFindInterestingEntitiesDefaultFlags )
overridevirtual

◆ FindNetwork() [1/2]

std::string senzing::sdk::core::SzCoreEngine::FindNetwork ( const std::set< int64_t > & entityIDs,
int32_t maxDegrees,
int32_t buildOutDegrees,
int32_t buildOutMaxEntities,
SzFlags flags = SzFindNetworkDefaultFlags )
overridevirtual

◆ FindNetwork() [2/2]

std::string senzing::sdk::core::SzCoreEngine::FindNetwork ( const std::set< std::pair< std::string, std::string > > & recordKeys,
int32_t maxDegrees,
int32_t buildOutDegrees,
int32_t buildOutMaxEntities,
SzFlags flags = SzFindNetworkDefaultFlags )
overridevirtual

◆ FindPath() [1/2]

std::string senzing::sdk::core::SzCoreEngine::FindPath ( const std::string & startDataSourceCode,
const std::string & startRecordID,
const std::string & endDataSourceCode,
const std::string & endRecordID,
int32_t maxDegrees,
const std::set< std::pair< std::string, std::string > > & avoidRecordKeys = {},
const std::set< std::string > & requiredDataSources = {},
SzFlags flags = SzFindPathDefaultFlags )
overridevirtual

◆ FindPath() [2/2]

std::string senzing::sdk::core::SzCoreEngine::FindPath ( int64_t startEntityID,
int64_t endEntityID,
int32_t maxDegrees,
const std::set< int64_t > & avoidEntityIDs = {},
const std::set< std::string > & requiredDataSources = {},
SzFlags flags = SzFindPathDefaultFlags )
overridevirtual

◆ GetEntity() [1/2]

std::string senzing::sdk::core::SzCoreEngine::GetEntity ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzEntityDefaultFlags )
overridevirtual

◆ GetEntity() [2/2]

std::string senzing::sdk::core::SzCoreEngine::GetEntity ( int64_t entityID,
SzFlags flags = SzEntityDefaultFlags )
overridevirtual

◆ GetRecord()

std::string senzing::sdk::core::SzCoreEngine::GetRecord ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzRecordDefaultFlags )
overridevirtual

◆ GetRecordPreview()

std::string senzing::sdk::core::SzCoreEngine::GetRecordPreview ( const std::string & recordDefinition,
SzFlags flags = SzRecordPreviewDefaultFlags )
overridevirtual

◆ GetRedoRecord()

std::string senzing::sdk::core::SzCoreEngine::GetRedoRecord ( )
overridevirtual

◆ GetStats()

std::string senzing::sdk::core::SzCoreEngine::GetStats ( )
overridevirtual

Returns JSON workload statistics for this engine instance.

Implements senzing::sdk::SzEngine.

◆ GetVirtualEntity()

std::string senzing::sdk::core::SzCoreEngine::GetVirtualEntity ( const std::set< std::pair< std::string, std::string > > & recordKeys,
SzFlags flags = SzVirtualEntityDefaultFlags )
overridevirtual

◆ HowEntity()

std::string senzing::sdk::core::SzCoreEngine::HowEntity ( int64_t entityID,
SzFlags flags = SzHowEntityDefaultFlags )
overridevirtual

◆ IsDestroyed()

bool senzing::sdk::core::SzCoreEngine::IsDestroyed ( )
nodiscard

True once the native module has been destroyed.

◆ operator=()

SzCoreEngine & senzing::sdk::core::SzCoreEngine::operator= ( const SzCoreEngine & )
delete

◆ PrimeEngine()

void senzing::sdk::core::SzCoreEngine::PrimeEngine ( )
overridevirtual

Pre-loads engine resources to reduce first-call latency.

Implements senzing::sdk::SzEngine.

◆ ProcessRedoRecord()

std::string senzing::sdk::core::SzCoreEngine::ProcessRedoRecord ( const std::string & redoRecord,
SzFlags flags = SzRedoDefaultFlags )
overridevirtual

◆ ReevaluateEntity()

std::string senzing::sdk::core::SzCoreEngine::ReevaluateEntity ( int64_t entityID,
SzFlags flags = SzReevaluateEntityDefaultFlags )
overridevirtual

◆ ReevaluateRecord()

std::string senzing::sdk::core::SzCoreEngine::ReevaluateRecord ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzReevaluateRecordDefaultFlags )
overridevirtual

◆ SearchByAttributes() [1/2]

std::string senzing::sdk::core::SzCoreEngine::SearchByAttributes ( const std::string & attributes,
const std::string & searchProfile,
SzFlags flags = SzSearchByAttributesDefaultFlags )
overridevirtual

◆ SearchByAttributes() [2/2]

std::string senzing::sdk::core::SzCoreEngine::SearchByAttributes ( const std::string & attributes,
SzFlags flags = SzSearchByAttributesDefaultFlags )
overridevirtual

◆ WhyEntities()

std::string senzing::sdk::core::SzCoreEngine::WhyEntities ( int64_t entityID1,
int64_t entityID2,
SzFlags flags = SzWhyEntitiesDefaultFlags )
overridevirtual

◆ WhyRecordInEntity()

std::string senzing::sdk::core::SzCoreEngine::WhyRecordInEntity ( const std::string & dataSourceCode,
const std::string & recordID,
SzFlags flags = SzWhyRecordInEntityDefaultFlags )
overridevirtual

◆ WhyRecords()

std::string senzing::sdk::core::SzCoreEngine::WhyRecords ( const std::string & dataSourceCode1,
const std::string & recordID1,
const std::string & dataSourceCode2,
const std::string & recordID2,
SzFlags flags = SzWhyRecordsDefaultFlags )
overridevirtual

◆ WhySearch()

std::string senzing::sdk::core::SzCoreEngine::WhySearch ( const std::string & attributes,
int64_t entityID,
const std::string & searchProfile = "",
SzFlags flags = SzWhySearchDefaultFlags )
overridevirtual

The documentation for this class was generated from the following file: