SHARE
TWEET

Untitled

a guest Sep 18th, 2019 96 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   def get(): TemplateDefaults = {
  2.     find() match {
  3.       case Some(result) => result
  4.       case None =>
  5.         create()
  6.         get()
  7.     }
  8.   }
  9.   private def create(): TemplateDefaults = {
  10.     find() match {
  11.       case Some(_) => throw new IllegalStateException("Default already exists in system")
  12.       case None => underRepo.create(TemplateDefaults(None, None, None, None, None, None, None))
  13.     }
  14.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top