Class PermazenCliConfig


public class PermazenCliConfig extends CoreApiCliConfig
Configuration for a CLI application supporting a Permazen database.
  • Field Details

    • classPathOption

      protected joptsimple.OptionSpec<File> classPathOption
    • modelClassOption

      protected joptsimple.OptionSpec<String> modelClassOption
    • modelPackageOption

      protected joptsimple.OptionSpec<String> modelPackageOption
    • pdb

      protected Permazen pdb
    • modelClasses

      protected final HashSet<Class<?>> modelClasses
  • Constructor Details

    • PermazenCliConfig

      public PermazenCliConfig()
  • Method Details

    • addOptions

      public void addOptions(joptsimple.OptionParser parser)
      Description copied from class: CoreApiCliConfig
      Configure an OptionParser with the comand line flags supported by this instance.
      Overrides:
      addOptions in class CoreApiCliConfig
      Parameters:
      parser - command line flag parser
    • addPermazenOptions

      protected void addPermazenOptions(joptsimple.OptionParser parser)
      Add Permazen layer command line flags to the given option parser.
      Parameters:
      parser - command line flag parser
      Throws:
      IllegalArgumentException - if parser is null
      IllegalStateException - if an option being added has already been added
    • processOptions

      protected void processOptions(joptsimple.OptionSet options)
      Description copied from class: CliConfig
      Review parsed options and do any preprocessing before starting database.
      Overrides:
      processOptions in class CoreApiCliConfig
      Parameters:
      options - parsed command line options
    • getDefaultSessionMode

      protected SessionMode getDefaultSessionMode()
      Description copied from class: CoreApiCliConfig
      Get the default SessionMode.
      Overrides:
      getDefaultSessionMode in class CoreApiCliConfig
    • startupDatabase

      public void startupDatabase(joptsimple.OptionSet options)
      Description copied from class: CliConfig
      Configure and start up the database based on the parsed command line options.
      Overrides:
      startupDatabase in class CoreApiCliConfig
      Parameters:
      options - parsed command line options
    • shutdownDatabase

      public void shutdownDatabase()
      Description copied from class: CliConfig
      Shutdown the database.
      Overrides:
      shutdownDatabase in class CoreApiCliConfig
    • getPermazen

      public Permazen getPermazen()
      Overrides:
      getPermazen in class CliConfig
    • configureSession

      protected void configureSession(Session session)
      Description copied from class: CliConfig
      Configure a new Session.
      Overrides:
      configureSession in class CoreApiCliConfig
      Parameters:
      session - new session to configure