A PDO-based Data Access Service supporting reading/writing SDO
to relational databases.
Implements an optimistic concurrency policy for updates.
Predefined Classes
SDO consists of three sets of interfaces. The first set covers those
interfaces for use by typical SDO applications. These are identified
by the package prefix 'SDO_'. The second set is those used to reflect
on, and work with, the model of a data object. These are identified
by the package prefix 'SDO_Model_'. Finally, the third set are those
use by Data Access Service implementations and are identified by the
package prefix 'SDO_DAS_'. The majority of SDO users will not need to
use or understand the 'SDO_Model_' and 'SDO_DAS_' interfaces.
SDO Application Programmer Interface
SDO_DataObject
The main interface through which data objects are manipulated. In
addition to the methods below, SDO_DataObject extends the
ArrayAccess, SDO_PropertyAccess (defines __get() /
__set() methods for property access overloading),
Iterator, and Countable interfaces.
Methods
getSequence
- get the sequence for the data object
getContainer
- get the container (also known as 'parent') of this data object
getTypeName
- get the name of the type for this data object
getTypeNamespaceURI
- get the namespace URI of the type for this data object
SDO_Sequence
The interface through which sequenced data objects can be accessed
to preserve ordering across a data object's properties and
to allow unstructured text.
SDO_Sequence preserves contiguous indices and therefore inserting
or removing elements may shift other elements up or
down. In addition to the methods below, SDO_Sequence extends the
ArrayAccess, Iterator and Countable interface.
Methods
getProperty
- get the property for a given sequence index
move
- move an element from one property index to another
The interface through which many-valued properties are manipulated.
In addition to the method defined below, SDO_List extends ArrayAccess,
Iterator and Countable. SDO_List preserves contiguous indices and
therefore inserting or removing elements may shift other elements
up or down.
The interface through which data objects can be created.
A Data Access Service is responsible for populating the model
(i.e. configuring the data factory with the type and structure
information for the data objects it can create.)
for the factory and can then optionally return an instance of,
or implement, the SDO_DataFactory interface.
The main interface used to reflect on a data object instance
to obtain its model type and property information.
It is designed to follow the reflection pattern introduced in PHP 5.
Constructor
__construct
- construct a new SDO_Model_ReflectionDataObject.
getContainmentProperty
- get the property which defines the containment relationship to the data object.
SDO_Model_Type
The interface through which a data object's type information can be
retrieved. This interface can be used to find out the type name and
namespace URI of the type, whether the type allow open content, and so
on.
isAbstractType
- test to see if this is an abstract type.
getBaseType
- get the base type of this type (if one exists).
SDO_Model_Property
The interface through which a data object's property information can
be retrieved. This interface can be used to find out the type of a
property, whether a property has a default value, whether the
property is contained or reference by its parent, its cardinality,
and so on.
getDefault
- get the default value for a property.
SDO Data Access Service Developer Interfaces
SDO_DAS_DataObject
The interface through which a Data Access Service can access
a data object's
SDO_DAS_ChangeSummary.
The change summary is used by the Data Access Service to check for
conflicts when applying changes back to a data source.
The interface through which the change history of a data
object is accessed. The change summary holds information for any
modifications on a data object which occurred since logging
was activated. In the case of deletions and modifications, the old
values are also held in the change summary.
If logging is no longer active
then the change summary only holds changes made up to the point when
logging was deactivated.
Reactivating logging clears the change summary.
This is useful when a set of changes have been written out by a
DAS and the data object is to be reused.
Methods
beginLogging
- begin logging changes made to a data object
endLogging
- end logging changes made to a data object
getChangeType
- get the type of change which has been made to a data object
getOldValues
- get a list of old values for a data object
getOldContainer
- get the old container data object for a deleted data object
SDO_DAS_Setting
The interface through which the old value for a property is
accessed. A list of settings is returned by the change summary method
getOldValues().
Methods
getPropertyIndex
- get the property index for the changed property
getPropertyName
- get the property name for the changed property
getValue
- get the old value for the changed property
getListIndex
- get the list index for the old value if it was part of a
many-valued property
isSet
- test to see if the property was set prior to being modified
SDO_DAS_DataFactory
The interface for constructing the model for an SDO_DataObject.
The SDO_DAS_DataFactory is an abstract class providing a static
method which returns a concrete data factory implementation.
The implementation is used by Data Access Services to create an
SDO model from their model.
For example, a Relational Data Access Service might create and populate
an SDO_DAS_DataFactory model based on a schema for a relational
database.
Methods
getDataFactory
- static methods for getting a concrete data factory instance