PHP 클래스 AppserverIo\Appserver\PersistenceContainer\Doctrine\DoctrineEntityManagerProxy

상속: implements AppserverIo\RemoteMethodInvocation\RemoteObjectInterface, implements Doctrine\ORM\EntityManagerInterface
파일 보기 프로젝트 열기: appserver-io/appserver 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$className string The class name to proxy.
$session AppserverIo\RemoteMethodInvocation\SessionInterface Holds the ContextSession for this proxy.

공개 메소드들

메소드 설명
__call ( string $method, array $params ) : mixed Invokes the remote execution of the passed remote method.
__construct ( mixed $className = 'AppserverIo\Appserver\Core\InitialContext' ) Initializes the proxy with the class name to proxy.
__create ( string $className ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface Factory method to create a new instance of the requested proxy implementation.
__getClassName ( ) : string The name of the original object.
__getSession ( ) : AppserverIo\RemoteMethodInvocation\SessionInterface Returns the session instance.
__invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $methodCall, AppserverIo\RemoteMethodInvocation\SessionInterface $session ) : mixed Invokes the remote execution of the passed remote method.
__setSession ( AppserverIo\RemoteMethodInvocation\SessionInterface $session ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface Sets the session with the connection instance.
beginTransaction ( ) : void Starts a transaction on the underlying database connection.
clear ( string | null $objectName = null ) : void Clears the ObjectManager. All objects that are currently managed by this ObjectManager become detached.
close ( ) : void Closes the EntityManager. All entities that are currently managed by this EntityManager become detached. The EntityManager may no longer be used after it is closed.
commit ( ) : void Commits a transaction on the underlying database connection.
contains ( object $object ) : boolean Checks if the object is part of the current UnitOfWork and therefore managed.
copy ( object $entity, boolean $deep = false ) : object Creates a copy of the given entity. Can create a shallow or a deep copy.
createNamedNativeQuery ( string $name ) : Doctrine\ORM\NativeQuery Creates a NativeQuery from a named native query.
createNamedQuery ( string $name ) : Doctrine\ORM\Query Creates a Query from a named query.
createNativeQuery ( string $sql, Doctrine\ORM\Query\ResultSetMapping $rsm ) : Doctrine\ORM\NativeQuery Creates a native SQL query.
createQuery ( string $dql = '' ) : Query Creates a new Query object.
createQueryBuilder ( ) : Doctrine\ORM\QueryBuilder Create a QueryBuilder instance
detach ( object $object ) : void Detaches an object from the ObjectManager, causing a managed object to become detached. Unflushed changes made to the object if any (including removal of the object), will not be synchronized to the database.
find ( string $entityName, mixed $id, integer | null $lockMode = null, integer | null $lockVersion = null ) : object | null Finds an Entity by its identifier.
flush ( null | object | array $entity = null ) : void Flushes all changes to objects that have been queued up to now to the database.
getCache ( ) : Doctrine\ORM\Cache | null Returns the cache API for managing the second level cache regions or NULL if the cache is not enabled.
getClassMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Returns the ClassMetadata descriptor for a class.
getConfiguration ( ) : Doctrine\ORM\Configuration Gets the Configuration used by the EntityManager.
getConnection ( ) : Doctrine\DBAL\Connection Gets the database connection object used by the EntityManager.
getEventManager ( ) : Doctrine\Common\EventManager Gets the EventManager used by the EntityManager.
getExpressionBuilder ( ) : Doctrine\ORM\Query\Expr Gets an ExpressionBuilder used for object-oriented construction of query expressions.
getFilters ( ) : Doctrine\ORM\Query\FilterCollection Gets the enabled filters.
getHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator Gets a hydrator for the given hydration mode.
getMetadataFactory ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadataFactory Gets the metadata factory used to gather the metadata of classes.
getPartialReference ( string $entityName, mixed $identifier ) : object Gets a partial reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
getProxyFactory ( ) : Doctrine\ORM\Proxy\ProxyFactory Gets the proxy factory used by the EntityManager to create entity proxies.
getReference ( string $entityName, mixed $id ) : object Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
getRepository ( string $className ) : Doctrine\Common\Persistence\ObjectRepository Gets the repository for a class.
getUnitOfWork ( ) : UnitOfWork Gets the UnitOfWork used by the EntityManager to coordinate operations.
hasFilters ( ) : boolean Checks whether the Entity Manager has filters.
initializeObject ( object $obj ) : void Helper method to initialize a lazy loading proxy or persistent collection.
isFiltersStateClean ( ) : boolean Checks whether the state of the filter collection is clean.
isOpen ( ) : boolean Check if the Entity manager is open or closed.
lock ( object $entity, integer $lockMode, integer | null $lockVersion = null ) : void Acquire a lock on the given entity.
merge ( object $object ) : object Merges the state of a detached object into the persistence context of this ObjectManager and returns the managed copy of the object.
newHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator Create a new instance for the given hydration mode.
persist ( object $object ) : void Tells the ObjectManager to make an instance managed and persistent.
refresh ( object $object ) : void Refreshes the persistent state of an object from the database, overriding any local changes that have not yet been persisted.
remove ( object $object ) : void Removes an object instance.
rollback ( ) : void Performs a rollback on the underlying database connection.
transactional ( callable $func ) : mixed Executes a function in a transaction.

메소드 상세

__call() 공개 메소드

Invokes the remote execution of the passed remote method.
public __call ( string $method, array $params ) : mixed
$method string The remote method to call
$params array The parameters for the method call
리턴 mixed The result of the remote method call

__construct() 공개 메소드

Initializes the proxy with the class name to proxy.
public __construct ( mixed $className = 'AppserverIo\Appserver\Core\InitialContext' )
$className mixed The name of the class to create the proxy for

__create() 공개 정적인 메소드

Factory method to create a new instance of the requested proxy implementation.
public static __create ( string $className ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface
$className string The name of the class to create the proxy for
리턴 AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The proxy instance

__getClassName() 공개 메소드

The name of the original object.
또한 보기: AppserverIo\RemoteMethodInvocation\RemoteObjectInterface::__getClassName()
public __getClassName ( ) : string
리턴 string The name of the original object

__getSession() 공개 메소드

Returns the session instance.
또한 보기: AppserverIo\RemoteMethodInvocation\RemoteObjectInterface::__getSession()
public __getSession ( ) : AppserverIo\RemoteMethodInvocation\SessionInterface
리턴 AppserverIo\RemoteMethodInvocation\SessionInterface The session instance

__invoke() 공개 메소드

Invokes the remote execution of the passed remote method.
public __invoke ( AppserverIo\RemoteMethodInvocation\RemoteMethodInterface $methodCall, AppserverIo\RemoteMethodInvocation\SessionInterface $session ) : mixed
$methodCall AppserverIo\RemoteMethodInvocation\RemoteMethodInterface The remote method call instance
$session AppserverIo\RemoteMethodInvocation\SessionInterface The session with the connection instance to use
리턴 mixed The result of the remote method call

__setSession() 공개 메소드

Sets the session with the connection instance.
public __setSession ( AppserverIo\RemoteMethodInvocation\SessionInterface $session ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface
$session AppserverIo\RemoteMethodInvocation\SessionInterface The session instance to use
리턴 AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The instance itself

beginTransaction() 공개 메소드

Starts a transaction on the underlying database connection.
public beginTransaction ( ) : void
리턴 void

clear() 공개 메소드

Clears the ObjectManager. All objects that are currently managed by this ObjectManager become detached.
public clear ( string | null $objectName = null ) : void
$objectName string | null if given, only objects of this type will get detached.
리턴 void

close() 공개 메소드

Closes the EntityManager. All entities that are currently managed by this EntityManager become detached. The EntityManager may no longer be used after it is closed.
public close ( ) : void
리턴 void

commit() 공개 메소드

Commits a transaction on the underlying database connection.
public commit ( ) : void
리턴 void

contains() 공개 메소드

Checks if the object is part of the current UnitOfWork and therefore managed.
public contains ( object $object ) : boolean
$object object The object to check
리턴 boolean

copy() 공개 메소드

Creates a copy of the given entity. Can create a shallow or a deep copy.
public copy ( object $entity, boolean $deep = false ) : object
$entity object The entity to copy.
$deep boolean FALSE for a shallow copy, TRUE for a deep copy.
리턴 object The new entity.

createNamedNativeQuery() 공개 메소드

Creates a NativeQuery from a named native query.
public createNamedNativeQuery ( string $name ) : Doctrine\ORM\NativeQuery
$name string The query name
리턴 Doctrine\ORM\NativeQuery The query instance

createNamedQuery() 공개 메소드

Creates a Query from a named query.
public createNamedQuery ( string $name ) : Doctrine\ORM\Query
$name string The query name
리턴 Doctrine\ORM\Query

createNativeQuery() 공개 메소드

Creates a native SQL query.
public createNativeQuery ( string $sql, Doctrine\ORM\Query\ResultSetMapping $rsm ) : Doctrine\ORM\NativeQuery
$sql string The SQL command
$rsm Doctrine\ORM\Query\ResultSetMapping The ResultSetMapping to use
리턴 Doctrine\ORM\NativeQuery The query instance

createQuery() 공개 메소드

Creates a new Query object.
public createQuery ( string $dql = '' ) : Query
$dql string The DQL string.
리턴 Query

createQueryBuilder() 공개 메소드

Create a QueryBuilder instance
public createQueryBuilder ( ) : Doctrine\ORM\QueryBuilder
리턴 Doctrine\ORM\QueryBuilder The query builder instance

detach() 공개 메소드

Objects which previously referenced the detached object will continue to reference it.
public detach ( object $object ) : void
$object object The object to detach.
리턴 void

find() 공개 메소드

Finds an Entity by its identifier.
public find ( string $entityName, mixed $id, integer | null $lockMode = null, integer | null $lockVersion = null ) : object | null
$entityName string The class name of the entity to find.
$id mixed The identity of the entity to find.
$lockMode integer | null One of the \Doctrine\DBAL\LockMode::* constants or NULL if no specific lock mode should be used during the search.
$lockVersion integer | null The version of the entity to find when using optimistic locking.
리턴 object | null The entity instance or NULL if the entity can not be found.

flush() 공개 메소드

This effectively synchronizes the in-memory state of managed objects with the database. If an entity is explicitly passed to this method only this entity and the cascade-persist semantics + scheduled inserts/removals are synchronized.
public flush ( null | object | array $entity = null ) : void
$entity null | object | array The entity to be synchronized
리턴 void

getCache() 공개 메소드

Returns the cache API for managing the second level cache regions or NULL if the cache is not enabled.
public getCache ( ) : Doctrine\ORM\Cache | null
리턴 Doctrine\ORM\Cache | null

getClassMetadata() 공개 메소드

The class name must be the fully-qualified class name without a leading backslash (as it is returned by get_class($obj)).
public getClassMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$className string The class name to return the metadata for
리턴 Doctrine\Common\Persistence\Mapping\ClassMetadata

getConfiguration() 공개 메소드

Gets the Configuration used by the EntityManager.
public getConfiguration ( ) : Doctrine\ORM\Configuration
리턴 Doctrine\ORM\Configuration The configuration

getConnection() 공개 메소드

Gets the database connection object used by the EntityManager.
public getConnection ( ) : Doctrine\DBAL\Connection
리턴 Doctrine\DBAL\Connection

getEventManager() 공개 메소드

Gets the EventManager used by the EntityManager.
public getEventManager ( ) : Doctrine\Common\EventManager
리턴 Doctrine\Common\EventManager The event manager

getExpressionBuilder() 공개 메소드

Example: $qb = $em->createQueryBuilder(); $expr = $em->getExpressionBuilder(); $qb->select('u')->from('User', 'u') ->where($expr->orX($expr->eq('u.id', 1), $expr->eq('u.id', 2)));
public getExpressionBuilder ( ) : Doctrine\ORM\Query\Expr
리턴 Doctrine\ORM\Query\Expr

getFilters() 공개 메소드

Gets the enabled filters.
public getFilters ( ) : Doctrine\ORM\Query\FilterCollection
리턴 Doctrine\ORM\Query\FilterCollection The active filter collection

getHydrator() 공개 메소드

This method caches the hydrator instances which is used for all queries that don't selectively iterate over the result.
사용 중단:
public getHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator
$hydrationMode integer The hydration mode to use
리턴 Doctrine\ORM\Internal\Hydration\AbstractHydrator

getMetadataFactory() 공개 메소드

Gets the metadata factory used to gather the metadata of classes.
public getMetadataFactory ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
리턴 Doctrine\Common\Persistence\Mapping\ClassMetadataFactory

getPartialReference() 공개 메소드

The returned reference may be a partial object if the entity is not yet loaded/managed. If it is a partial object it will not initialize the rest of the entity state on access. Thus you can only ever safely access the identifier of an entity obtained through this method. The use-cases for partial references involve maintaining bidirectional associations without loading one side of the association or to update an entity without loading it. Note, however, that in the latter case the original (persistent) entity data will never be visible to the application (especially not event listeners) as it will never be loaded in the first place.
public getPartialReference ( string $entityName, mixed $identifier ) : object
$entityName string The name of the entity type.
$identifier mixed The entity identifier.
리턴 object The (partial) entity reference.

getProxyFactory() 공개 메소드

Gets the proxy factory used by the EntityManager to create entity proxies.
public getProxyFactory ( ) : Doctrine\ORM\Proxy\ProxyFactory
리턴 Doctrine\ORM\Proxy\ProxyFactory The proxy factory

getReference() 공개 메소드

Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
public getReference ( string $entityName, mixed $id ) : object
$entityName string The name of the entity type.
$id mixed The entity identifier.
리턴 object The entity reference.

getRepository() 공개 메소드

Gets the repository for a class.
public getRepository ( string $className ) : Doctrine\Common\Persistence\ObjectRepository
$className string The class name to return the repository for
리턴 Doctrine\Common\Persistence\ObjectRepository

getUnitOfWork() 공개 메소드

Gets the UnitOfWork used by the EntityManager to coordinate operations.
public getUnitOfWork ( ) : UnitOfWork
리턴 Doctrine\ORM\UnitOfWork The unit of work

hasFilters() 공개 메소드

Checks whether the Entity Manager has filters.
public hasFilters ( ) : boolean
리턴 boolean TRUE, if the EM has a filter collection

initializeObject() 공개 메소드

This method is a no-op for other objects.
public initializeObject ( object $obj ) : void
$obj object The object to be initialized
리턴 void

isFiltersStateClean() 공개 메소드

Checks whether the state of the filter collection is clean.
public isFiltersStateClean ( ) : boolean
리턴 boolean TRUE, if the filter collection is clean

isOpen() 공개 메소드

Check if the Entity manager is open or closed.
public isOpen ( ) : boolean
리턴 boolean TRUE if the EM is open

lock() 공개 메소드

Acquire a lock on the given entity.
public lock ( object $entity, integer $lockMode, integer | null $lockVersion = null ) : void
$entity object The entity to be locked
$lockMode integer The lock mode
$lockVersion integer | null The lock version
리턴 void

merge() 공개 메소드

The object passed to merge will not become associated/managed with this ObjectManager.
public merge ( object $object ) : object
$object object The object to be merged
리턴 object The merge instance

newHydrator() 공개 메소드

Create a new instance for the given hydration mode.
public newHydrator ( integer $hydrationMode ) : Doctrine\ORM\Internal\Hydration\AbstractHydrator
$hydrationMode integer The hydration mode to use
리턴 Doctrine\ORM\Internal\Hydration\AbstractHydrator

persist() 공개 메소드

The object will be entered into the database as a result of the flush operation. NOTE: The persist operation always considers objects that are not yet known to this ObjectManager as NEW. Do not pass detached objects to the persist operation.
public persist ( object $object ) : void
$object object The instance to make managed and persistent.
리턴 void

refresh() 공개 메소드

Refreshes the persistent state of an object from the database, overriding any local changes that have not yet been persisted.
public refresh ( object $object ) : void
$object object The object to refresh.
리턴 void

remove() 공개 메소드

A removed object will be removed from the database as a result of the flush operation.
public remove ( object $object ) : void
$object object The object instance to remove.
리턴 void

rollback() 공개 메소드

Performs a rollback on the underlying database connection.
public rollback ( ) : void
리턴 void

transactional() 공개 메소드

The function gets passed this EntityManager instance as an (optional) parameter. {@link flush} is invoked prior to transaction commit. If an exception occurs during execution of the function or flushing or transaction commit, the transaction is rolled back, the EntityManager closed and the exception re-thrown.
public transactional ( callable $func ) : mixed
$func callable The function to execute transactionally.
리턴 mixed The non-empty value returned from the closure or true instead.

프로퍼티 상세

$className 보호되어 있는 프로퍼티

The class name to proxy.
protected string $className
리턴 string

$session 보호되어 있는 프로퍼티

Holds the ContextSession for this proxy.
protected SessionInterface,AppserverIo\RemoteMethodInvocation $session
리턴 AppserverIo\RemoteMethodInvocation\SessionInterface