![]() |
![]() |

Public Member Functions | |
| PersistentObject ($type, $oid=null) | |
| getType () | |
| setType ($type) | |
| getBaseType () | |
| getOID () | |
| setOID ($oid) | |
| getDBID () | |
| setDBID ($id) | |
| getMapper () | |
| & | getDataConverter () |
| save () | |
| delete ($recursive=true) | |
| getState () | |
| setState ($state) | |
| setImmutable () | |
| getLock () | |
| & | duplicate () |
| copyValues (&$object, $dataTypes=array()) | |
| copyValueIntern (&$node, $valueName, $dataType, &$targetNode, $dataTypes) | |
| clearValues ($dataTypes=array()) | |
| clearValueIntern (&$node, $valueName, $dataType, $dataTypes) | |
| updateOID () | |
| afterCreate () | |
| beforeInsert () | |
| afterInsert () | |
| afterLoad () | |
| beforeUpdate () | |
| afterUpdate () | |
| beforeDelete () | |
| afterDelete () | |
| hasValue ($name, $type=null) | |
| getValue ($name, $type=null) | |
| removeValue ($name, $type=null) | |
| getUnconvertedValue ($name, $type=null) | |
| getConvertedValue ($name, $type=null) | |
| getValueTypes ($name) | |
| validateValue ($name, $value, $type=null) | |
| setValue ($name, $value, $type=null, $forceSet=false) | |
| getValueProperties ($name, $type=null) | |
| setValueProperties ($name, $properties, $type=null) | |
| getValueProperty ($name, $property, $type=null) | |
| setValueProperty ($name, $property, $value, $type=null) | |
| getValueNames ($type=null) | |
| getDataTypes () | |
| getProperty ($name) | |
| setProperty ($name, $value) | |
| getPropertyNames () | |
| addChangeListener (&$listener) | |
| removeChangeListener (&$listener) | |
| propagateValueChange ($name, $type, $oldValue, $newValue) | |
| propagatePropertyChange ($name, $oldValue, $newValue) | |
| propagateStateChange ($oldValue, $newValue) | |
| getObjectDisplayName () | |
| getObjectDescription () | |
| getDisplayValue () | |
| getValueDisplayName ($name, $type=null) | |
| getValueDescription ($name, $type=null) | |
| toString ($verbose=false) | |
Data Fields | |
| $_oid = null | |
| $_type = '' | |
| $_data = array() | |
| $_properties = array() | |
| $_mapper = null | |
| $_state = STATE_CLEAN | |
| $_isImmutable = false | |
| $_changeListeners = array() | |
* datatype1---valueName1---value * properties---propertyName1---value * propertyName2---value * ... * valueName2---value * properties---propertyName1---value * ... * ... * datatype2---valueName1---value * properties---propertyName1---value * ... * ... * ... * * e.g.: $this->_data[DATATYPE_ATTRIBUTE]['name']['value'] gives the value of the attribute 'name' which is of app_data_type DATATYPE_ATTRIBUTE * $this->_data[DATATYPE_ATTRIBUTE]['name']['properties']['visible'] gives the value of the visibility property of the * attribute 'name' *
Definition at line 69 of file class.PersistentObject.php.
| PersistentObject | ( | $ | type, | |
| $ | oid = null | |||
| ) |
Constructor. The object will be bound to the appripriate PersistenceMapper automatically, if the the PersistenceFacade knows the type.
| type | The object type. | |
| oid | The object id (, optional will be calculated if not given or not valid). |
Definition at line 86 of file class.PersistentObject.php.
References PersistenceFacade::composeOID(), PersistenceFacade::getInstance(), PersistenceFacade::isValidOID(), setOID(), and setState().
Referenced by Node::Node().

| getType | ( | ) |
Get the type of the object.
Definition at line 113 of file class.PersistentObject.php.
Referenced by Node::getNumChildren(), Node::getNumParents(), getObjectDescription(), getObjectDisplayName(), Node::getPath(), and updateOID().
| setType | ( | $ | type | ) |
Set the type of the object.
| type | The objects type. |
Definition at line 121 of file class.PersistentObject.php.
| getBaseType | ( | ) |
Get the base type of the object. This might differ from the type, if the object may exist in different roles and has one of these roles currently. The default implementation ' returns the object's type.
Definition at line 131 of file class.PersistentObject.php.
| getOID | ( | ) |
Get the object id of the PersistentObject.
Reimplemented in NullNode.
Definition at line 139 of file class.PersistentObject.php.
Referenced by delete(), Node::deleteChild(), getLock(), Node::getNextSibling(), Node::getPreviousSibling(), User::hasRole(), Node::loadChildren(), Node::loadParents(), Node::toString(), and Node::updateParent().
| setOID | ( | $ | oid | ) |
Set the object id of the PersistentObject.
| oid | The PersistentObject's oid. |
Definition at line 147 of file class.PersistentObject.php.
References PersistenceFacade::decomposeOID(), and setValue().
Referenced by AuthUser::login(), PersistentObject(), and setDBID().

