wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
PersistenceFacade Class Reference

Public Member Functions

getInstance ()
 
 getKnownTypes ()
 
 isKnownType ($type)
 
 createObjectQuery ($type)
 
 createStringQuery ()
 
 composeOID ($params)
 
 getBaseOID ($oid, $validate=true)
 
 decomposeOID ($oid, $validate=true)
 
 getOIDParameter ($oid, $param, $validate=true)
 
 setOIDParameter ($oid, $param, $value)
 
 isValidOID ($oid)
 
 getNumberOfPKs ($type)
 
 getDummyId ()
 
 isDummyId ($id)
 

Private Member Functions

 extractOIDParts ($oid)
 

Static Private Attributes

static $knownTypes = null
 
static $numPkKeys = array()
 
static $dummyIdPattern = 'wcmf[A-Za-z0-9]{32}'
 

Detailed Description

PersistenceFacade instantiates the PersistenceFacade implementation.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 37 of file class.PersistenceFacade.php.

Member Function Documentation

& PersistenceFacade::getInstance ( )

Returns an instance of the PersistenceFacade implementation.

Returns
A reference to the only instance of the Singleton object

Definition at line 47 of file class.PersistenceFacade.php.

Referenced by RoleRDBBase\addChild(), UserRDBBase\addChild(), RDBMapper\appendChildData(), TableRDBMapper\applyDataOnLoad(), LockManagerRDB\aquireLockImpl(), SearchIndexController\collect(), NodeUtil\completeNode(), RDBMapper\connect(), CopyController\copyNode(), NodeToSingleTableMapper\create(), NodeXMLDBMapper\createImpl(), RDBMapper\createImpl(), UserManagerRDB\createRoleImpl(), UserManagerRDB\createUserImpl(), PersistentObject\delete(), NodeToSingleTableMapper\delete(), NodeXMLDBMapper\deleteImpl(), RDBMapper\deleteImpl(), Localization\deleteLanguage(), Localization\deleteTranslation(), NodeSerializer\deserializeNode(), StringQuery\execute(), DeleteController\executeKernel(), SaveController\executeKernel(), InsertController\executeKernel(), AssociateController\executeKernel(), AdminController\executeKernel(), DisplayController\executeKernel(), SortController\executeKernel(), ChildrenListController\executeKernel(), ConfigController\executeKernel(), PrincipalController\executeKernel(), PagingController\executeKernel(), ObjectQuery\executeString(), SearchUtil\find(), g_getObjects(), g_getOIDArray(), g_getOIDs(), g_getTypes(), getBaseOID(), TreeViewController\getChildren(), RoleRDBBase\getChildrenEx(), UserRDBBase\getChildrenEx(), ObjectQuery\getConnection(), NodeUtil\getConnectionToAncestor(), NodeUtil\getConnectionToDescendant(), CopyController\getCopyOID(), NodeUtil\getDescriptionFromType(), NodeUtil\getDisplayNameFromType(), NodeUtil\getDisplayValues(), NodeUtil\getInputControl(), NodeUnifiedRDBMapper\getInsertSQL(), FormUtil\getListMap(), PersistentObject\getMapper(), RDBMapper\getNextId(), AbstractFormat\getNode(), SearchController\getObjects(), ObjectQuery\getObjectTemplate(), SimplePagingController\getOIDs(), ChildrenListController\getOIDs(), NodeListController\getOIDs(), NodeToSingleTableMapper\getOIDs(), ObjectQuery\getOrderby(), NodeToSingleTableMapper\getParentOID(), NodeUtil\getParentQuery(), NodeUtil\getPath(), RDBMapper\getPKNamesForType(), NodeUtil\getPossibleChildren(), NodeUtil\getPossibleParents(), NodeToSingleTableMapper\getPropertyMap(), RemoteCapablePersistenceFacadeImpl\getProxyObject(), User\getRoleByName(), TreeViewController\getRootOIDs(), NodeUtil\getSelfQuery(), RDBMapper\getSequenceTablename(), AsyncPagingController\getSortingProperties(), Localization\getSupportedLanguages(), User\getUser(), SearchIndexController\getWorkPackage(), SearchIndexController\index(), XMLExportController\initExport(), BatchController\initialize(), Application\initialize(), NodeToSingleTableMapper\load(), RoleRDBBase\loadChildren(), UserRDBBase\loadChildren(), Node\loadChildren(), CopyController\loadFromTarget(), NodeXMLDBMapper\loadImpl(), RDBMapper\loadImpl(), BatchDisplayController\loadNode(), Node\loadParents(), Localization\loadTranslatedObject(), AuthUser\login(), StringQuery\mapToDatabase(), ChildrenListController\modifyModel(), AsyncPagingController\modifyModel(), ObjectQuery\ObjectQuery(), PersistentIterator\proceed(), MultipleActionController\replaceVariablesString(), FormUtil\resolveByOid(), PersistentObject\save(), NodeToSingleTableMapper\save(), NodeXMLDBMapper\saveImpl(), RDBMapper\saveImpl(), CopyController\saveToTarget(), Localization\saveTranslatedValue(), smarty_function_linktext(), SortController\sortAll(), CopyController\validate(), XMLExportController\writeNode(), and LogOutputStrategy\writeObject().

