Oracle C++ Call Interface Programmer's Guide Release 2 (9.2) Part Number A96583-01 |
|
OCCI Classes and Methods, 12 of 22
The Map
class is used to store the mapping of the SQL structured type to C++ classes.
For each user defined type, the Object Type Translator (OTT) generates a C++ class declaration and implements the static methods readSQL()
and writeSQL()
. The readSQL()
method is called when the object from the server appears in the application as a C++ class instance. The writeSQL()
method is called to marshal the object in the application cache to server data when it is being written / flushed to the server. The readSQL()
and writeSQL()
methods generated by OTT are based upon the OCCI standard C++ mappings.
If you want to override the standard OTT generated mappings with customized mappings, you must implement a custom C++ class along with the readSQL()
and writeSQL()
methods for each SQL structured type you need to customize. In addition, you must add an entry for each such class into the Map
member of the Environment
.
To..., use the syntax:
Map();
Method | Summary |
---|---|
Adds a map entry for the type to be customized. |
This method adds a map entry for the type to be customized.
This method adds a map entry for the type, type_name, that you want to customize. You must implement the type_name C++ class along with its static methods, readSQL()
and writeSQL()
.
You must then add this information into a map object, which should be registered with the connection if the user wants the standard mappings to overridden.This registration can be done by calling the this method after the environment is created passing the environment.
void put(const string&, void *(*)(void *), void (*)(void *, void *));
|
Copyright © 2001, 2002 Oracle Corporation. All Rights Reserved. |
|