The edit status reflects the editing state of the objects. It is useful in hierarchy structures such as product and its nodes. (E.g. When a node is modified, its edit status is set to esModified. When we want to commit the changes made to the product (and its nodes), we check the edit status of the nodes and perform the necessary actions.
Definition at line 67 of file osbutils.h.
Enumeration for possible status.
Definition at line 70 of file osbutils.h.
OSB_LIB::EditStatus::EditStatus | ( | Status | status = esUnchanged |
) |
Implicit constructor with optional status.
bool OSB_LIB::EditStatus::changesDiscarded | ( | ) |
Set the edit status to esUnchanged.
Call this method to discard changes made to an object.
This method returns true only if the current status is esUnchanged or esModified. This is because:
bool OSB_LIB::EditStatus::setCreated | ( | ) |
Set the edit status to esCreated.
Call this method when creating new objects that needs to be inserted to the database.
Be careful when calling this method:
bool OSB_LIB::EditStatus::setDeleted | ( | ) |
Set the edit status to esDeleted.
Call this method to mark the object for deletion from the database.
bool OSB_LIB::EditStatus::setModified | ( | ) |
Set the edit status to esModified.
Call this method when member attributes of the object are modified.
This method returns true only if the current status is esUnchanged or esModified. This is because:
bool OSB_LIB::EditStatus::setRead | ( | ) | const |
Set the edit status to esUnchanged.
Call this method ONLY when constructing objects in the gateways.
The method returns true only if the current status is esUnchanged. This is because:
bool OSB_LIB::EditStatus::setUndeleted | ( | ) |
Set the edit status to the previous status.
Call this method to undelete an object (that was marked for deleting via setDeleted()).
Status OSB_LIB::EditStatus::status | ( | ) | const |
Status OSB_LIB::EditStatus::toStatus | ( | int | value | ) | const [private] |
Converts integer value to status enum.
int OSB_LIB::EditStatus::status_ [private] |