| getDBID | ( | ) |
Get the id of the object in the persistent storage.
Reimplemented in NullNode.
Definition at line 166 of file class.PersistentObject.php.
References PersistenceFacade::getOIDParameter().
Referenced by UserRDBBase::addChild(), RoleRDBBase::addChild(), UserRDBBase::deleteChild(), RoleRDBBase::deleteChild(), UserRDBBase::getChildrenEx(), RoleRDBBase::getChildrenEx(), UserRDBBase::getLocktableChildren(), UserRDBBase::getNMUserRoleChildren(), RoleRDBBase::getNMUserRoleChildren(), User::getUserId(), UserRDBBase::loadChildren(), and RoleRDBBase::loadChildren().

| setDBID | ( | $ | id | ) |
Set the id of the object in the persistent storage.
| id | The id. |
Definition at line 176 of file class.PersistentObject.php.
References PersistenceFacade::composeOID(), and setOID().

| getMapper | ( | ) |
Get the PersistenceMapper of the object.
Definition at line 184 of file class.PersistentObject.php.
| & getDataConverter | ( | ) |
Get the DataConverter used when loading/saving values.
Definition at line 192 of file class.PersistentObject.php.
Referenced by getConvertedValue(), and getUnconvertedValue().
| save | ( | ) |
Save data. This call will be delegated to the PersistenceMapper class.
Definition at line 201 of file class.PersistentObject.php.
References afterInsert(), afterUpdate(), beforeInsert(), beforeUpdate(), and getState().

| delete | ( | $ | recursive = true |
) |
Delete data. This call will be delegated to the PersistenceMapper class.
| recursive | True/False whether to physically delete it's children too [default: true] |
Definition at line 226 of file class.PersistentObject.php.
References afterDelete(), beforeDelete(), and getOID().

| getState | ( | ) |
Get the object's state:
Definition at line 244 of file class.PersistentObject.php.
Referenced by save().
| setState | ( | $ | state | ) |
Set the state of the object to one of the STATE constants.
Definition at line 252 of file class.PersistentObject.php.
References propagateStateChange().
Referenced by Table::deleteRow(), Table::insertRow(), PersistentObject(), setValue(), setValueProperties(), Table::setValueProperties(), and Table::Table().

| setImmutable | ( | ) |
Set object immutable. Sets the editable property of each value to false. and disables save/delete methods.
Definition at line 286 of file class.PersistentObject.php.
References getDataTypes(), getValueNames(), and setValueProperty().
Referenced by getLock().

| getLock | ( | ) |
Get the lock on the object.
Definition at line 300 of file class.PersistentObject.php.
References LockManager::getInstance(), getOID(), and setImmutable().

| & duplicate | ( | ) |
Get a copy of the object (ChangeListeners and Lock are not copied)
Definition at line 312 of file class.PersistentObject.php.
| copyValues | ( | &$ | object, | |
| $ | dataTypes = array() | |||
| ) |
Copy all non-empty values to a given instance (ChangeListeners are triggered)
| object | A reference to the PersistentObject to copy the values to. | |
| dataTypes | An array of datatypes. Only values of that datatypes will be copied. Empty array means all datatypes [default:empty array] |
Definition at line 332 of file class.PersistentObject.php.
| copyValueIntern | ( | &$ | node, | |
| $ | valueName, | |||
| $ | dataType, | |||
| &$ | targetNode, | |||
| $ | dataTypes | |||
| ) |
Private callback for copying values
Definition at line 341 of file class.PersistentObject.php.
| clearValues | ( | $ | dataTypes = array() |
) |
Clear all values. Set each value to null.
| dataTypes | An array of datatypes. Only values of that datatypes will be cleared. Empty array means all datatypes [default:empty array] |
Definition at line 355 of file class.PersistentObject.php.
| clearValueIntern | ( | &$ | node, | |
| $ | valueName, | |||
| $ | dataType, | |||
| $ | dataTypes | |||
| ) |
Private callback for clearing values
Definition at line 364 of file class.PersistentObject.php.
| updateOID | ( | ) |
Recalculate the object id
Definition at line 372 of file class.PersistentObject.php.
References PersistenceFacade::composeOID(), getType(), and getValue().
Referenced by setValue().