PersistenceFacade::getKnownTypes ( )

Get a list of types defined in the application.

Returns
The list of types

Definition at line 60 of file class.PersistenceFacade.php.

References InifileParser\getInstance().

Referenced by g_getTypes(), and SearchIndexController\getWorkPackage().

+ Here is the call graph for this function:

PersistenceFacade::createStringQuery ( )

Create a string query.

Returns
An StringQuery instance

Definition at line 94 of file class.PersistenceFacade.php.

Referenced by g_getOIDs(), and SOAPController\soapAdvancedSearch().

PersistenceFacade::composeOID (   $params)

Compose an OID from several parameters.

Parameters
paramsAn assoziative array with the keys 'prefix', 'type' and 'id' where the value of id maybe a single value or an array (for compound primary keys). If id is an array, the order of the values must match the order of the primary key names given by PersistenceMapper::getPkNames(). If only type is given in params, the primary key columns will be set with initial values.
Returns
An OID

Definition at line 106 of file class.PersistenceFacade.php.

References WCMFException\throwEx().

Referenced by XMLUtil\_GetOID(), XMLUtil\_InsertNode(), NodeRDBMapper\applyDataOnCreate(), NodeRDBMapper\applyDataOnLoad(), RDBMapper\constructOID(), RoleRDBBase\deleteChild(), UserRDBBase\deleteChild(), NodeXMLDBMapper\deleteImpl(), UserController\executeKernel(), g_getOIDs(), getBaseOID(), CopyController\getCopyOID(), FormUtil\getListMap(), NullNode\getOID(), NMUserRoleBase\getRoleRDBOID(), XMLUtil\getRootOID(), NMUserRoleBase\getUserRDBOID(), LocktableBase\getUserRDBOID(), NodeXMLDBMapper\loadImpl(), RemoteCapablePersistenceFacadeImpl\loadRemoteObject(), RemoteCapablePersistenceFacadeImpl\makeUmis(), PersistentObject\PersistentObject(), PersistentObject\setDBID(), Table\Table(), and PersistentObject\updateOID().

+ Here is the call graph for this function:

PersistenceFacade::getBaseOID (   $oid,
  $validate = true 
)

Get the base oid for a given oid (

See Also
PersistentObject::getBaseOID()).
Parameters
oidThe object id
validateTrue/False if an exception should be thrown if the OID is invalid (default: true)
Returns
An OID

Definition at line 142 of file class.PersistenceFacade.php.

References BUILDDEPTH_SINGLE, composeOID(), decomposeOID(), and getInstance().

Referenced by PersistentObject\getBaseOID(), and Node\removeDuplicateOidsWithoutRole().

