Пример #1
0
 /**
  * Returns the main application object as determined by the {@value
  * com.psddev.dari.db.Application#MAIN_CLASS_SETTING} {@linkplain Settings#get setting} within
  * the {@linkplain Database.Static#getDefault default database}.
  *
  * @return May be {@code null} if the setting is not set.
  * @throws SettingsException If the class name in the setting is not valid.
  */
 public static Application getMain() {
   return getMainUsing(Database.Static.getDefault());
 }
Пример #2
0
 /**
  * Returns the singleton application object matching the given {@code applicationClass} within
  * the {@linkplain Database.Static#getDefault default database}.
  */
 public static <T extends Application> T getInstance(Class<T> applicationClass) {
   return getInstanceUsing(applicationClass, Database.Static.getDefault());
 }