| afterCreate | ( | ) |
Persistence hook methods. Subclasses may override this to implement special application requirements. The default implementations do nothing. This method is called once after creation of this object. At this time it is not known in the store.
Definition at line 394 of file class.PersistentObject.php.
| beforeInsert | ( | ) |
This method is called once before inserting the newly created object into the store.
Definition at line 398 of file class.PersistentObject.php.
Referenced by save().
| afterInsert | ( | ) |
This method is called once after inserting the newly created object into the store.
Definition at line 402 of file class.PersistentObject.php.
Referenced by save().
| afterLoad | ( | ) |
This method is called always after loading the object from the store.
Definition at line 406 of file class.PersistentObject.php.
| beforeUpdate | ( | ) |
This method is called always before updating the modified object in the store.
Definition at line 410 of file class.PersistentObject.php.
Referenced by save().
| afterUpdate | ( | ) |
This method is called always after updating the modified object in the store.
Definition at line 414 of file class.PersistentObject.php.
Referenced by save().
| beforeDelete | ( | ) |
This method is called once before deleting the object from the store.
Definition at line 418 of file class.PersistentObject.php.
Referenced by delete().
| afterDelete | ( | ) |
This method is called once after deleting the object from the store.
Definition at line 422 of file class.PersistentObject.php.
Referenced by delete().
| hasValue | ( | $ | name, | |
| $ | type = null | |||
| ) |
Values and Properties Check if the node has a given item.
| name | The name of the item to query. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Definition at line 435 of file class.PersistentObject.php.
References getValueNames().

| getValue | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the value of a named item.
| name | The name of the item to query. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Definition at line 446 of file class.PersistentObject.php.
Referenced by Table::getColumn(), UserImpl::getConfig(), UserRDBBase::getConfig(), getConvertedValue(), UserImpl::getFirstname(), UserRDBBase::getFirstname(), NMUserRoleBase::getFkRoleId(), NMUserRoleBase::getFkUserId(), LocktableBase::getFkUserId(), UserRDBBase::getId(), RoleRDBBase::getId(), LocktableBase::getId(), AdodbseqBase::getId(), UserImpl::getLogin(), UserRDBBase::getLogin(), UserImpl::getName(), RoleImpl::getName(), UserRDBBase::getName(), RoleRDBBase::getName(), LocktableBase::getObjectid(), UserImpl::getPassword(), UserRDBBase::getPassword(), NMUserRoleBase::getRoleRDBOID(), Table::getRow(), LocktableBase::getSessionid(), LocktableBase::getSince(), getUnconvertedValue(), NMUserRoleBase::getUserRDBOID(), LocktableBase::getUserRDBOID(), setValue(), toString(), and updateOID().
| removeValue | ( | $ | name, | |
| $ | type = null | |||
| ) |
Remove a named item.
| name | The name of the item to remove. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Definition at line 469 of file class.PersistentObject.php.
| getUnconvertedValue | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the unconverted value of a named item.
| name | The name of the item to query. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Definition at line 490 of file class.PersistentObject.php.
References getDataConverter(), getValue(), and getValueProperty().
Referenced by UserRDBBase::getConfig(), UserRDBBase::getFirstname(), NMUserRoleBase::getFkRoleId(), NMUserRoleBase::getFkUserId(), LocktableBase::getFkUserId(), UserRDBBase::getId(), RoleRDBBase::getId(), LocktableBase::getId(), AdodbseqBase::getId(), UserRDBBase::getLogin(), UserRDBBase::getName(), RoleRDBBase::getName(), LocktableBase::getObjectid(), UserRDBBase::getPassword(), LocktableBase::getSessionid(), and LocktableBase::getSince().

| getConvertedValue | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the converted value of a named item.
| name | The name of the item to query. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Definition at line 506 of file class.PersistentObject.php.
References getDataConverter(), getValue(), and getValueProperty().

