Method | Description | |
---|---|---|
Commit ( array $EntitiesToPersist, array $ProceduresToExecute, array $EntitiesToDiscard, array $CriteriaToDiscard ) : void | Commits the supplied operations to the underlying database within a transactional scope. | |
Factory ( ) | This class can be very expensive to instantiate, so this provides a factory closure if required. | |
GetDatabase ( ) : |
||
GetDomain ( ) : |
||
GetEntityRelationalMap ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | null | Gets the registered relational map for the given entity type. | |
GetEntityRelationalMapByPrimaryKeyTable ( string $TableName ) : IEntityRelationalMap:null | Gets the registered relational map for the given primary key table name. | |
HasEntityRelationalMap ( string $EntityType ) : boolean | Returns if this contains an relational map for the given type of entity. | |
Load ( Storm\Core\Object\IRequest $ObjectRequest ) : array | object | null | Loads all entities that are specified from the given request instance. | |
MapDiscardedRelationships ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectDiscardedRelationships ) : |
||
MapEntityToRelationalRequest ( string $EntityType, |
||
MapPersistedRelationships ( |
||
MapProcedure ( Storm\Core\Object\IProcedure $ObjectProcedure ) : |
||
MapRelationshipChanges ( |
||
MapRequest ( Storm\Core\Object\IRequest $ObjectRequest ) : |
||
MapResultRowDataToRevivalData ( $EntityType, |
||
MapResultRowsToRevivalData ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ResultRowArray, array $RevivalDataArray ) | ||
MapRowsToRevivalData ( string $EntityType, array $ResultRows ) : |
||
__construct ( ) |
Method | Description | |
---|---|---|
Database ( ) : |
The method to specify the database instance. | |
Domain ( ) : |
The method to specify the domain instance. | |
MapExpression ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, |
||
RegisterEntityRelationalMaps ( |
This is where you register your EntityRelationalMap classes. | |
VerifyEntityTypeIsMapped ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | Verifies that an entity type is mapped and returns the relational map if is found. |
Method | Description | |
---|---|---|
AddEntityRelationMap ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap ) | Adds an entity relational map instance to this domain database map. | |
MapCriterion ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, Storm\Core\Object\ICriterion $ObjectCriterion, |
||
MapEntityDataToTransaction ( |
||
MapExpressions ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $Expressions ) : |
||
MapObjectCriterion ( Storm\Core\Object\ICriterion $ObjectCriterion ) : |
||
MapPersistenceDataToTransaction ( |
||
MapPropetiesToRelationalRequest ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, |
||
MapUnitOfWorkToTransaction ( |
final public Commit ( array $EntitiesToPersist, array $ProceduresToExecute, array $EntitiesToDiscard, array $CriteriaToDiscard ) : void | ||
$EntitiesToPersist | array | The entities to persist |
$ProceduresToExecute | array | The procedures to execute |
$EntitiesToDiscard | array | The entities to discard |
$CriteriaToDiscard | array | The criteria of entities to discard |
return | void |
abstract protected Database ( ) : |
||
return |
abstract protected Domain ( ) : |
||
return |
final public static Factory ( ) |
final public GetDatabase ( ) : |
||
return | The Database instance |
final public GetDomain ( ) : |
||
return | The Domain instance |
final public GetEntityRelationalMap ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | null | ||
$EntityType | string | The type of the entity (sub classes will resolve) |
return | Storm\Core\Mapping\IEntityRelationalMap | null | The relational map or null if not found |
final public GetEntityRelationalMapByPrimaryKeyTable ( string $TableName ) : IEntityRelationalMap:null | ||
$TableName | string | The name of primary key table. |
return | IEntityRelationalMap:null |
final public HasEntityRelationalMap ( string $EntityType ) : boolean | ||
$EntityType | string | The type of the entity |
return | boolean |
final public Load ( Storm\Core\Object\IRequest $ObjectRequest ) : array | object | null | ||
$ObjectRequest | Storm\Core\Object\IRequest | The request to load |
return | array | object | null | Depending on the supplied request, either all the entities are returned as an array or the first is returned or null if none are found. |
final public MapDiscardedRelationships ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ObjectDiscardedRelationships ) : |
||
$EntityRelationalMap | Storm\Core\Mapping\IEntityRelationalMap | |
$ObjectDiscardedRelationships | array | |
return |
abstract protected MapExpression ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, |
||
$EntityRelationalMap | Storm\Core\Mapping\IEntityRelationalMap | |
$Expression | ||
return | The equivalent expressions |
final public MapPersistedRelationships ( |
||
$UnitOfWork | ||
$Transaction | ||
$EntityRelationalMap | Storm\Core\Mapping\IEntityRelationalMap | |
$ObjectPersistedRelationships | array | |
return |
final public MapProcedure ( Storm\Core\Object\IProcedure $ObjectProcedure ) : |
||
$ObjectProcedure | Storm\Core\Object\IProcedure | The object procedure |
return | The equivalent relational procedure |
final public MapRelationshipChanges ( |
||
$UnitOfWork | ||
$Transaction | ||
$EntityRelationalMap | Storm\Core\Mapping\IEntityRelationalMap | |
$ObjectRelationshipChanges | array | |
return |
final public MapRequest ( Storm\Core\Object\IRequest $ObjectRequest ) : |
||
$ObjectRequest | Storm\Core\Object\IRequest | The object request |
return | The equivalent relational request |
final public MapResultRowDataToRevivalData ( $EntityType, |
||
$ResultRow |
final public MapResultRowsToRevivalData ( Storm\Core\Mapping\IEntityRelationalMap $EntityRelationalMap, array $ResultRowArray, array $RevivalDataArray ) | ||
$EntityRelationalMap | Storm\Core\Mapping\IEntityRelationalMap | The entity relational map |
$ResultRowArray | array | |
$RevivalDataArray | array |
final public MapRowsToRevivalData ( string $EntityType, array $ResultRows ) : |
||
$EntityType | string | The type of entity to revive as |
$ResultRows | array | The result row to ma |
return | The mapped revival data |
abstract protected RegisterEntityRelationalMaps ( |
||
$Registrar |
final protected VerifyEntityTypeIsMapped ( string $EntityType ) : Storm\Core\Mapping\IEntityRelationalMap | ||
$EntityType | string | The entity type |
return | Storm\Core\Mapping\IEntityRelationalMap | The registered entity relational map |