PHP Class AppserverIo\Appserver\PersistenceContainer\PersistenceManager

Inheritance: extends AppserverIo\Appserver\Core\AbstractManager, implements AppserverIo\Psr\EnterpriseBeans\PersistenceContextInterface, implements AppserverIo\Appserver\Application\Interfaces\ManagerSettingsAwareInterface
Show file Open project: appserver-io/appserver Class Usage Examples

Public Methods

Method Description
getEntityManagers ( ) : AppserverIo\Storage\GenericStackable Returns the storage with the registered entity manager configurations.
getIdentifier ( ) : string Returns the identifier for the entity manager instance.
getManagerSettings ( ) : AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface Return's the bean manager settings.
initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Has been automatically invoked by the container after the application instance has been created.
injectEntityManagers ( AppserverIo\Storage\GenericStackable $entityManagers ) : void Injects the storage for the entity manager configurations.
injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void Injects the bean manager settings.
invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $remoteMethod, AppserverIo\Collections\CollectionInterface $sessions ) : mixed Invoke the passed remote method on the described session bean and return the result.
lookup ( string $lookupName ) : object Runs a lookup for the entity manager with the passed class name.
lookupProxy ( string $lookupName, string $sessionId = null ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface This returns a proxy to the requested session bean.
registerEntityManager ( AppserverIo\Psr\Application\ApplicationInterface $application, AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnitNode ) : void Deploys the entity manager described by the passed XML node.
registerEntityManagers ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void Registers the entity managers at startup.

Method Details

getEntityManagers() public method

Returns the storage with the registered entity manager configurations.
public getEntityManagers ( ) : AppserverIo\Storage\GenericStackable
return AppserverIo\Storage\GenericStackable The storage with the entity manager configurations

getIdentifier() public method

Returns the identifier for the entity manager instance.
See also: AppserverIo\Psr\Application\ManagerInterface::getIdentifier()
public getIdentifier ( ) : string
return string

getManagerSettings() public method

Return's the bean manager settings.
public getManagerSettings ( ) : AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface
return AppserverIo\Appserver\PersistenceContainer\PersistenceContainerSettingsInterface The bean manager settings

initialize() public method

Has been automatically invoked by the container after the application instance has been created.
See also: AppserverIo\Psr\Application\ManagerInterface::initialize()
public initialize ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return void

injectEntityManagers() public method

Injects the storage for the entity manager configurations.
public injectEntityManagers ( AppserverIo\Storage\GenericStackable $entityManagers ) : void
$entityManagers AppserverIo\Storage\GenericStackable The storage for the entity manager configurations
return void

injectManagerSettings() public method

Injects the bean manager settings.
public injectManagerSettings ( AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface $managerSettings ) : void
$managerSettings AppserverIo\Appserver\Application\Interfaces\ManagerSettingsInterface The bean manager settings
return void

invoke() public method

Invoke the passed remote method on the described session bean and return the result.
public invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $remoteMethod, AppserverIo\Collections\CollectionInterface $sessions ) : mixed
$remoteMethod AppserverIo\RemoteMethodInvocation\RemoteMethodInterface The remote method description
$sessions AppserverIo\Collections\CollectionInterface The collection with the sessions
return mixed The result of the remote method invocation

lookup() public method

If the passed lookup name is an entity manager the instance will be returned.
public lookup ( string $lookupName ) : object
$lookupName string The name of the requested entity manager
return object The requested entity manager instance

lookupProxy() public method

This returns a proxy to the requested session bean.
public lookupProxy ( string $lookupName, string $sessionId = null ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface
$lookupName string The lookup name for the requested session bean
$sessionId string The session-ID if available
return AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The proxy instance

registerEntityManager() public method

Deploys the entity manager described by the passed XML node.
public registerEntityManager ( AppserverIo\Psr\Application\ApplicationInterface $application, AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface $persistenceUnitNode ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
$persistenceUnitNode AppserverIo\Appserver\Core\Api\Node\PersistenceUnitNodeInterface The XML node that describes the entity manager
return void

registerEntityManagers() public method

Registers the entity managers at startup.
public registerEntityManagers ( AppserverIo\Psr\Application\ApplicationInterface $application ) : void
$application AppserverIo\Psr\Application\ApplicationInterface The application instance
return void