public class EntitiesRuntime extends Object
IPluginEntities
. This class is responsible for performing any
initialization processes specific to entities plugins, and also for cleaning up when the plugin is deactivated or
uninstalled. Specifically, tasks this class performs include scanning the plugin for entity classes, initializing the
connection to the database, applying any unrun liquibase changesets and creating the entity manager factory.Constructor and Description |
---|
EntitiesRuntime(PluginRuntime pluginRuntime,
IPluginEntities plugin)
Creates a new entities runtime with the given plugin.
|
Modifier and Type | Method and Description |
---|---|
Set<Class<?>> |
getJpaEntities() |
String |
getPersistenceUnitName() |
IPluginEntities |
getPlugin() |
PluginRuntime |
getPluginRuntime() |
void |
initialize()
Initializes this entities runtime.
|
void |
shutdown()
Called when the plugin is deactivated or uninstalled.
|
public EntitiesRuntime(PluginRuntime pluginRuntime, IPluginEntities plugin)
pluginRuntime
- The runtime of the plugin.plugin
- The actual entities plugin.public Set<Class<?>> getJpaEntities()
public String getPersistenceUnitName()
public IPluginEntities getPlugin()
public PluginRuntime getPluginRuntime()
public void initialize() throws FCPluginException
FCPluginException
- When the above steps could not be performed, such as due to a database connection error
or a wrong plugin configuration.public void shutdown()
Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.