| getValueTypes | ( | $ | name | ) |
Get the type of a named item.
| name | The name of the item to query. |
Definition at line 519 of file class.PersistentObject.php.
| validateValue | ( | $ | name, | |
| $ | value, | |||
| $ | type = null | |||
| ) |
Check if data may be set. The method is also called, when setting a value. Controller may call this method before setting data and saving the object.
| name | The name of the item to set. | |
| value | The value of the item. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item of any type that matches will be modified) |
Definition at line 537 of file class.PersistentObject.php.
Referenced by setValue().
| setValue | ( | $ | name, | |
| $ | value, | |||
| $ | type = null, |
|||
| $ | forceSet = false | |||
| ) |
Set the value of a named item if it exists.
| name | The name of the item to set. | |
| value | The value of the item. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item of any type that matches will be modified) | |
| forceSet | Set the value even if it is already set (used to notify listeners) [default: false] |
Definition at line 550 of file class.PersistentObject.php.
References getValue(), propagateValueChange(), setState(), WCMFException::throwEx(), updateOID(), and validateValue().
Referenced by UserImpl::setConfig(), UserRDBBase::setConfig(), UserImpl::setFirstname(), UserRDBBase::setFirstname(), NMUserRoleBase::setFkRoleId(), NMUserRoleBase::setFkUserId(), LocktableBase::setFkUserId(), UserRDBBase::setId(), RoleRDBBase::setId(), LocktableBase::setId(), AdodbseqBase::setId(), UserImpl::setLogin(), UserRDBBase::setLogin(), UserImpl::setName(), RoleImpl::setName(), UserRDBBase::setName(), RoleRDBBase::setName(), LocktableBase::setObjectid(), setOID(), UserImpl::setPassword(), UserRDBBase::setPassword(), NMUserRoleBase::setRoleRDB(), LocktableBase::setSessionid(), LocktableBase::setSince(), and NMUserRoleBase::setUserRDB().

| getValueProperties | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the properties of a named item.
| name | The name of the item to query. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item value of any type that matches will be returned) |
Reimplemented in Table.
Definition at line 601 of file class.PersistentObject.php.
Referenced by getValueProperty(), setValueProperty(), and toString().
| setValueProperties | ( | $ | name, | |
| $ | properties, | |||
| $ | type = null | |||
| ) |
Set the properties of a named item.
| name | The name of the item to set its properties. | |
| properties | An associative array holding the properties of the item. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item of any type that matches will be modified) |
Reimplemented in Table.
Definition at line 624 of file class.PersistentObject.php.
References setState().
Referenced by setValueProperty().

| getValueProperty | ( | $ | name, | |
| $ | property, | |||
| $ | type = null | |||
| ) |
Get the value of one property of a named item.
| name | The name of the item to set its properties. | |
| property | The name of the property to set. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item of any type that matches will be modified) |
Definition at line 657 of file class.PersistentObject.php.
References getValueProperties().
Referenced by getConvertedValue(), and getUnconvertedValue().

| setValueProperty | ( | $ | name, | |
| $ | property, | |||
| $ | value, | |||
| $ | type = null | |||
| ) |
Set the value of one property of a named item.
| name | The name of the item to set its properties. | |
| property | The name of the property to set. | |
| value | The value to set on the property. | |
| type | The type of the item as defined in the subclass [optional] (if type is omitted the first item of any type that matches will be modified) |
Definition at line 674 of file class.PersistentObject.php.
References getValueProperties(), and setValueProperties().
Referenced by setImmutable().

| getValueNames | ( | $ | type = null |
) |
Get the names of all items.
| type | The type of the item as defined in the subclass [optional] (if type is omitted all names will be returned) |
Definition at line 690 of file class.PersistentObject.php.
Referenced by Table::getNumRows(), hasValue(), setImmutable(), and toString().
| getDataTypes | ( | ) |
Get all datatypes.
Definition at line 705 of file class.PersistentObject.php.
Referenced by Table::getColumns(), setImmutable(), and toString().
| getProperty | ( | $ | name | ) |
Get the value of a named property in the object.
| name | The name of the property to query. |
Definition at line 714 of file class.PersistentObject.php.
Referenced by UserRDBBase::getChildrenEx(), RoleRDBBase::getChildrenEx(), Node::getNumChildren(), Node::getNumParents(), Node::loadChildren(), Node::loadParents(), setProperty(), and toString().
| setProperty | ( | $ | name, | |
| $ | value | |||
| ) |
Set the value of a named property in the object.
| name | The name of the property to set. | |
| value | The value of the property to set. |
Definition at line 726 of file class.PersistentObject.php.
References getProperty(), and propagatePropertyChange().

