Skip Headers
Oracle® Life Sciences Data Hub System Administrator's Guide
Release 2.2

Part Number E22745-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

14 Customizing Object Validation Requirements

This section contains the following topics:

About Customizing Object Validation

You can use a package called CDR_DF_CUSTOM_VALIDATION to set your own standards for object definitions. The internal procedures createNaming and modifyNaming call this package each time a user creates or modifies an object definition or instance and commits the changes. By default, the package returns a value of True and the standard application logic for creating or updating an object proceeds.

However, you can modify this package to enforce your own rules—for example, naming conventions—so that the package returns False and displays an error message if one or more rules are violated. The operation fails and the system does not invoke the standard application logic for creating or updating an object.

You can set a rule for any attribute of any object type (not just the name). You can set different rules for different object types.

To see all attributes for all object types predefined in the Oracle Life Sciences Data Hub (Oracle LSH), enter the following query at a SQL prompt:

desc apps.cdr_naming_version_obj_type

Modifying the Custom Validation Package

CDR_DF_CUSTOM_VALIDATION contains one procedure: validateNaming:

PROCEDURE validateNaming(
        pi_oNamingVersionObjType IN CDR_NAMING_VERSION_OBJ_TYPE,
        po_bRetStatus OUT NOCOPY BOOLEAN,
        po_vRetMsg OUT NOCOPY VARCHAR2 )

The procedure uses the parameters as follows:

pi_oNamingVersionObjType is an input parameter for the object type being validated. See the table cdr_naming_version_obj_type for the internal name of each object type.

po_bRetStatus is an output parameter with a Boolean return: True if all rules are satisfied, False if one or more rules are violated. By default this parameter value is hardcoded to True.

po_vRetMsg is an output parameter that supplies the text of the error message to be displayed in the user interface if a new or modified object does not pass one or more validation requirements defined in this procedure.