Detailed Description
NodeUnifiedRDBMapper maps Node objects to a relational database schema where each Node type has its own table.
The wCMFGenerator uses this class as base class for all mappers.
Definition at line 42 of file NodeUnifiedRDBMapper.php.
Public Member Functions | |
getSelectSQL ($criteria=null, $alias=null, $attributes=null, $orderby=null, PagingInfo $pagingInfo=null, $queryId=null) | |
isForeignKey ($name) | |
Public Member Functions inherited from AbstractRDBMapper | |
__construct (PersistenceFacade $persistenceFacade, PermissionManager $permissionManager, ConcurrencyManager $concurrencyManager, EventManager $eventManager) | |
__destruct () | |
__sleep () | |
setConnectionParams ($params) | |
getConnectionParams () | |
getConnection () | |
getAdapter () | |
getQuoteIdentifierSymbol () | |
quoteIdentifier ($identifier) | |
quoteValue ($value) | |
getRealTableName () | |
executeSql ($sql, $parameters=[]) | |
select (SelectStatement $selectStmt, PagingInfo $pagingInfo=null) | |
executeOperation (PersistenceOperation $operation) | |
getRelations ($hierarchyType='all') | |
getAttributes (array $tags=[], $matchMode='all') | |
isSortable ($roleName=null) | |
getSortkey ($roleName=null) | |
getDefaultOrder ($roleName=null) | |
constructOID ($data) | |
renderCriteria (Criteria $criteria, $placeholder=null, $tableName=null, $columnName=null) | |
loadObjectsFromSQL (SelectStatement $selectStmt, $buildDepth=BuildDepth::SINGLE, PagingInfo $pagingInfo=null, &$originalData=null) | |
handleDbEvent ($e) | |
beginTransaction () | |
commitTransaction () | |
rollbackTransaction () | |
getStatements () | |
Public Member Functions inherited from AbstractMapper | |
setLogStrategy (OutputStrategy $logStrategy) | |
getTypeDisplayName (Message $message) | |
getTypeDescription (Message $message) | |
hasRelation ($roleName) | |
getRelation ($roleName) | |
getRelationsByType ($type) | |
hasAttribute ($name) | |
getAttribute ($name) | |
getReferences () | |
getAttributeDisplayName ($name, Message $message) | |
getAttributeDescription ($name, Message $message) | |
getProperties () | |
load (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
create ($type, $buildDepth=BuildDepth::SINGLE) | |
save (PersistentObject $object) | |
delete (PersistentObject $object) | |
getOIDs ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadObjects ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadRelation (array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
Public Member Functions inherited from PersistenceMapper | |
getType () | |
getPkNames () | |
Public Attributes | |
const | CACHE_KEY = 'mapper' |
Public Attributes inherited from AbstractRDBMapper | |
const | SEQUENCE_CLASS = 'DBSequence' |
const | INTERNAL_VALUE_PREFIX = '_mapper_internal_' |
Protected Member Functions | |
prepareForStorage (PersistentObject $object) | |
getRelationSelectSQL (array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
getManyToOneRelationSelectSQL (RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
getOneToManyRelationSelectSQL (RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
getRelationStatement ($thisAttr, $parameters, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
getManyToManyRelationSelectSQL (RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
getInsertSQL (PersistentObject $object) | |
getUpdateSQL (PersistentObject $object) | |
getDeleteSQL (ObjectId $oid) | |
addColumns (SelectStatement $selectStmt, $tableName, $attributes=null) | |
addReferences (SelectStatement $selectStmt, $tableName) | |
addCriteria (SelectStatement $selectStmt, $criteria, $tableName) | |
addOrderBy (SelectStatement $selectStmt, $orderby, $orderType, $aliasName, $defaultOrder) | |
getParameters ($criteria, $tableName) | |
getPersistentValues (PersistentObject $object) | |
convertValuesForStorage ($values) | |
getSortableObject (PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RelationDescription $relationDesc) | |
loadRelationObjects (PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RDBManyToManyRelationDescription $relationDesc, $includeTransaction=false) | |
createPKCondition (ObjectId $oid) | |
getForeignKeyRelations () | |
getCacheKey ($alias, $attributeArray, $criteriaArray, $orderArray, PagingInfo $pagingInfo=null) | |
Protected Member Functions inherited from AbstractRDBMapper | |
getSequenceMapper () | |
getNextId () | |
getRelationIncludingNM ($roleName) | |
isPkValue ($name) | |
loadImpl (ObjectId $oid, $buildDepth=BuildDepth::SINGLE) | |
createImpl ($type, $buildDepth=BuildDepth::SINGLE) | |
saveImpl (PersistentObject $object) | |
deleteImpl (PersistentObject $object) | |
getOIDsImpl ($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadObjectsImpl ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
loadObjectsFromQueryParts ($type, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
createObjectFromData (array $data) | |
convertValueFromStorage ($valueName, $value) | |
addRelatedObjects (array $objects, $buildDepth=BuildDepth::SINGLE) | |
loadRelationImpl (array $objects, $role, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null) | |
setIsInTransaction ($isInTransaction) | |
isInTransaction () | |
getOwnDefaultOrder ($roleName=null) | |
getRelationDescriptions () | |
getAttributeDescriptions () | |
createObject (ObjectId $oid=null) | |
getTableName () | |
Protected Member Functions inherited from AbstractMapper | |
logAction (PersistentObject $obj) | |
checkAuthorization ($resource, $action) | |
authorizationFailedError ($resource, $action) | |
Additional Inherited Members | |
Static Protected Member Functions inherited from AbstractRDBMapper | |
static | getMapper ($type, $strict=true) |
Protected Attributes inherited from AbstractMapper | |
$persistenceFacade = null | |
$permissionManager = null | |
$concurrencyManager = null | |
$eventManager = null | |
Member Function Documentation
◆ prepareForStorage()
|
protected |
- See also
- RDBMapper::prepareForStorage()
Reimplemented from AbstractRDBMapper.
Definition at line 51 of file NodeUnifiedRDBMapper.php.
◆ getSelectSQL()
getSelectSQL | ( | $criteria = null , |
|
$alias = null , |
|||
$attributes = null , |
|||
$orderby = null , |
|||
PagingInfo | $pagingInfo = null , |
||
$queryId = null |
|||
) |
- See also
- RDBMapper::getSelectSQL()
Reimplemented from AbstractRDBMapper.
Definition at line 233 of file NodeUnifiedRDBMapper.php.
◆ getRelationSelectSQL()
|
protected |
- See also
- RDBMapper::getRelationSelectSQL()
Reimplemented from AbstractRDBMapper.
Definition at line 284 of file NodeUnifiedRDBMapper.php.
◆ getManyToOneRelationSelectSQL()
|
protected |
Get the statement for selecting a many-to-one relation.
- See also
- RDBMapper::getRelationSelectSQL()
Definition at line 306 of file NodeUnifiedRDBMapper.php.
◆ getOneToManyRelationSelectSQL()
|
protected |
Get the statement for selecting a one-to-many relation.
- See also
- RDBMapper::getRelationSelectSQL()
Definition at line 333 of file NodeUnifiedRDBMapper.php.
◆ getRelationStatement()
|
protected |
Get the select statement for a many-to-one or one-to-many relation.
This method is the common part used in both relations.
- See also
- RDBMapper::getRelationSelectSQL()
Definition at line 362 of file NodeUnifiedRDBMapper.php.
◆ getManyToManyRelationSelectSQL()
|
protected |
Get the statement for selecting a many-to-many relation.
- See also
- RDBMapper::getRelationSelectSQL()
Definition at line 402 of file NodeUnifiedRDBMapper.php.
◆ getInsertSQL()
|
protected |
- See also
- RDBMapper::getInsertSQL()
Reimplemented from AbstractRDBMapper.
Definition at line 478 of file NodeUnifiedRDBMapper.php.
◆ getUpdateSQL()
|
protected |
- See also
- RDBMapper::getUpdateSQL()
Reimplemented from AbstractRDBMapper.
Definition at line 491 of file NodeUnifiedRDBMapper.php.
◆ getDeleteSQL()
|
protected |
- See also
- RDBMapper::getDeleteSQL()
Reimplemented from AbstractRDBMapper.
Definition at line 507 of file NodeUnifiedRDBMapper.php.
◆ addColumns()
|
protected |
Add the columns to a given select statement.
- Parameters
-
$selectStmt The select statement (instance of SelectStatement) $tableName The table name $attributes Array of attribute names (optional)
- Returns
- SelectStatement
Definition at line 524 of file NodeUnifiedRDBMapper.php.
◆ addReferences()
|
protected |
Add the columns and joins to select references to a given select statement.
- Parameters
-
$selectStmt The select statement (instance of SelectStatement) $tableName The name for this table (the alias, if used).
- Returns
- SelectStatement
Definition at line 547 of file NodeUnifiedRDBMapper.php.
◆ addCriteria()
|
protected |
Add the given criteria to the select statement.
- Parameters
-
$selectStmt The select statement (instance of SelectStatement) $criteria An array of Criteria instances that define conditions on the object's attributes (maybe null) $tableName The table name
- Returns
- Array of placeholder/value pairs
Definition at line 613 of file NodeUnifiedRDBMapper.php.
◆ addOrderBy()
|
protected |
Add the given order to the select statement.
- Parameters
-
$selectStmt The select statement (instance of SelectStatement) $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (maybe null) $orderType The type that define the attributes in orderby (maybe null) $aliasName The table alias name to be used (maybe null) $defaultOrder The default order definition to use, if orderby is null (
- See also
- PersistenceMapper::getDefaultOrder())
Definition at line 648 of file NodeUnifiedRDBMapper.php.
◆ getParameters()
|
protected |
Get an array of placeholder/value pairs.
- Parameters
-
$criteria An array of Criteria instances that define conditions on the object's attributes (maybe null) $tableName The table name
- Returns
- Array of placeholder/value pairs
Definition at line 696 of file NodeUnifiedRDBMapper.php.
◆ getPersistentValues()
|
protected |
Get an associative array of attribute name-value pairs to be stored for a given oject (references are not included)
- Parameters
-
$object The PeristentObject.
- Returns
- Associative array
Definition at line 727 of file NodeUnifiedRDBMapper.php.
◆ convertValuesForStorage()
|
protected |
Convert values before putting into storage.
- Parameters
-
$values Associative Array
- Returns
- Associative Array
Definition at line 749 of file NodeUnifiedRDBMapper.php.
◆ getSortableObject()
|
protected |
Get the object which carries the sortkey in the relation of the given object and relative.
- Parameters
-
PersistentObjectProxy $objectProxy PersistentObjectProxy $relativeProxy RelationDescription $relationDesc The relation description
- Returns
- PersistentObjectProxy
Definition at line 774 of file NodeUnifiedRDBMapper.php.
◆ loadRelationObjects()
|
protected |
Load the relation objects in a many to many relation from the database.
- Parameters
-
$objectProxy The proxy at this end of the relation. $relativeProxy The proxy at the other end of the relation. $relationDesc The RDBManyToManyRelationDescription instance describing the relation. $includeTransaction Boolean whether to also search in the current transaction (default: false)
- Returns
- Array of PersistentObject instances
Definition at line 792 of file NodeUnifiedRDBMapper.php.
◆ createPKCondition()
|
protected |
- See also
- RDBMapper::createPKCondition()
Reimplemented from AbstractRDBMapper.
Definition at line 831 of file NodeUnifiedRDBMapper.php.
◆ getForeignKeyRelations()
|
protected |
Get all foreign key relations (used to reference a parent)
- Returns
- An array of RDBManyToOneRelationDescription instances
Definition at line 847 of file NodeUnifiedRDBMapper.php.
◆ isForeignKey()
isForeignKey | ( | $name | ) |
Check if a given attribute is a foreign key (used to reference a parent)
- Parameters
-
$name The attribute name
- Returns
- Boolean
- Note
- Public in order to be callable by ObjectQuery
Reimplemented from AbstractRDBMapper.
Definition at line 866 of file NodeUnifiedRDBMapper.php.
◆ getCacheKey()
|
protected |
Get a unique string for the given parameter values.
- Parameters
-
$alias $attributeArray $criteriaArray $orderArray $pagingInfo
- Returns
- String
Definition at line 885 of file NodeUnifiedRDBMapper.php.
Member Data Documentation
◆ CACHE_KEY
const CACHE_KEY = 'mapper' |
Definition at line 44 of file NodeUnifiedRDBMapper.php.