@ Override public String getOrCreateForKey ( String key ) { return uuidsByDbKey . computeIfAbsent ( key , k1 -> uuidsByMigratedKey . computeIfAbsent ( k1 , k2 -> Uuids . create ( ) ) ) ; }
Get UUID from component having the same key in database if it exists otherwise look for migrated keys and finally generate a new one .