Class DbOffline

java.lang.Object
io.ebeaninternal.api.DbOffline

public final class DbOffline extends Object
Helper to indicate that an EbeanServer should come up offline typically for DDL generation purposes.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Bring up the next EbeanServer instance using the H2 platform.
    static String
    Return the platform to use when creating the next EbeanServer instance.
    static boolean
    Return true if the migration is running.
    static boolean
    Return true if the offline platform has been set.
    static void
    Reset the offline platform and runningMigration flag.
    static void
    Called when the migration is running is order to stop other plugins like the full DDL generation from executing.
    static void
    setPlatform(io.ebean.annotation.Platform dbPlatform)
    Set the platform to use when creating the next EbeanServer instance.
    static void
    setPlatform(String platformName)
    Set the platform to use when creating the next EbeanServer instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DbOffline

      public DbOffline()
  • Method Details

    • setPlatform

      public static void setPlatform(io.ebean.annotation.Platform dbPlatform)
      Set the platform to use when creating the next EbeanServer instance.
    • setPlatform

      public static void setPlatform(String platformName)
      Set the platform to use when creating the next EbeanServer instance.
    • getPlatform

      public static String getPlatform()
      Return the platform to use when creating the next EbeanServer instance.
    • asH2

      public static void asH2()
      Bring up the next EbeanServer instance using the H2 platform.
    • isSet

      public static boolean isSet()
      Return true if the offline platform has been set.
    • isGenerateMigration

      public static boolean isGenerateMigration()
      Return true if the migration is running. This typically means don't run the plugins like full DDL generation.
    • setGenerateMigration

      public static void setGenerateMigration()
      Called when the migration is running is order to stop other plugins like the full DDL generation from executing.
    • reset

      public static void reset()
      Reset the offline platform and runningMigration flag.