package Ġstreams Ċ Ċ import Ġorg . neo 4 j . graph db . Graph Database Service Ċ import Ġorg . neo 4 j . kernel . internal . Graph Database API Ċ import Ġstreams . config . Streams Config Ċ import Ġstreams . extensions . is Default Db Ċ import Ġstreams . service . Streams Strategy Storage Ċ import Ġstreams . service . Topic Type Ċ import Ġstreams . service . sink . strategy . C UD In gestion Strategy Ċ import Ġstreams . service . sink . strategy . Cy pher Template Strategy Ċ import Ġstreams . service . sink . strategy . In gestion Strategy Ċ import Ġstreams . service . sink . strategy . Node Pattern Configuration Ċ import Ġstreams . service . sink . strategy . Node Pattern In gestion Strategy Ċ import Ġstreams . service . sink . strategy . Relationship Pattern Configuration Ċ import Ġstreams . service . sink . strategy . Relationship Pattern In gestion Strategy Ċ import Ġstreams . service . sink . strategy . Schema In gestion Strategy Ċ import Ġstreams . service . sink . strategy . Source Id In gestion Strategy Ċ Ċ class ĠNeo 4 j Streams Strategy Storage ( private Ġval Ġstreams Topic Service : ĠStreams Topic Service , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġstreams Config : ĠMap < String , ĠString >, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġdb : ĠGraph Database Service ): ĠStreams Strategy Storage () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġget Topic Type ( topic : ĠString ): ĠTopic Type ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġstreams Topic Service . get Topic Type ( topic ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġ< T > Ġget Topics By Topic Type ( topic Type : ĠTopic Type ): ĠT Ġ= Ġstreams Topic Service . getBy Topic Type ( topic Type ) Ġas ĠT ĊĊĠĠĠ Ġoverride Ġfun Ġget Strategy ( topic : ĠString ): ĠIn gestion Strategy Ġ= Ġwhen Ġ( val Ġtopic Type Ġ= Ġget Topic Type ( topic )) Ġ{ ĊĠĠĠĠĠĠĠ ĠTopic Type . CDC _ SOURCE _ ID Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġstrategy Config Ġ= ĠStreams Sink Configuration ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. create Source Id In gestion Strategy Config ( streams Config , Ġdb . database Name (), Ġdb . is Default Db ()) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠSource Id In gestion Strategy ( strategy Config ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠTopic Type . CDC _ SCHEMA Ġ-> ĠSchema In gestion Strategy () ĊĠĠĠĠĠĠĠ ĠTopic Type . C UD Ġ-> ĠC UD In gestion Strategy () ĊĠĠĠĠĠĠĠ ĠTopic Type . PATTERN _ NODE Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmap Ġ= Ġget Topics By Topic Type < Map < String , ĠNode Pattern Configuration >>( topic Type ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠNode Pattern In gestion Strategy ( map . getValue ( topic )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠTopic Type . PATTERN _ REL ATION SHIP Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġmap Ġ= Ġget Topics By Topic Type < Map < String , ĠRelationship Pattern Configuration >>( topic Type ) ĊĠĠĠĠĠĠĠĠĠĠĠ ĠRelationship Pattern In gestion Strategy ( map . getValue ( topic )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ ĠTopic Type . CY P HER Ġ-> Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCy pher Template Strategy ( streams Topic Service . getC y pher Template ( topic ) !! ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġelse Ġ-> Ġthrow ĠRuntimeException (" Topic ĠType Ġnot ĠFound ") ĊĠĠĠ Ġ} Ċ Ċ }