package Ġcom . network ed assets . git 4 c . infrastructure . database . ao . repository Ċ Ċ import Ġcom . atlassian . active objects . external . Active Objects Ċ import Ġcom . network ed assets . git 4 c . core . datastore . repositories . Temporary Edit Branches Database Ċ import Ġcom . network ed assets . git 4 c . data . Temporary Edit Branch Ċ import Ġcom . network ed assets . git 4 c . infrastructure . database . ao . Temporary Edit Branch Entity Ċ import Ġcom . network ed assets . git 4 c . utils . Active Objects Utils . findBy Uuid Ċ Ċ class ĠCon fluence Active Object Temporary Edit Branches ( val Ġao : ĠActive Objects ) Ġ: ĠTemporary Edit Branches Database Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġis Available ( uuid : ĠString ) Ġ= Ġget From Database ( uuid ) Ġ!= Ġnull ĊĊĠĠĠ Ġoverride Ġfun Ġget ( uuid : ĠString ) Ġ= Ġget From Database ( uuid )?. convert () ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll () Ġ= Ġao . find ( Temporary Edit Branch Entity :: class . java ). map Ġ{ Ġit . convert () Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġput ( uuid : ĠString , Ġdata : ĠTemporary Edit Branch ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġentity Ġ= Ġget From Database ( uuid ) Ġ?: Ġao . create ( Temporary Edit Branch Entity :: class . java ) ĊĊĠĠĠĠĠĠĠ Ġentity . uuid Ġ= Ġuuid ĊĠĠĠĠĠĠĠ Ġentity . name Ġ= Ġdata . name ĊĊĠĠĠĠĠĠĠ Ġentity . save () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġremove ( uuid : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġget From Database ( uuid )?. let Ġ{ Ġao . delete ( it ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġremove All () Ġ{ ĊĠĠĠĠĠĠĠ Ġao . find ( Temporary Edit Branch Entity :: class . java ). forEach Ġ{ Ġremove ( it . uuid ) Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget From Database ( uuid : ĠString ) Ġ= Ġao . findBy Uuid < Temporary Edit Branch Entity >( uuid ) ĊĊĠĠĠ Ġprivate Ġfun ĠTemporary Edit Branch Entity . convert () Ġ= ĠTemporary Edit Branch ( uuid , Ġname ) Ċ Ċ } Ċ