Component extensible parallel execution of multiple threads assembled from program components specified with partial inter-component sequence information6205465Abstract A method and apparatus for parallel processing is provided. A parallel execution object organizes and initiates execution of two or more parallel processing threads that act on members in the context of a transaction. The members comprise one or more sets of data for which parallel processing is needed, for example, sets of network device data. The threads are organized by receiving a set of execution components that have a partial order defined by preconditions and resource requirements. A partial order evaluator resolves the partial order into a final order of execution of the components. The parallel execution object, members, transaction, and partial order can be declared in the context of an application program. Optionally, the threads are organized by selecting execution components that are optimized for use with a particular current phase of execution of the application program. Claims What is claimed is: Description A microfiche appendix containing computer program listings Appendix 1 and Appendix 2 is included with this application. The microfiche appendix has a total of 22 frames on a total of one sheet of microfiche.
TABLE 1
COMMAND LINE FUNCTIONS OF ANI
PARAM-
COMMAND ETERS MEANING OF COMMAND
-trace ani package Enable tracing for the named package.
For example, the command -trace
framework enables tracing for all classes
contained in the FrameWork package
-debug ani package enable debugging for the named package.
For example, the command -debug
framework enables debugging for all classes
contained in the FrameWork package.
Debugging provides more detailed
information than tracing. All tracing
for a package is enabled when debugging
is enabled for a package.
-analyze none Puts the ANI in analysis mode. In this mode,
the ANI examines and loads its environment
as it does during normal initiation, prints a
configuration report and terminates.
4. EXTENSIBILITY MECHANISMS The ANI 50 can adapt, when installed in a live managed network 100, to changes in the devices 102 managed by the ANI. In the preferred embodiment, services of the ANI are defined in abstract data structures called Service Modules. The service module framework 210 of ANI 50 includes a mechanism providing automatic determination of currently supported devices 102 at start-up time, and automatic integration of device-specific overrides of Service Module Functions 76a-76n at system start-up time. Further, there is automatic selection of device/version specific Service Module Functions 76a-76n at instantiation time. The mechanism comprises, in one embodiment, an identification mechanism, a mapping mechanism, an inheritance mechanism, and an activation mechanism. The identification mechanism generally involves obtaining the system variables (as defined in RFC 1213) including sysObjectID of a device 102, acquiring a Service Module Function 76a-76n that is specific to the sysObjectID, computing an identifier of a mapping mechanism, and selecting the mapping mechanism. The mapping mechanism selects which Service Module Function 76a-76n to particularize for the device 102 being managed. The selection is carried out using a mapper associated with the type of the device 102. Each type of device has an associated mapper stored in a directory of a file system of the operating system 30. The directory structure in which the mappers are stored defines the sequence of inheritance of classes taken from Service Module Functions 76a-76n. For example, device families have common directory roots. Members of a family, that is, specific device types, may be commonly treated in the family directory, or there may be more specialized directories contained in the family directories. Versions of devices usually lie within a family directory. The directory structure is traversed when the ANI 50 is launched. Accordingly, new device types and new device families can be added to management when the network management system 40 is installed, merely by installing a mapper and the Service Module Functions 76a-76n applicable to the new family or device type. Using these mechanisms, the ANI 50 is said to be extensible to handle previously not specifically supported device types. FIG. 2B is a block diagram of a preferred embodiment of a Service Module 54a. The functions provided by a Service Module 54a are implemented in one or more Service Module Functions 76a-76n. Each Service module 54a declares the Service Module Functions 76a-76n that it implements. Preferably, each Service Module Function 76a-76n is a JAVA.RTM. class. FIG. 2C is a block diagram of a preferred embodiment of a Service Module Function 76a. An application programmer decides how to partition functions provided by a Service Module 54a into one or more Service Module Functions 76a-76n based upon various criteria, such as attributes of the service. The programmer isolates abstract processing concepts into Service Module Functions 76a-76n so that when the Service Module Functions are adapted to a particular device, less effort is required to construct the adaptation. For example, a Service Module 54a implements the abstract service of initial discovery of devices 102 in the managed network 100. Initial discovery may comprise component operations such as finding device identity information, device type information, and device module information. The Service Module 54a declares a Service Module Function 76a-76n for each component operation. In the preferred embodiment, extensibility is managed by configuring each service module to extend the definitions of pre-defined JAVA.RTM. classes. For example, in the preferred embodiment, Service Modules 54a-54n extend classes in the FrameWork 210, which is named com.cisco.nm.ani.framework. The classes that are extended are com.cisco.nm.ani.framework.ServiceModule and com.cisco.nm.ani.framework.SMFunction. Similarly, all device definitions are rooted in the package structure in the package com.cisco.nm.ani.devices. As shown in FIG. 2C, a Device Mapper 1214 is associated with each device 102 or device type. Each Device Mapper 1214 is associated with a list 216 of overridden functions. Each entry in the list 216 identifies a Service Module Function 76a-76n that is overridden by the Device Mapper 1214 for its associated device or device type. Each Device Mapper 1214 is also associated with a list 1218 of identifiers of devices that are managed by the Device Mapper. In the preferred embodiment, the list 1218 is a list of sysObjectIDs, each of which references a unique type of device 102. In a preferred implementation, each Device Mapper 1214 is a class in an object-oriented programming language that extends a "devicemapper" class. Since there may be many Device Mappers 1214, naming conventions are used to organize Mappers and express their relationship. In one embodiment, Mappers are named and stored in a directory structure of an operating system. For example, in the preferred embodiment, the operating system 30 is the Microsoft Windows.RTM. NT operating system, and Mappers are stored in the Windows directory tree structure. In other embodiments, Mappers are stored in the directory tree structure of the Solaris operating system, or other operating systems derived from UNIX, such as AIX, and HPUX. Preferably, adaptation of the ANI 50 to new devices 102 is handled in an initialization phase of the ANI. FIG. 2F is a diagram of an Initialize method 250 and methods included in it. The Initialize method 250 includes a Discover All Devices method 252, a Load Configuration method 254, an Integrate Device Versions method 256, and a Device Mapping method 258. During execution of the Initialize method 250, in a startup or initialization load phase of the ANI 50, the Discover All Devices method 258 is invoked, which establishes certain data structures used in device mapping. Thereafter, the instantiation of one or more device-specific Service Module Function classes is carried out when an application program requests a service of a Service Module. Specifically, ANI handles a particular device 102 in response to a client request or an internal request, such as the discovery of a new object in the network, by creating a Container Object 219, associating default mapping code with that container, instantiating certain Service Module Functions that carry an initial state for that Container object. ANI then initiates discovery of that device 102. In the course of discovery of that device 102, Service Module Functions particularize the handling of the device as the various attributes of the device are acquired. Specifically, as the sysObjectID of the device is acquired, a particular class of Device Mapper is associated with the Container object. If necessary, further refinement of the Device Mapper is done when version information describing the device is acquired. FIG. 3A is a block diagram of exemplary data structures of the mechanism. A directory 300, managed by the operating system 30 of the network management station 10, stores subdirectory entries 302a-302n. Each entry 302a-302n is a subdirectory name identifying a subdirectory that contains a Device Mapper 1214. Each entry 302a-302n is associated with a type of a device 102. For example, in FIG. 3A, the directory 300 contains subdirectory entries associated with the Cisco 1000 router, 2000 router, Catalysts.RTM. 1200 switch ("C1200"), Catalyst 1900 switch ("C1900"), and Catalyst 5000 ("C5000") switch. Each subdirectory entry contains a single device mapper, which is preferably a JAVA .class file. Each subdirectory entry generally also contains the .class of the overriding Service Module Functions. It may also contain other directories containing device mappers. The Cisco C5000 is presently commercially available in approximately a dozen versions or more. Accordingly, a mapping 310 is associated with the C5000 entry 302n of directory 300. The mapping 310 has a device type column 312 that stores device type identifiers. Each device type identifier names a device type. The mapping 310 also has an OID column 314 that stores SysObjectId values associated with C5000 class devices. The mapping 310 also has a device mapper name column 316. Each entry in the device mapper name column 316 is a name of a Device Mapper 1214. Thus, the mapping 310 associates a device type and its SysObjectId value with a Device Mapper 1214. When a device has more than one version, the versions are handled by subclasses of the parent class with implicit application to the sysObjectIds of the parent class. As a result, the mapping can automatically distribute software version sensitive mappings across a complete line of derived types. For example, the C55XX line of systems derive from the C5000 line of systems. Software versions that apply to C5000 systems generally also apply to C55XX systems. The automatic mechanism described herein applies the version sensitive mappers of the C5000 to the C55XX. Each Device Mapper 1214 comprises a list, for all Service Module Functions 76a-76n defined in the ANI 50, of classes of the Service Module Functions that are overridden for the device associated with the Device Mapper. In an embodiment, the Device Mapper 1214 stores a plurality of entries, each entry comprising a value in a Service Module Function name column 318 and a class column 320 indicating the class of that function that is overridden. Using the list in the Device Mapper 1214, the ANI 50 can determine, when a particular device matching the OID is encountered, that a particular Service Module Function class should be overridden by a class listed in the Device Mapper list. Thus, the Device Mapper 1214 enables an application programmer to declare classes, the behavior and data of which are to be used when dealing with a particular service abstraction for a particular kind of device. In the preferred embodiment, the Device Mapper 1214 associated with a particular device type need only contain overrides for the specific behavior of the device type that differs from other device types to which the particular device type is related in a hierarchy. For example, consider a device 102 of type C5500.2.2 that is related to earlier devices of type C5500.2.1, C5500, and C5000, as shown by the hierarchy of device type identifiers in column 312 of the mapping 310. The Device Mapper 1214 that is associated with device type C5500.2.2 need not include overrides for behavior that is overridden in the Device Mapper 1214 associated with device types C5500.2.1, C5500, or C5000. In the preferred embodiment, an automated mechanism incorporates the overrides of such related devices into classes that are instantiated for Service Module Functions applicable to the C5500.2.2 device. FIG. 3B is a flow diagram of a portion of the Discover All Devices method 252 shown in FIG. 2F that is executed in the Initialize method 250 of the ANI 50. The portion of the Discover All Devices method 252 shown in FIG. 3B constructs the mapping 310. In block 330, the ANI 50 starts at the root of the device mapper directory tree by reading the root path from the properties file 56. In block 334, the ANI 50 locates a Device Mapper 1214 in the next available directory after the root. Blocks 336-344, inclusive, involve a recursive walk of the directory tree. Thus, blocks 336-344 may be implemented as a separate method that is recursively called. In block 336, the next entry in the directory 300 is read and examined. If the entry is another directory or subdirectory, as tested in block 338, then in block 344 a recursive call is made to block 334 so as to continue the search of the directory tree. If the entry is not another directory or subdirectory, then the ANI 50 tests whether the entry is a device mapper, as shown by block 340. If the entry is a device mapper, then the device mapper is absorbed in an Absorb Device process, as shown by block 341. Generally, blocks 338-340 involve looking for directory entries named <something>DeviceMapper.class, in which <something> is a directory name and "DeviceMapper.class" identifies a Device Mapper 1214. For example, in the directory named "C1200," a Device Mapper is stored in the file "com.cisco.nm.ani.devices.C1200.C1200DeviceMapper". As shown in block 344, if the entry is not a device mapper, then the search continues in any other entries of the directory. The steps of block 336, block 338, block 340, and block 344 are repeated for each device type supported by the ANI 50. FIG. 3C is a flow diagram of a preferred method of absorbing a device as indicated in block 341. In block 350, an instance of the Device Mapper found in block 334 is created, using its long class, e.g., "com.cisco.ani.devices.C1200.C1200DeviceMapper." In block 352, data stored in association with the Device Mapper is obtained. In particular, block 352 involves obtaining the information stored in the list 216 and the list 1218 associated with the Device Mapper. In block 354, the list 1218 is read in order to determine the device OIDs that are handled by the Device Mapper. In block 356, a determination is made as to whether the Device Mapper deals with a particular device software version. If so, then a special handling method is called in block 358, as described in more detail herein. Otherwise, in block 360, the OIDs in the list 216 and the name of the Device Mapper are added to the mapping 310. Preferably, the mapping 310 is a database table or a global variable that is accessible throughout the ANI 50. INDIVIDUAL DEVICE MAPPING FIG. 3D is a flow diagram of a preferred process for a GetDeviceType method 362. In block 364, the method acquires a value of a sysObjectID MIB variable from a device 102 that is of interest, by calling appropriate SNMP functions to obtain the value over the network 100. In block 366, the sysObjectID value is subjected to a validation process. If the sysObjectID is a new identifier not currently in the data model, as tested in block 367, then in block 368, a Device Mapper 1214 is obtained for the current sysObjectID value. In the preferred embodiment, block 368 involves invoking a GetMapperForID method, from a master Device Mapper class, and passing it the current sysObjectID value. In block 370, a determination is made as to whether the GetMapperForID method returned a Device Mapper object. If not, in block 372 an error is thrown, and the Device Mapper base class or default class is returned in block 374. If a Device Mapper is returned, then in block 376, an identifier or name of the returned class is stored in the current Container object. FIG. 3E is a block diagram of a preferred implementation of the GetMapperForID method 368. Generally, the GetMapperForID method 368 receives an OID, maps the OID to a device-specific Device Mapper, and returns the Device Mapper class name. In block 380, the OID passed to the method is scanned to determine whether it is a version OID, as tested in block 382. In a preferred embodiment, the colon character (":") in an OID is a version separator, and block 380 involves scanning the OID for a colon character. If the OID is not a version OID, then in block 384 a Device OID table is scanned and an entry corresponding to the OID is read. As a result, a mapper for the OID is obtained. In block 386, the name of the Device Mapper found in the Device OID table is returned to the calling method. If the OID is a version OID, then in block 388 a portion of the OID that excludes the version information following the colon character is extracted, and used in subsequent blocks as the OID. In block 390, a Device Mapper is located that is appropriate to the OID portion. Preferably, the steps of block 390 involve the same steps as block 384; the same function call or subroutine can be used. In block 392, a Device Mapper is located for the version portion of the OID. If the version Device Mapper is found, as tested in block 394, then it is returned in block 398. If not an error message is issued, as shown in block 396, and the Device Mapper for the OID stored into the Container object. If no device mapper is found, either for the OID or for the Version OID, then the default DeviceMapper is stored in the Container object. Thereafter, references to Service Module classes of the Container object will be appropriately mapped into the appropriate device-adapted class. The Handle Versions method 358 provides a mechanism to locate a Device Mapper based not only on OID but also on a version identifier. In standard MIB variables, software version information is not included. Therefore, a separate mechanism is required to enable the ANI 50 to match a particular version of hardware, software, or firmware of a device 102 to a Device Mapper. Preferably, entries in a Device Mapper may include information that specifies a range of versions over to which the Device Mapper applies. For example, the entries may provide version brackets indicating that a particular Device Mapper is chosen only within a particular range of versions, or from a particular version and all subsequent versions, etc. The format of a version range, as specified as part of an OID when registering a DeviceMapper, is as follows: <openingBracket><lowerBound>, <upperBound><closingbracket> If there is a <lowerBound>, but no <upperBound> then: 1. if <openingBracket> is a left parenthesis ("("), then the entry applies to versions whose version string is greater than <lowerBound>. 2. If <openingBracket> is a left bracket ("["), then the entry applies to versions whose version string is greater or equal to <lowerBound> If there is <lowerBound> and an <upperBound> then: 1. if <closingBracket> is a right parenthesis (")"), then the entry applies to versions whose version string is treated as above for the <lowerBound> but which is less than <upperBound> 2. if <closingBracket> is a right bracket ("]"), then the entry applies to versions whose version string is string is treated as above for the <lowerBound> but which is less than or equal to <upperBound> If there is no <lowerBound>, but only an <upperBound>, the entry applies to versions with no lower bound but which is treated for <upperBound> as in the case for <lowerBound> and <upperBound>. USING DEVICE MAPPINGS TO PARTICULARIZE FOR A SPECIFIC DEVICE Using the data structures and mappings established by the foregoing mechanisms, Service Module Functions may be instantiated in a device-specific manner at runtime when a service is needed by an application. Generally, the process resulting in such instantiation is called invocation. In operation, in general, an application such as network management system 40 requests a service of a Service Module 54a by sending a message to the Service Module requesting the service. The Service Module may gather a collection of Containers representing devices, for example. When a particular service is requested of a particular device in a particular Container, by using a Service Module Function, the Device Mapper object associated with the Container object mediates the reference to the method, finds the appropriate method, instantiates it, and makes it available as the code to be used for the current managed device 102 for the current Container object. FIG. 3F is a top-level flow diagram of one embodiment of an invocation process. In block 1302, one or more devices are discovered in the network 100. Block 1302 is executed, for example, in response to a request by an application program to carry out some function relating to devices 102 in the network 100. When a device is encountered in the network 100 for the first time, as tested in block 1304, then in block 1306 an identifier of the device indicating its type is obtained. For example, a unique value called a sysObjectID is obtained from the device. When the ANI 50 is initialized, it constructs a list 1308 of sysObjectIDs that it recognizes and can manage. In block 1310, the ANI tests whether the acquired sysObjectID matches one of those loaded by ANI at start-up time. If so, then in block 1314 a Container object is created for the device, and in block 1316 an appropriate device type handler (a device mapper 1214) can be instantiated. If the sysObjectID is not recognized in the test of block 1310, then in block 1312 the device is treated as unknown, and UnknownDeviceMapper is used. In block 1318, the version of the device is determined. The determination of block 1318 is done in a device type specific manner. In block 1320, the device specific information is integrated into the Container object. Preferably, as a consequence of ANI 50 determining a device's type and version, an instance of a Device Mapper is stored in the Container object. Thereafter, the Service Module Functions used to perform services for that Container are selected to be appropriate to the selected device and version. FIG. 3G is a flow diagram of another embodiment of an invocation process. In block 1330, an application such as network management system 40 is executed. In block 1332, the application calls a method of a Service Module passing it some kind of device identifier, for example, an IP address. In block 1334, the Service Module method is executed. Part of the execution of the Service Module method is the translation of the device identifier into a reference to a Container object. Box 1336 shows invocation processes. In block 1338, a Device Mapper 1214 associated with the Container object is invoked. In block 1340, a version of the Service Module Function called in block 1332 and that is appropriate for the current device type is located. In block 1342, the device-specific Service Module Function is instantiated or retrieved. In block 1344, the reference to the device-specific Service Module Function is returned to block 1338. In block 1346, methods of the device-specific Service Module Function are executed, and the application thereby is serviced. In block 1348, control returns to block 1334 or subsequent processes. FIG. 3H is a flow diagram of a preferred process for finding and instantiating a device-specific Service Module Function as indicated in block 1340 and block 1342. Block 1350 generally refers to the initialization process that is shown in FIG. 3B, FIG. 3C, FIG. 3D, and FIG. 3E. Generally, the process of FIG. 3H involves receiving a device OID and a corresponding Device Mapper, and then instantiating device-specific classes that implement the requested Service Module Function. Each Device Mapper 1214 includes an initialization method named InitializeLocalMappingTable and a Boolean instance variable _SMFMappings. The instance variable _SMFMappings is structured as a hash table that stores a mapping of classes that are needed for the current Service Module Function for the current device. Initially, _SMFMappings is set to a null value, and it is filled with mapping values the first time that a particular device invokes the current Device Mapper 1214. Accordingly, in block 1352, the value of _SMFMappings is tested, and if it is null, then an InitializeLocalMapping method 1354 is executed. In the preferred embodiment, each Device Mapper 1214 includes a InitializeLocalMapping method that does mapping for the Device Mapper. However, this embodiment is used only due to certain inheritance restrictions of the JAVA.RTM. language. In an alternative embodiment, there is one InitializeLocalMapping method for all Device Mappers. According to the InitializeLocalMapping method 1354, in block 1356 the _SMFMappings instance variable is initialized as a hash table. The InitializeLocalMapping method 1354 scans through all the Service Module Functions that are listed in the Service Module Function name column 318 of the current Device Mapper 1214, as indicated in block 1358. For each Service Module Function named in the Device Mapper 1214, in block 1360, a method is called to integrate overrides of that Service Module Function into the _SMFMappings hash table. Preferably, an Integrate Method is called in block 1360 and is passed the hash table and the Service Module Function name. In the IntegrateMapping method, as shown in block 1362, in the override list 320 of the Device Mapper 1214, the ANI 50 finds the next Service Module Function name that matches the current class name. For example, consider a situation in which the current directory name associated with the device type is "C5000", and the Service Module Function named in column 318 of the current Device Mapper 1214 is "VLADSMFGetDeviceDetails". In block 1362, the Service Module Function name is concatenated with the current directory name to yield an overriding Service Module Function name. The overriding Service Module Function must be named <directoryname><genericname>. Thus, for device C5000 and Service Module Function VLADSMFGetDeviceDetails, the overriding Service Module Function name would be "C5000VLADSMFGetDeviceDetails." The foregoing implementation is known to be required due to limitations on class name duplication inherent in the JAVA.RTM. language. In an alternative embodiment, names of overriding classes are the same as overridden class names, but are located in a sub-directory named after the device. For example, an overriding class would be com.cisco.nm.ani.devices.C5000.VLADSMFGetDeviceDetails. In block 1364, the device OID, overridden class name, and the corresponding overriding class name are stored in the hash table. In an embodiment, the values are stored in the _SMFMappings instance variable local to the current Device Mapper. The designation of the hash table _SMFMappings as a local instance variable is an important aspect of this embodiment. Consider the foregoing example in which the method C5000.C5500DeviceMapper is the Device Mapper 1214 for a C5500 device. It is a subclass of the method C5000DeviceMapper, which is the Device Mapper for C5000 devices. Consequently, when the JAVA.RTM. operation super is executed in the C5500 DeviceMapper, it causes the C5000 device mapper to be executed in the current local context. Therefore, the _SMFMappings hash table of the C5500 device mapper is used by the C5000 device mapper. Accordingly, the C5500 hash table is populated with overrides associated with the C5000 device mapper. Then the C5500 Device Mapper executes and populates the hash table with its device-specific overrides. As a result, if the C5500 Device Mapper overrides a class that the C5000 device mapper also overrides, the C5500 Device Mapper will predominate, because it will overwrite the conflicting entry previously stored in the hash table by the C5000 device mapper. In contrast, if the C5000 device mapper stores a hash table entry that the C5500 Device Mapper doesn't override, then the hash table contains only the C5000 override. If neither Device Mapper stores an override for a particular Service Module Function, then the default class is eventually instantiated. Thus, using an instance variable in the Device Mapper, but invoking each superclass and letting it fill the local variable itself, results in a general inheritance model for device-specific class adaptation. Using inheritance mechanisms of an object-oriented programming language, classes that define Service Module Function behavior are incrementally added to an override mapping. Once the hash table is initialized and filled, one or more device-specific Service Module Function classes may be instantiated, as shown in FIG. 3H, in block 1366. For example a device specific GetDeviceDetails Service Module Function class is instantiated during device discovery. The GetDeviceDetails SMF implements methods that carry out detailed device discovery functions such as fetching modules. In block 1368 and subsequent blocks, overrides are handled. Preferably, in block 1368, the current Container object is passed to a GetData method, details of which are shown in FIG. 31 which is described elsewhere herein. A function is called in order to retrieve an index into the hash table that identifies the device-specific Service Module Function instance. As shown in block 1374, processing occurs to determine which instance is needed, and the result is an index value. The index value references an entry in an ordered sequence that is particular to the current device. The ordered sequence contains references to instantiated Service Module Functions, as shown in block 1376. In block 1377, the instance is returned. Using the steps of block 1368, block 1374, and block 1376, and block 1377, a particular instantiated object that implements a Service Module Function is obtained based on a device mapper and the name of the generic Service Module Functions. Consider an example in which the generic Service Module Function name is VladSMFGetDeviceDetails. There may be dozens of such functions defined, each for a particular device type. Based on the device mapper in the current Container object, the GetData method computes the proper index and gets the particular instance from the ordered sequence of Service Module Functions contained in the Container object. In block 1370, a determination is made as to whether an overriding Service Module Function is already instantiated. If the test of block 1370 indicates that the Service Module Function has been instantiated before, then in block 1372, a device identity is obtained. If the test of block 1370 indicates that an instance has not been created, then control is passed to a Get Function method 1378 in order to create such an instance. FIG. 3I is a flow diagram of a preferred embodiment of a GetFunction method 1378. Generally, the purpose of the GetFunction method 1378 is to create an instance of a Service Module Function, taking into account device-specific mapping. Based on a Container object and its device mapper, a device-specific class is retrieved. Preferably, a parameter to the GetFunction method 1378 is a generic instance of the Service Module Function that contains identification information. In the preferred embodiment, the identification information is an index into the Containers Service Module Function list 76. In block 1379, a determination is made as to whether Container contains a device-specific service module function instance as defined by the passed generic instance. If so, then in block 1390 the Service Module Function instance is returned to the caller If the test of block 1379 is negative, then control is passed to block 1381, in which a Service Module Function object is instantiated. In block 1380, the Device Mapper 1214 associated with current Container object is retrieved. In block 1382, the requested Service Module Function is looked up using the Device Mapper 1214. If an override exists, as tested in block 1384, then the overriding Service Module Function is instantiated in block 1388 and stored in the Container object in block 1389. As a result, in block 1390, the mapped Service Module Function version appropriate to the particular Device Mapper associated with the current device is returned. If there is no override, then the generic version of the SMF is instantiated in block 1386 and processing continues in block 1389. At this point, the device-specific Service Module Function is available for passing back in the GetData method. Consider an example in which a Service Module defines a generic service module function class VLADSMFGetDeviceDetails that defines a particular abstract behavior. The directory 300 also contains a class C5000VLADSMFGetDeviceDetails that defines overriding behavior for a C5000 type device. Generally, there are far more methods in the generic class than the specific class; accordingly, the specific class for device C5000 only overrides specific behavior that is inappropriate for the C5000 device. Indeed, for a given device type, there may be only one overriding class and, perhaps, only one overriding method. In this example, block 1380 involves identifying the class name of the generic function that was passed in, e.g., com.cisco.nm.cwsi.ani.VLADSMFGetDeviceDetails. A function name segment of the full class name is extracted, e.g., VLADSMFGetDeviceDetails. The Device Mapper known to the SMFContainer in which the properly overridden version instance of VLADSMFGetDeviceDetails is to be stored Device Mapper is consulted, and its mappings are examined to identify a function associated with the function name. If there is none, then in block 1390 an instance of the prototype function is returned. If there is a function found, an instance of it is returned in block 1390. Preferably, block 1388 involves getting the device-specific class and instantiating it. Block 1389 stores it in the Container object. Thus, after the mappings shown in FIG. 3A are established, a reference to a generic Service Module Function will cause the function to instantiated in a form that is appropriate and customized for the current device. The customized class is selected based on the OID and version of the current device. Moreover, the mapping mechanism described herein is not dependent upon the content of the identifiers that are used in mapping. For example, the mapping need not use a SysObjectId or OID; it may use any other identifier. Using the foregoing mechanisms, the ANI 50 integrates with itself, service modules and device definitions. As part of the foregoing mechanisms, information about a new device is integrated with the ANI 50 through simple steps. A programmer determines the operational differences between the new device and prior devices. A new directory 300 is created for the new device within the current directory structure, below the most closely related device. A Device Mapper 1214 is created. OIDs for the new device are declared in the Device Mapper. One or more Service Module Functions are written to implement those attributes of the new device that are different from its most closely related device. The Device Mapper and Service Module Functions are distributed, for example, by download to users of the ANI 50. A user of ANI 50 downloads classes for the Device Mapper and Service Module Functions into the user's directory tree. The user restarts the ANI 50 and the new information is automatically integrated. This mechanism is highly advantageous. Some network devices vary in subtle ways from other devices, but also run the same software in general. For example, some new device types represent refinements of device hardware only, whereas some new device types represent new versions of software executed by the device. In prior approaches, an application programmer is required to hand replicate processing common to an existing device into a class that governs interaction with a related but slightly different device. In the preferred embodiment, such hand replication is eliminated, thereby greatly reducing application development time and lessening the likelihood that bugs are introduced. 5. EVALUATION OF THE ORDER OF EXECUTION OF SERVICE MODULE FUNCTIONS In the preferred embodiment, the ANI has a mechanism providing dynamic determination of the execution sequence of processes. The mechanism comprises a set of executable components, a characterization mechanism, a partial order mechanism that depends on the characterization mechanism, and a partial order execution mechanism. The set of executable components completely describes the processing to be performed for some component of, for example, the managed devices at a particular time. If a new requirement must be satisfied by additional executable components, the additional executable components are added to the set. In the preferred embodiment, the executable components are Service Module Functions, and the dynamic determination of execution sequence involves evaluation of partially ordered Service Module Functions. The characterization mechanism provides an annotation of each executable component, permitting reference to each component in other parts of the mechanism. The partial order mechanism establishes order among a set of Service Module Functions 76a-76n. Each Service Module Function declares "pre-conditions" that represent one or more dependencies of the Service Module Function on another Service Module Function. During the startup phase of the ANI 50, all Service Modules and all Service Module Functions are subject to several types of evaluation. One evaluation determines execution order. Execution order is determined by grouping Service Module Functions into execution equivalence classes. An execution equivalence class is determined by the TimeBase of each Service Module Function. A Service Module Function may have several timebases and, thus, be a member of several equivalence classes. Within each equivalence class, each Service Module Function is placed in relation to each other Service Module Function of the equivalence class through an examination of the "pre-conditions" belonging to the Service Module Function in the equivalence class. The partial order mechanism depends upon the characterization mechanism. The partial order mechanism enables a first executable component to declare which other components are "pre-conditions" to the first executable component. In this context, a component that is a "pre-condition" to a first executable component means that the other components must be executed before the first executable component. Each pre-condition comprises one or more characterizations. The partial order execution mechanism schedules or orders the executable components into a final execution order, by evaluating the characterizations and pre-conditions. Newly introduced components are added to the execution order when the partial order execution mechanism runs. In the preferred embodiment, the executable components are Service Module Functions. FIG. 2C is a block diagram of a preferred structure of a Service Module Function 76a. Service Module Functions 76a-76n are self-describing using metadata that describes the needs and the services provided by the Service Module Function. The ANI 50 uses the metadata to determine when a Service Module Function must be invoked, the kind of data it requires, and whether resources it requires are available in the system. Preferably, the metadata comprises a TimeBase value 1202, a PreCondition value 1204, a Unit value 208, an isAllRequired value 1210, and an Apply method 1212. Each TimeBase method 1202 returns a value indicating when the current Service Module Function is performed. In the preferred embodiment, each TimeBase method 1202 may return a value of Periodic, Fixed, or Demand. The Periodic value means that the Service Module Function is executed periodically when the system does, for example, device discovery. The Fixed value means that the Service Module Function is executed at a fixed time. The Demand value means that the Service Module Function is executed immediately, upon request by the user. Use of these values in partial order evaluation and execution is described below The PreCondition value 1204 identifies preconditions for the current Service Module Function 76a, i.e., Service Module Functions that must be executed before the current Service Module Function module. In the preferred embodiment, a PreCondition value 1204 is a set of Category names 1206a, 1206b-1206n. In the preferred embodiment, each Category name 1206a-1206n of a precondition refers to a category name 203 in an SMFDescription 1201 of some Service Module Function. A category name 203 is unstructured. By convention, category names are a series of words separated by periods ("."). Generally, the words, in order, include the name of the TimeBase, the name of a phase of computation, and an abbreviation of the SMF name. For example, a Category name might be the following: "Discovery.Acquire.GetIdentity". Conventionally, this means that the named SMF is intended to run in the Discovery timebase during the Acquire phase and it is the GetIdentity Service Module Function. The Category name 1206a-1206n may comprise either a set of names that explicitly correspond to names of SMF objects, or one name that contains a wildcard character. An example of a name having a wildcard character is "Discovery.Acquire.*". When a name containing a wildcard character is specified, the name signifies that all modules characterized by the wildcard must be executed before the current module. However, all the modules characterized by the wildcard may be executed in any order among themselves. Preferably, each execution equivalence class is organized in a partial order graph with a linear execution order. For example, in the preferred embodiment, the ANI maintains one or more node objects, called SMFDefinitionPONode objects, in a data structure having the form of a directed acyclic graph. Each SMFDefinitionPONode object stores a name and a set of SMFDefinitionPONode objects. The name is the category of the node. Pre-conditions are category names and category name patterns. The set of SMFDefinitionPONode objects identifies successors of the SMFDefinitionPONode object. Each successor represents a module that must be executed after the module identified by the name. Also preferably, the partial order mechanism provides methods by which SMFDefinitionPONode objects may be inserted into or removed from a tree of SMFDefinitionPONode objects. Each Unit value 208 identifies an object type that is to be used by the current Service Module Function 76a when that module is to be executed. For example, a Unit method 208 may return the value "Topology", which indicates that current Service Module Function 76a operates on objects of type "Topology". Also, in the preferred embodiment, each Service Module Function 76a contains a isAllRequired value 1210 that is a Boolean value TRUE or FALSE depending on whether the Service Module Function operates on a single object of its Unit type or all objects of its Unit type. For example, if a Service Module Function operates with the information of a single device, then isAllRequired value 1210 for that Service Module Function would be FALSE. Thus, each PreCondition method 1204 and TimeBase value 1202 defines a location in a partial order of execution of the Service Module Function. Before a Service Module Function can be executed, it must be placed in its proper position in the partial order and a complete ordering must be generated. A Service Module Function is then executed depending upon the schedule of its timeBase (on a periodic schedule, at fixed times, or on demand) In the preferred embodiment, during system start-up, all Service Module Functions are examined by the partial order mechanism. Based on the partial order information provided in the TimeBase value 1202 and PreCondition value the partial order mechanism constructs a memory representation of the partial order of execution of all the Service Module Functions. FIG. 2D is a diagram of a preferred memory representation, structured as a directed acyclic graph 1220. Each node 1222-230 of the graph 1220 is a SMFDefinitionPONode object. Each node 1222-230 represents a Service Module Function. The structure of the graph 1220 represents the pre-conditional relationships of the Service Module Functions. For example, node 1226 and node 1232 both have node 1234 as a pre-condition. Node 1224, node 1236, and node 1238 all have as a precondition node 1240. Nodes 1240, 1238, and 1236 are all pre-conditions of node 1224. The graph 1220 is constructed by scanning each Service Module Function and examining each TimeBase value 1202 and PreCondition value. Based on these values, an SMFDefinitionPONode object is instantiated and inserted into graph 1220 using an appropriate insert method. All graphs 1220 have a root node 1230. A root node is not a pre-condition of any node and has no preconditions. The root node serves as a starting point for the graph. A node "a" is at "layer n" just in case there are "n" nodes between the root of the partial order tree and node "a". A node "a" is "higher in the partial order tree than" a node "b" just in case "a" is on layer k and "b" is on layer "j" and "k" is less than "j" numerically. "layerSet n" in the partial order tree is the set of all nodes whose layer is n. The depth of a partial order tree is the value "n" which is the index of the layerSet none of whose nodes has successors. FIG. 2G is a flow diagram of an exemplary method for building the graph. In block 262, a new node is created. In block 264, the graph into which the new node is to be inserted is selected, based on the TimeBase value. There are two phases of insertion: adding nodes to the partial order; and reducing the partial order, as indicated by block 266 and block 268, respectively. FIG. 2H is a flow diagram of an exemplary method for adding a new node called "new-node" to the partial order tree. In block 268, the root node is made as the "current-node". In block 270, each of the successors of the current-node is examined in turn, making them "current-successor" in turn. When there are no more successors, control passes to the step of block 278 that is described below. As indicated in block 272, if the new-node is a pre-condition of the current-successor node, then the current-successor node is removed from the set of successors of current-node, and current-successor is made a successor of new-node. As shown by block 274, if the current-node is a pre-condition of the new-node, then the new-node is made a successor of the current-node. As shown by block 276, the next step is to recursively make current-successor current-node and proceed with the step of block 270. When all successors have been processed, the test of block 270 is false, and control passes to block 278. There, if the current-node is the root node, then new-node is made a successor of current-node. In block 280, the process is complete and a return occurs. Cleaning up the tree proceeds as follows. First, all nodes of the partial order tree are unmarked. Next, the process proceeds through all layerSets of the partial order tree, one layer at a time, marking each node of the layerSet with the node of which it is a successor. For example, at the end of this phase node 1224 will be marked with node 1238 or node 1236. Since node 1238 and node 1236 are equivalent because they are in the same layerSet, it does not matter which has node 1224 as its successor. The process then proceeds through all layerSets of the partial order tree, one layer at a time, removing from each "current-node" successor set any "successor-node" of a "current-node" whose mark is not "current-node". For example, at the end of this phase, node 1240's successor set will no longer contain node 1224; node 1238's successor set will contain node 1224. Then, if the root node has successors in more than one LayerSet, the tree is not well formed; otherwise it is well formed and cleaned. After the partial order tree for a given timeBase has been cleaned, the linear order of execution of the Service Module Functions of the tree is computed. Because the structure of a partial order tree does not change after it has been initially built, it is permissible to construct the linear order as soon as the tree has been cleaned. The linear order preserves the pre-condition constraints but guarantees nothing about any other ordering of execution. For example, when the partial order graph 1220 is linearized, the following will be true: node 1238 will be earlier in the order than any of node 1222, node 1224, node 1226, or node 1232; nothing is said about the position of node 1238 with respect to nodes 1236 or 1234-node 1238 could be before, between, or after nodes 1236 and 1234. Linearization is done as follows. First, the node-number is initialized to zero ("0"). Then, the process traverses each layerSet, starting with layerSet 0 and proceeding to layerSet n in which n is the depth of the partial order tree. For each node in the current layerSet, the current node-number is assigned, and the node number is incremented after each assignment. For example, if there are seven nodes in the current layerSet and the current value of the node-number is "11" then the first node is assigned number "11"; the next is assigned "12"; and so forth until the last node of this layer set is assigned the number "16". Thereafter, the linearized order of the nodes of the partial order tree is the order that results from selecting the nodes in the order of their node numbers. In the preferred embodiment, the timeBase execution mechanism is carried out at several different times during execution of ANI, as indicated by the TimeBase values. For example, ANI periodically carries out a general discovery of all devices in the managed network 100, and a linearized order evaluation is carried out upon such discovery. The name of the TimeBase that carries out discovery is Discovery and it is a periodic timeBase. Generally, the periodic general discovery is carried out every 30 minutes. Also, ANI periodically carries out a "major sweep" operation. For example, several times during a day at fixed times, ANI "sweeps" the managed network 100 to retrieve information that identifies users, hosts, and other networking information. Each time a "sweep" is performed, the Service Module Functions are invoked in linearized order. For example, in one embodiment, there are two timeBases which carry out "sweeps": MajorSweep which is a fixed time base typically set to run at 10:00 AM and 2:00 PM; MinorSweep which is a periodic time base typically set to run at an interval of 10 minutes. Further, ANI provides demand operations in response to unscheduled, non-periodic requests. For example, certain applications, such as the VLAN Director application commercially available from Cisco Systems, Inc., explicitly change the configuration of devices. When such explicit changes are performed, a Demand type timeBase is used and its linearized execution is performed as in block 636 of FIG. 6D. In the preferred embodiment, a separate graph 1220 is maintained for each of TimeBase. At each of these times, the linearized execution mechanism is carried out. In an embodiment, a linearized evaluator is invoked and is passed a set of things to evaluate and a partial order tree of service module functions that are to be applied to the sets. In the preferred embodiment, a partial order execution method EvalGroup is executed and is passed an object representing a graph 1220. 6. PERSISTENT OBJECT STORAGE In the following discussion, the use of persistent object storage mechanisms in various ANI 50 mechanisms is described, and then the internal operation of the persistent object mechanisms is described. In the preferred embodiment, each programmatic object and its contents that are used in Service Modules 54 and the other mechanisms described herein may be stored persistently in the database 60. Also in the preferred embodiment, each programmatic object is a JAVA.RTM. language object A single declarative mechanism is provided that permits all definitions of internal to external mappings to be specified as part of the class to be stored itself. The mechanism automatically schedules the loading and storing of information to and from the external database without intervention by the programmer. In a preferred embodiment, the mechanism has five (5) components: 1. A metadata definition that describes all aspects of the persistent data, including table definitions, constraint definitions, notification definitions and a revision history that defines upgrades from version to version. 2. A Write Object method that provides a mapping between the elements of program objects and the columns of the database table that are declared in the metadata definition. 3. A Read Object method that provides a mapping between the columns of the database table that are declared in the metadata definition and the elements of program objects. 4. A Resolve method that binds a first object to other objects of the system that are referenced as elements of the first object, or from which the first object inherits properties and behavior. 5. A set of state-setting methods that enable objects to be marked for deletion and updating. Each component is defined using a semi-declarative mechanism. In this context, "semi-declarative mechanism" means that each component comprises program structures that consist almost exclusively of method calls that construct static or dynamic data structures. Preferably, the mechanism operates in conjunction with a primary store and a secondary store. The secondary store is a direct mirror or backup of the primary store rather than an extension thereof. In this context, "extension" means that not all objects are in the primary store, and the secondary store is queried when an object is not available in the primary store. In contrast, in the preferred embodiment there are no requests for objects from the secondary after an initial load. When a request for an object is made, the primary store is accessed only. When primary store is changed, secondary store is automatically update to ensure that it is synchronized with primary store. A partial order is specified for updating the secondary store in which foreign key constraints of the secondary store are preserved. When the secondary store is to be updated, a closure operation is carried out before the secondary store is modified. In particular, all modified objects referenced by a first object must be included in any update to the first object. The identity of objects referenced by a first object is stored in the metadata definition. Generally, it is preferred to use main memory of a computer system as the primary store and a database stored in a persistent storage device as the secondary store. The database is, for example, SQL Anywhere, the Sybase.RTM. SQL Server, or an Oracle.RTM. relational database system. However, a specific database is not required as the secondary store; any other data storage mechanism is suitable. The reader is presumed to be familiar with structures, functions, and terminology relating to relational database systems, such as tables, stored procedures, indexes, triggers, and referential constraints. The database 60 implements these structures and functions and responds to statements issued in the Structured Query Language (SQL). 6.1 Persistent Objects In the preferred embodiment, a Persistent Object class is the root class of all persistently stored objects. In one embodiment, all classes in an application program that require persistent storage in the database must inherit from the class PersistentObject. The behavior of Persistent Objects is defined in the class PersistentObject. In particular, the class makes use of metadata definitions. Therefore, every persistent object must define metadata that is used to manage it. In an alternate embodiment, a class that uses persistent storage inherits persistence behavior from a plurality of classes that implement components of persistence behavior. For example, to store an object persistently in the ANI 50, a programmer configures an object to inherit properties of the Persistent Object class. FIG. 7A is a diagram of a Persistent Object class 700 and its relationships to other elements of the ANI 50. The Persistent Object class 700 is a superclass of a Service Module Function (SMFunction) class 702 and of the Container class 704 and other support classes. The Persistent Object class 700 contains methods Dirty 706, markDirty 708, writeObject 712, and readObject 710. Preferably, in the ANI 50, one or more Persistent Objects are integrated with the Service Module Functions 76a-76n. In particular, the writer of a Service Module Function 76a-76n configures the Service Module Function object or helper object to declare its metadata as a POMetaData object 715. When each Service Module Function 76a-76n sets values of persistent data objects, it invokes the markDirty method 708 to indicate that the values of the objects have changed. Each Persistent Object 80 has a metaData( ) method 714 that returns the POMetaData object 715, and implements a writeObject method 712 and readObject method 712 to write and read the persistent data. In the preferred embodiment, the Dirty method 706 returns a Boolean value. The Boolean value is TRUE when the persistent data in the object has changed since the last load or store operation, and FALSE when persistent data in the object has not changed since the last load or store. The Mark Dirty method 708 sets an object's "dirty" state to TRUE, indicating that persistent data in this class has changed. Preferably, in each persistent object, a Dirty instance variable indicates the current state of the object's persistent data objects. When object values are initially loaded from the database, each associated persistent object is marked "clean" by setting Dirty FALSE. Similarly, when the persistent data objects are stored to the database, the persistent object is also marked "clean". The "dirty" state determines whether to actually store the contents of an object to the database 60 when the Write Object method 712 is invoked for that object. In the preferred embodiment, when it is time to update secondary storage all objects which were marked dirty are written to the database 60. Persistent Objects operate within a set of constraints. The data of a subclass of the PersistentObject class are stored in a single table, if they are stored at all. If an object is a hierarchy of subclasses of PersistentObject, then each of the intermediate classes stores its data in a table specific to that class. Thus, although an object may be stored in several tables, a class only stores its data in a single table. If there is an object that stores its data is several tables, then identity of the stored object is the highest class in the hierarchy below the PersistentObject class that stores data. That identity, which is a unique object identifier, is stored in each of the tables storing the object with each row of those tables comprising the object's data. This relationship is automatically determined by the Persistent Object method at runtime. Preferably, the mechanism includes other methods for marking the state of an object in the database and in association with each object. The possible states of each object are NEVER WRITTEN; MODIFIED ("dirty"); TO BE DELETED; and TRANSIENT. In this context, "Transient" means that an object is created and exists in main memory, but is not stored in the database. 6.2 Database Schema FIG. 7F is a block diagram of inter-related persistent objects in a hierarchical relationship. An LS1010VLADInterface object class 774 is declared in ANI to represent a port of an LS1010 device. The LS1010VLADInterface object class 774 inherits from VLADPort class 772, which represents ports for the purposes of a VLANDirector application. The VLADPort class 772 inherits from a VLADInterface class 770 that generically represents device interfaces for the purposes of the VLANDirector application. FIG. 7G is a block diagram of a portion of a schema of tables in database 60 used in the persistent object storage mechanisms. Each class 770, 772, 774 is associated with a table 776, 778, 780 of the database 60. Each table 776-780 stores data values of an object instantiated from the class associated with that table. For example, a first table 776 named "WBULS1010Port" stores data values for objects of class LS1010VLADInterface. A second table 778 named "WBUPort" stores data values for objects of class VLADPort. A third table 780 named "WBUInterface" stores data for objects of class VLADInterface. Each row of the tables 776-780 stores information identifying an object instance and its class, and values of fields of the object. In particular, each table 776-780 has columns that store an object identifier and a class identifier. An object identifier, called a DBID, uniquely identifies an instance of an object used by the ANI 50 at any time during its execution. A class identifier, called a Class DBID, uniquely identifies a class existing in the system. For example, the WBULS1010Port table 776 has a DBID column 782 and a Class DBID column 784. The WBUPort table 778 has a DBID column 788 and a Class DBID column 790. The WBUInterface table 780 has a DBID column 794 and a Class DBID column 796. Each table also has one or more columns that store object data. For example, the WBULS1010Port table 776 has a plurality of data columns 785, each of which stores a value of a particular field of an object instance. The data columns 785 may store scalar values, such as integers, strings, and floats, in which case the actual data value is stored in the column, and the type of the column matches the type of data stored therein. Alternatively, the data columns 785 may store references to other objects, in which case the data columns are of type DBID. Each table stores data only for instances of the class with which it is associated. Accordingly, data of an object instantiated from a class having more than one superclass, of which more than one class definition includes persistent object metadata, is stored in multiple tables. For example, class LS1010VLADInterface 774 inherits from two parent classes, as shown in FIG. 7F. Row 798 of table 780, row 792 of table 778, and row 786 of table 776 each represent data for the same instance of class LS1010VLADInterface 774 when it is stored in the database 60. Each of rows 798, 792, and 786 has a DBID value "89" stored in its DBID column, which indicates that the rows hold data for the same instance. However, table 780 stores only data for fields of the LS1010VLADInterface object that are defined by class VLADInterface. Table 778 stores only data for fields of the LS1010VLADInterface object that are defined by class VLADPort. Table 774 stores only data for fields of the LS1010VLADInterface object that are defined by class LS1010VLADInterface. Thus, a key aspect of the preferred embodiment is that hierarchical objects are decomposed into component parts, and the data that comprises the object is stored without redundancy in class-specific tables. This is a unique contribution to the management of objects into a secondary store. Each of rows 798, 792, and 786 also stores the same Class DBID value, "46", in its Class DBID column. A Class Table 1700 maps Class DBID values to classpaths. As shown in FIG. 7G, the Class Table 1700 has a Class DBID column 1702 that stores Class DBID values. Corresponding classpaths are stored in a classpath column 1704. Using the Class Table 1700, ANI 50 can locate a class definition based on a Class DBID value. The term "classpath" is used in the customary sense of the JAVA.RTM. language. The Class Table contributes to extensibility of the system, because new classes can be supported by adding new rows for the new classes added to the Class Table. In the preferred embodiment, the Class Table 1700 is dynamically built during execution of the WriteToSQL method. When WriteObject executes, it obtains the appropriate class list dbId for the class of the object being written. If no such dbId exists, a new ClassList object is created for this class and its dbId is used. Preferably, the ClassList object itself is stored in the database 60 as a persistent object. Special bootstrap methods handle creation of ClassList instances at system startup time and when new ClassList instances are created. 6.2 Persistent Object Metadata Each persistent object 80 uses the persistent storage mechanism based on a metadata description 714, a set of data accessor methods, and data base load and store methods 718. The metadata description, accessor methods, and load and store methods are declared in persistent object, or inherited by it. To store and load persistent data using the database 60, a class must create metadata. The metadata describes all aspects of the persistent data, including table definitions, constraint definitions, notification definitions and a revision history that defines upgrades from version to version. The metadata defines the structure of data stored in the external database. In particular, the metadata defines relationships between fields of an object class and columns of tables in the database; thus, the metadata definition defines the table structure used by a class. The rationale of the metadata definition is that it is important for each class to contain all information needed to instantiate the class in the database, including the metadata that the database requires. Information in the metadata definition is used, among other things, to ensure the consistency of the secondary store, and to create for insertion or update, rows, and to create the data necessary to read from a table; it also defines references to other objects. During the load process, metadata declarations for all persistent object classes are analyzed and an error check analysis is carried out. The analysis is done statically, and the result is maintained within the ANI 50 for reference throughout the load and store process. During this analysis internal consistency is verified. In the preferred embodiment, as shown in FIG. 7B, a POMetaData object 715 comprises a mapping 720, indexes 724, triggers 726, and referential constraints 728. In addition, the class must provide a Metadata method 714 that returns the POMetadata object 715. The Metadata method 714 is supplied by the programmer who prepares one or more persistent objects 80. A Persistent Object that takes part in an inheritance hierarchy and stores data other than that stored by the inherited classes must also implement metadata, which enables the ANI 50 to keep track of the necessary tables and data attributes that are written. The mapping 720 correlates class's persistent objects to database items. The block labeled Indexes 724 is a list of the indexes required by this class. The block labeled Triggers 726 is a list of the triggers required by this class. The block labeled Referential constraints 728 is a set of referential constraints applicable to the class. In the preferred embodiment, the POMetaData object 715 is defined in the FrameWork 210 of the ANI 50. The POMetaData object has helper objects called POMember, POStoredProcedure, POIndex, POTrigger and POConstraints that respectively implement mapping 720, indexes 724, triggers 726, and referential constraints 728. Preferably, a POMetaData object 715 also identifies a table of the database 60 that its Persistent Object data is stored to and loaded from. In the preferred embodiment, a Persistent Object creates a POMetaData object 715 to operate on a specific table by issuing a method call having the form: POMetaData myMetaData=new POMetaData(<className>, <tableName>); in which <className> is the name of the persistent object class, and <tableName> is the name of a table of the database 60. When a POMetaData object 715 is instantiated, code in the Persistent Object class 700 creates empty instances of each of its helper objects and defines the local table name. The Persistent Object class 700 then populates the POMetaData object 715 as described below. Mapping 720 describes how to store and retrieve a persistent object's persistent data, by defining a POMember object 730 in the POMetaData object 715. In the preferred embodiment, the Mapping 720 is invoked using one of several methods generally of the form myMetaData.addMember(<columnName>, <dataType>, <comment>); in which <columnName> is the name of a database column, <dataType> is the type of the data of the object that is to be stored in the database 60, and <comment> is a comment. Thus, the Mapping 720 maps persistent instance objects to columns in tables of the database 60. In the database 60, each persistent object has a table. Each row of the table represents an object instance. Each column of the table represents a data type of the object or an element of the object's abstract data type. To indicate a referential constraint between a column of one table and a column of another table in the database 60, a persistent object class adds a constraint clause to the referential constraints 728 of a POMetadata object 715. In the preferred embodiment, an addConstraint method is called using a function call of the form myMetaData.addConstraint(<foreignTable>, <foreignColumn>, <localColumn>, <comment>); in which <foreignTable> is a table associated with a foreign key constraint, <foreignColumn> is a column of that table associated with the foreign key constraint, <localColumn> is the constrained column, and <comment> is a user-supplied comment. The addConstraint adds this information to referential constraints 728 and associates it with referential constraint information in the database 60. In similar manner, stored procedures list 722, indexes 724, and triggers 726 are specified using method calls respectively having the form myMetaData.addStoredProcedure(<procedureName>, <procedureBodyDefinition>); myMetaData.addIndex(<indexName>, <indexDefinition>); myMetaData.addTrigger(<triggerName>, <triggerDefinition>); For example, a class VLAD declares a static variable VLADInterfaceMetadata of type POMetaData. The declaration includes a name, such as "WUBUInterface," of the table of database 60 into which data for instances of this class will be stored. Thus, the POMetaData object defines the table structure that will be used by the VLADInterface class to store its data. This enables the class itself to contain all information needed to instantiate itself and set up the table. Further, VLADInterfaceMetadata declares the table size, primary key constraints, definitions for scalar columns, comments, and references to other objects. Preferably, the Persistent Object class 700 has a method that integrates metadata 714 for all classes into the database 60. In an embodiment, an IntegrateMetadata method examines all metadata from all objects and verifies that the database has the appropriate tables for each object. If not, appropriate tables are created. In the preferred embodiment, IntegrateMetadata is called with a database connection and an exemplar persistent object as parameters. The IntegrateMetadata method verifies that the database connection is valid. It then extracts metadata from the persistent object parameter, by calling its POMetadata method. The IntegrateMetadata method then reads, from database 60, the database metadata that corresponds to the table name returned by the POMetadata method. The database 60 is self-describing and can return metadata describing itself. The IntegrateMetadata method compares the database metadata to the object metadata and searches for corresponding columns in the POMetadata object column descriptions. The IntegrateMetadata method also compares and checks the column types and lengths to ensure that they match. Errors are raised if non-matches occur. A complementary check is then carried | ||||||