+ Here is the call graph for this function:

PersistenceFacade::getOIDParameter (   $oid,
  $param,
  $validate = true 
)

Get a part of an object id (e.g. the 'type' parameter).

Parameters
oidThe OID of the object.
paramThe name of the parameter.
validateTrue/False if an exception should be thrown if the OID is invalid (default: true)
Returns
The value of the parameter.

Definition at line 181 of file class.PersistenceFacade.php.

Referenced by NodeUnifiedRDBMapper\createPKCondition(), RemoteCapablePersistenceFacadeImpl\delete(), RoleRDBBase\deleteChild(), UserRDBBase\deleteChild(), SOAPFormat\deserializeNode(), SaveController\executeKernel(), InsertController\executeKernel(), AssociateController\executeKernel(), DisplayController\executeKernel(), g_getOIDs(), NodeUnifiedRDBMapper\getChildrenDisassociateSQL(), RoleRDBBase\getChildrenEx(), UserRDBBase\getChildrenEx(), NodeUnifiedRDBMapper\getChildrenSelectSQL(), NodeUtil\getConnectionToAncestor(), NodeUtil\getConnectionToDescendant(), PersistentObject\getDBID(), SaveController\getImageConstraints(), AbstractFormat\getNode(), Node\getNumChildren(), Node\getNumParents(), NodeUtil\getPossibleChildren(), NodeUtil\getPossibleParents(), ChildrenListController\getRealSubjectType(), SaveController\getUploadDir(), SOAPFormat\isSerializedNode(), RemoteCapablePersistenceFacadeImpl\load(), Node\loadChildren(), CopyController\loadFromTarget(), RDBMapper\loadImpl(), Node\loadParents(), RemoteCapablePersistenceFacadeImpl\loadRemoteObject(), ChildrenListController\modifyModel(), AsyncPagingController\modifyModel(), RemoteCapablePersistenceFacadeImpl\registerProxyObject(), RemoteCapablePersistenceFacadeImpl\save(), SortController\sortAll(), and CopyController\validate().

PersistenceFacade::setOIDParameter (   $oid,
  $param,
  $value 
)

Set a part of an object id (e.g. the 'type' parameter).

Parameters
oidThe OID of the object.
paramThe name of the parameter.
valueThe value of the parameter.
Returns
The modified object id.

Definition at line 195 of file class.PersistenceFacade.php.

PersistenceFacade::getNumberOfPKs (   $type)

Get the number of primary keys a type has.

Parameters
typeThe type to check.
Returns
The number of primary keys [defaults to 1]

Definition at line 221 of file class.PersistenceFacade.php.

PersistenceFacade::getDummyId ( )

Get a dummy id ("wcmf" + unique 32 character string).

Returns
A dummy id

Definition at line 240 of file class.PersistenceFacade.php.

Referenced by NodeRDBMapper\applyDataOnCreate().

PersistenceFacade::isDummyId (   $id)

Check if a given id is a dummy id.

Parameters
idThe id to check
Returns
True/False

Definition at line 249 of file class.PersistenceFacade.php.

Referenced by NodeUnifiedRDBMapper\prepareInsert(), and ObjectQuery\registerObjectTemplate().

PersistenceFacade::extractOIDParts (   $oid)
private

Extract all parts of an object id.

Parameters
oidThe object id
Returns
An associative array with keys 'prefix', 'type', 'id', 'valid'

Definition at line 262 of file class.PersistenceFacade.php.

Member Data Documentation

PersistenceFacade::$knownTypes = null
staticprivate

Definition at line 39 of file class.PersistenceFacade.php.

PersistenceFacade::$numPkKeys = array()
staticprivate

Definition at line 40 of file class.PersistenceFacade.php.

PersistenceFacade::$dummyIdPattern = 'wcmf[A-Za-z0-9]{32}'
staticprivate

Definition at line 41 of file class.PersistenceFacade.php.


The documentation for this class was generated from the following file: