SDO 函数
Data Access Services
The table below lists the currently provided SDO Data Access Services:
DAS Name | Description |
---|---|
SDO_DAS_XML | An XML Data Access Service supporting reading/writing SDOs as XML documents. |
SDO_DAS_Relational | A PDO-based Data Access Service supporting reading/writing SDO to relational databases. Implements an optimistic concurrency policy for updates. |
预定义类
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.
方法
-
getSequence - get the sequence for the data object
-
createDataObject - create a child data object
-
clear - unset the properties of a 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.
方法
-
getProperty - get the property for a given sequence index
-
move - move an element from one property index to another
-
insert - insert a new value into the sequence
SDO_List
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.
方法
-
insert - insert a new value into the list
SDO_DataFactory
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.
方法
-
create - create a new data object
SDO_Exception
An SDO_Exception is thrown when the caller's request cannot be completed. The subclasses of SDO_Exception are:
-
SDO_PropertyNotSetException - the property specified exists but has not been set or does not have a default value
-
SDO_PropertyNotFoundException - the property specified is not part of the data object's type
-
SDO_TypeNotFoundException - the specified namespace URI or type name is unknown
-
SDO_InvalidConversionException - conversion between the types of the assignment is not possible
-
SDO_IndexOutOfBoundsException - the numeric index into a data object, sequence or list is not in the valid range
-
SDO_UnsupportedOperationException - the request cannot be completed because it is not allowed, for example an attempt to set a read-only property.
SDO Reflection Application Programmer Interfaces
SDO_Model_ReflectionDataObject
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.
构造函数
-
__construct - construct a new SDO_Model_ReflectionDataObject.
方法
-
export - get a string describing the data object.
-
getType - get the SDO_Model_Type for the data object.
-
getInstanceProperties - get the instance properties of the data object.
-
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.
方法
-
getName - get the name of the type.
-
getNamespaceURI - get the namespace URI of the type.
-
isInstance - test for a data object being an instance of the type.
-
getProperties - get the properties of the type.
-
getProperty - get a property of the type.
-
isDataType - test to see if this type is a primitive scalar type.
-
isSequencedType - test to see if this is a sequenced type.
-
isOpenType - test to see if this is an open type.
-
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.
方法
-
getName - get the name of the property.
-
getType - get the type of the property.
-
isMany - test to see if the property is many-valued.
-
isContainment - test to see if the property describes a containment relationship.
-
getContainingType - get the type which contains this property.
-
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.
方法
-
getChangeSummary - get the change summary for a data object
SDO_DAS_ChangeSummary
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.
方法
-
beginLogging - begin logging changes made to a data object
-
endLogging - end logging changes made to a data object
-
isLogging - test to see if change logging is on
-
getChangedDataObjects - get a list of the data objects which have been changed
-
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.
方法
-
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.
方法
-
getDataFactory - static methods for getting a concrete data factory instance
-
addType - add a new type to the SDO model
-
addPropertyToType - add a new property to a type definition in the SDO model
Table of Contents
- SDO_DAS_ChangeSummary::beginLogging — Begin change logging
- SDO_DAS_ChangeSummary::endLogging — End change logging
- SDO_DAS_ChangeSummary::getChangeType — Get the type of change made to an SDO_DataObject
- SDO_DAS_ChangeSummary::getChangedDataObjects — Get the changed data objects from a change summary
- SDO_DAS_ChangeSummary::getOldContainer — Get the old container for a deleted SDO_DataObject
- SDO_DAS_ChangeSummary::getOldValues — Get the old values for a given changed SDO_DataObject
- SDO_DAS_ChangeSummary::isLogging — Test to see whether change logging is switched on
- SDO_DAS_DataFactory::addPropertyToType — Adds a property to a type
- SDO_DAS_DataFactory::addType — Add a new type to a model
- SDO_DAS_DataFactory::getDataFactory — Get a data factory instance
- SDO_DAS_DataObject::getChangeSummary — Get a data object's change summary
- SDO_DAS_Setting::getListIndex — Get the list index for a changed many-valued property
- SDO_DAS_Setting::getPropertyIndex — Get the property index for a changed property
- SDO_DAS_Setting::getPropertyName — Get the property name for a changed property
- SDO_DAS_Setting::getValue — Get the old value for the changed property
- SDO_DAS_Setting::isSet — Test whether a property was set prior to being modified
- SDO_DataFactory::create — Create an SDO_DataObject
- SDO_DataObject::clear — Clear an SDO_DataObject's properties
- SDO_DataObject::createDataObject — Create a child SDO_DataObject
- SDO_DataObject::getContainer — Get a data object's container
- SDO_DataObject::getSequence — Get the sequence for a data object
- SDO_DataObject::getTypeName — Return the name of the type for a data object
- SDO_DataObject::getTypeNamespaceURI — Return the namespace URI of the type for a data object
- SDO_Exception::getCause — Get the cause of the exception
- SDO_List::insert — Insert into a list
- SDO_Model_Property::getContainingType — Get the SDO_Model_Type which contains this property
- SDO_Model_Property::getDefault — Get the default value for the property
- SDO_Model_Property::getName — Get the name of the SDO_Model_Property
- SDO_Model_Property::getType — Get the SDO_Model_Type of the property
- SDO_Model_Property::isContainment — Test to see if the property defines a containment relationship
- SDO_Model_Property::isMany — Test to see if the property is many-valued
- SDO_Model_ReflectionDataObject::__construct — Construct an SDO_Model_ReflectionDataObject
- SDO_Model_ReflectionDataObject::export — Get a string describing the SDO_DataObject
- SDO_Model_ReflectionDataObject::getContainmentProperty — Get the property which defines the containment relationship to the data object
- SDO_Model_ReflectionDataObject::getInstanceProperties — Get the instance properties of the SDO_DataObject
- SDO_Model_ReflectionDataObject::getType — Get the SDO_Model_Type for the SDO_DataObject
- SDO_Model_Type::getBaseType — Get the base type for this type
- SDO_Model_Type::getName — Get the name of the type
- SDO_Model_Type::getNamespaceURI — Get the namespace URI of the type
- SDO_Model_Type::getProperties — Get the SDO_Model_Property objects defined for the type
- SDO_Model_Type::getProperty — Get an SDO_Model_Property of the type
- SDO_Model_Type::isAbstractType — Test to see if this SDO_Model_Type is an abstract data type
- SDO_Model_Type::isDataType — Test to see if this SDO_Model_Type is a primitive data type
- SDO_Model_Type::isInstance — Test for an SDO_DataObject being an instance of this SDO_Model_Type
- SDO_Model_Type::isOpenType — Test to see if this type is an open type
- SDO_Model_Type::isSequencedType — Test to see if this is a sequenced type
- SDO_Sequence::getProperty — Return the property for the specified sequence index
- SDO_Sequence::insert — Insert into a sequence
- SDO_Sequence::move — Move an item to another sequence position