AbstractMapper.php
112 throw new PersistenceException("No relation to '".$roleName."' exists in '".$this->getType()."'");
325 public function loadObjects($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null,
351 public function loadRelation(array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null,
353 $relatedObjects = $this->loadRelationImpl($objects, $role, $buildDepth, $criteria, $orderby, $pagingInfo);
483 abstract protected function getOIDsImpl($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null);
488 abstract protected function loadObjectsImpl($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null,
494 abstract protected function loadRelationImpl(array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null,
OutputStrategy defines the interface for classes that write an object's content to a destination (cal...
Definition: OutputStrategy.php:22
$persistenceFacade
Definition: AbstractMapper.php:50
loadObjects($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Definition: AbstractMapper.php:325
getRelations($hierarchyType='all')
Get the relations for this type.
EventManager is responsible for dispatching events to registered listeners.
Definition: EventManager.php:21
getRelationsByType($type)
Definition: AbstractMapper.php:118
load(ObjectId $oid, $buildDepth=BuildDepth::SINGLE)
Definition: AbstractMapper.php:176
getOIDs($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Definition: AbstractMapper.php:304
deleteImpl(PersistentObject $object)
hasRelation($roleName)
Definition: AbstractMapper.php:100
getType()
Get the entity type that this mapper handles.
PersistenceException signals an exception in the persistence service.
Definition: PersistenceException.php:18
logAction(PersistentObject $obj)
Log the state of the given object.
Definition: AbstractMapper.php:381
setLogStrategy(OutputStrategy $logStrategy)
Set the OutputStrategy used for logging persistence actions.
Definition: AbstractMapper.php:79
getChangedValues()
Get the list of changed attributes since creation, loading.
getReferences()
Definition: AbstractMapper.php:147
getAttribute($name)
Definition: AbstractMapper.php:137
getRelation($roleName)
Definition: AbstractMapper.php:108
PersistenceMapper defines the interface for all mapper classes.
Definition: PersistenceMapper.php:26
create($type, $buildDepth=BuildDepth::SINGLE)
Definition: AbstractMapper.php:197
validateValues()
Validate all values by calling PersistentObject::validateValue() Throws a ValidationException in case...
authorizationFailedError($resource, $action)
Handle an authorization error.
Definition: AbstractMapper.php:403
saveImpl(PersistentObject $object)
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
BuildDepth values are used to define the depth when loading object trees.
Definition: BuildDepth.php:19
$permissionManager
Definition: AbstractMapper.php:51
beforeInsert()
This method is called once before inserting the newly created object into the store.
Instances of ReferenceDescription describe reference attributes of PersistentObjects.
Definition: ReferenceDescription.php:21
getAttributeDisplayName($name, Message $message)
Definition: AbstractMapper.php:155
PersistentEvent signals create/update/delete operations on a persistent entity.
Definition: PersistenceEvent.php:22
getProperties()
Definition: AbstractMapper.php:169
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
afterInsert()
This method is called once after inserting the newly created object into the store.
ConcurrencyManager is used to handle concurrency for objects.
Definition: ConcurrencyManager.php:32
beforeUpdate()
This method is called always before updating the modified object in the store.
getOIDsImpl($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
loadImpl(ObjectId $oid, $buildDepth=BuildDepth::SINGLE)
getTypeDescription(Message $message)
Definition: AbstractMapper.php:93
loadRelation(array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Definition: AbstractMapper.php:351
save(PersistentObject $object)
Definition: AbstractMapper.php:213
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
getTypeDisplayName(Message $message)
Definition: AbstractMapper.php:86
AbstractMapper provides a basic implementation for other mapper classes.
Definition: AbstractMapper.php:41
getAttributes(array $tags=[], $matchMode='all')
PersistentObject values may be tagged with application specific tags.
hasAttribute($name)
Definition: AbstractMapper.php:129
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
checkAuthorization($resource, $action)
Check authorization on a resource (type/instance/instance property) and a given action.
Definition: AbstractMapper.php:393
static isValid($oid)
Check if a serialized ObjectId has a valid syntax, the type is known and if the number of primary key...
Definition: ObjectId.php:123
__construct(PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ConcurrencyManager $concurrencyManager, EventManager $eventManager)
Constructor.
Definition: AbstractMapper.php:62
PermissionManager implementations are used to handle all authorization requests.
Definition: PermissionManager.php:20
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20
loadObjectsImpl($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
$concurrencyManager
Definition: AbstractMapper.php:52
PersistenceAction values are used to define actions on PersistentObject instances.
Definition: PersistenceAction.php:19
createImpl($type, $buildDepth=BuildDepth::SINGLE)
loadRelationImpl(array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24
ErrorHandler catches all php errors and transforms fatal errors into ErrorExceptions and non-fatal in...
Definition: ErrorHandler.php:19
getAttributeDescription($name, Message $message)
Definition: AbstractMapper.php:162
const STATE_DIRTY
Definition: PersistentObject.php:26
afterUpdate()
This method is called always after updating the modified object in the store.
AuthorizationException signals an exception in authorization.
Definition: AuthorizationException.php:18
Message is used to get localized messages to be used in the user interface.
Definition: Message.php:23
$eventManager
Definition: AbstractMapper.php:53