| getPropertyNames | ( | ) |
Get the names of all properties in the object.
Definition at line 736 of file class.PersistentObject.php.
Referenced by toString().
| addChangeListener | ( | &$ | listener | ) |
ChangeListener Support Add a change listener (Must be of type ChangeListener).
| listener | The ChangeListener. |
Definition at line 749 of file class.PersistentObject.php.
| removeChangeListener | ( | &$ | listener | ) |
Remove a change listener (Must be of type ChangeListener).
| listener | The ChangeListener. |
Definition at line 757 of file class.PersistentObject.php.
| propagateValueChange | ( | $ | name, | |
| $ | type, | |||
| $ | oldValue, | |||
| $ | newValue | |||
| ) |
Notify ChangeListeners of value changes.
| name | The name of the item that has changed. | |
| type | The type of the item that has changed. | |
| oldValue | The old value of the item that has changed | |
| newValue | The new value of the item that has changed |
Definition at line 772 of file class.PersistentObject.php.
Referenced by setValue().
| propagatePropertyChange | ( | $ | name, | |
| $ | oldValue, | |||
| $ | newValue | |||
| ) |
Notify ChangeListeners of property changes.
| name | The name of the item that has changed. | |
| oldValue | The old value of the item that has changed | |
| newValue | The new value of the item that has changed |
Definition at line 784 of file class.PersistentObject.php.
Referenced by setProperty().
| propagateStateChange | ( | $ | oldValue, | |
| $ | newValue | |||
| ) |
Notify ChangeListeners of state changes.
| oldValue | The old value of the item that has changed | |
| newValue | The new value of the item that has changed |
Definition at line 795 of file class.PersistentObject.php.
Referenced by setState().
| getObjectDisplayName | ( | ) |
Output Get the name of the type used for display.
Reimplemented in AdodbseqBase, LocktableBase, NMUserRoleBase, RoleRDBBase, and UserRDBBase.
Definition at line 811 of file class.PersistentObject.php.
References Message::get(), and getType().

| getObjectDescription | ( | ) |
Get the description of the type.
Reimplemented in AdodbseqBase, LocktableBase, NMUserRoleBase, RoleRDBBase, and UserRDBBase.
Definition at line 820 of file class.PersistentObject.php.
References Message::get(), and getType().

| getDisplayValue | ( | ) |
Get the value of the object used for display.
Definition at line 829 of file class.PersistentObject.php.
References toString().
Referenced by Node::getDisplayValue().

| getValueDisplayName | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the name of a value used for display.
| name | The name of the value. | |
| type | The type of the value (not used by the default implementation) [default: null] |
Reimplemented in AdodbseqBase, LocktableBase, NMUserRoleBase, RoleRDBBase, and UserRDBBase.
Definition at line 840 of file class.PersistentObject.php.
References Message::get().

| getValueDescription | ( | $ | name, | |
| $ | type = null | |||
| ) |
Get the description of a value.
| name | The name of the value. | |
| type | The type of the value (not used by the default implementation) [default: null] |
Reimplemented in AdodbseqBase, LocktableBase, NMUserRoleBase, RoleRDBBase, and UserRDBBase.
Definition at line 851 of file class.PersistentObject.php.
References Message::get().

| toString | ( | $ | verbose = false |
) |
Get a string representation of the PersistentObject.
| verbose | True to get a verbose output [default: false] |
Reimplemented in Node.
Definition at line 860 of file class.PersistentObject.php.
References getDataTypes(), getProperty(), getPropertyNames(), getValue(), getValueNames(), and getValueProperties().
Referenced by getDisplayValue().

| $_oid = null |
Definition at line 71 of file class.PersistentObject.php.
| $_type = '' |
Definition at line 72 of file class.PersistentObject.php.
| $_data = array() |
Definition at line 73 of file class.PersistentObject.php.
| $_properties = array() |
Definition at line 74 of file class.PersistentObject.php.
| $_mapper = null |
Definition at line 75 of file class.PersistentObject.php.
| $_state = STATE_CLEAN |
Definition at line 76 of file class.PersistentObject.php.
| $_isImmutable = false |
Definition at line 77 of file class.PersistentObject.php.
| $_changeListeners = array() |
Definition at line 78 of file class.PersistentObject.php.
|
This page generated via doxygen 1.5.8 Mon Mar 30 01:58:45 2009. Copyright © 2009 wemove digital solutions GmbH. |
|