| Oracle9i Messaging Gateway Supplement Release 1 (9.0.1) Part Number A90837-01 |
|
DBMS_MGWMSG provides object types--used by the canonical message types to convert message bodies--and helper methods, constants, and subprograms for working with the Messaging Gateway message types. The package and object types are owned by SYS.
The following topics are discussed in this chapter:
This type specifies a named value. The name and type attributes and one of the < >_value attributes are typically nonnull.
TYPE SYS.MGW_NAME_VALUE_T IS OBJECT name VARCHAR2(250), type INTEGER, integer_value INTEGER, number_value NUMBER, text_value VARCHAR2(4000), raw_value RAW(2000), date_value DATE);
| Attribute | Description |
|---|---|
|
|
Name associated with the value. |
|
|
Value type. Refer to the |
|
|
Stores a numeric integer value. |
|
|
Stores a numeric float or large integer value. |
|
|
Stores a |
|
|
Stores a |
|
|
Stores a date value. |
Table 6-3 shows the mapping between the value type and the attribute used to store the value.
This method constructs a new MGW_NAME_VALUE_T instance. All attributes are assigned a value of NULL.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_NAME_VALUE_T;
These methods construct a new MGW_NAME_VALUE_T instance initialized with the value of a specific type. Each method sets the name and type attributes and one of the < >_value attributes, as shown in the mappings in Table 6-3.
STATIC FUNCTION CONSTRUCT_BOOLEAN ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_BYTE ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_SHORT ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_INTEGER ( name IN VARCHAR2, value IN INTEGER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_LONG ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_FLOAT ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DOUBLE ( name IN VARCHAR2, value IN NUMBER ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_TEXT ( name IN VARCHAR2, value IN VARCHAR2 ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_RAW ( name IN VARCHAR2, alue IN RAW ) RETURN SYS.MGW_NAME_VALUE_T, STATIC FUNCTION CONSTRUCT_DATE ( name IN VARCHAR2, value IN DATE ) RETURN SYS.MGW_NAME_VALUE_T );
The construct_boolean method sets the value to either DBMS_MGWMSG.BOOLEAN_TRUE or DBMS_MGWMSG.BOOLEAN_FALSE.
This type specifies an array of name-value pairs. An object of MGW_NAME_VALUE_ARRAY_T type can have up to 1024 elements.
TYPE SYS.MGW_NAME_VALUE_ARRAY_T AS VARRAY (1024) OF SYS.MGW_NAME_VALUE_T;
This type specifies a TEXT value. It can store a large value as a CLOB or a smaller value (size <= 4000) as VARCHAR2. Only one of the < >_ value attributes should be set.
TYPE SYS.MGW_TEXT_VALUE_T IS OBJECT small_value VARCHAR2(4000), large_value CLOB);
| Attribute | Description |
|---|---|
|
|
Small |
|
|
Large |
This method constructs a new MGW_TEXT_VALUE_T instance. All attributes are assigned a value of NULL.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_TEXT_VALUE_T;
This type specifies a RAW value. This type can store a large value as a BLOB or a smaller value (size <= 2000) as RAW. Only one of the < >_value attributes should be set.
TYPE SYS.MGW_RAW_VALUE_T IS OBJECT( small_value RAW(2000), large_value BLOB);
| Attribute | Description |
|---|---|
|
|
Small |
|
|
Large |
This method constructs a new MGW_RAW_VALUE_T instance. All attributes are assigned a value of NULL.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_RAW_VALUE_T;
This is a canonical type for a basic TEXT or RAW message. Only a single TEXT or RAW value is typically set. An object of this type should not have both TEXT and RAW set to a nonnull value at the same time.
TYPE SYS.MGW_BASIC_MSG_T IS OBJECT header SYS.MGW_NAME_VALUE_ARRAY_T, text_body SYS.MGW_TEXT_VALUE_T, raw_body SYS.MGW_RAW_VALUE_T);
| Attribute | Description |
|---|---|
|
|
Message header information as an array of name-value pairs. |
|
|
Message body for a |
|
|
Message body for a |
This method constructs a new MGW_BASIC_MSG_T instance. All attributes are assigned a value of NULL.
STATIC FUNCTION CONSTRUCT RETURN SYS.MGW_BASIC_MSG_T;
This procedure appends a name-value element to the end of a name-value array.
DBMS_MGWMSG.NVARRAY_ADD ( p_array IN OUT SYS.MGW_NAME_VALUE_ARRAY_T, p_value IN SYS.MGW_NAME_VALUE_T );
This function gets the name-value element of the name you specify in p_name from a name-value array.
DBMS_MGWMSG.NVARRAY_GET ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN SYS.MGW_NAME_VALUE_T;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The matching element, or NULL if the specified name is not found.
This function gets the value of the name-value array element that you specify in p_name and with the BOOLEAN_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_BOOLEAN ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the BYTE_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_BYTE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the SHORT_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_SHORT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the INTEGER_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_INTEGER ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN INTEGER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the LONG_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_LONG ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the FLOAT_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_FLOAT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the DOUBLE_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_DOUBLE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN NUMBER;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the TEXT_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_TEXT ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN VARCHAR2;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the RAW_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_RAW ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN RAW;
| Parameter | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function gets the value of the name-value array element that you specify in p_name and with the DATE_VALUE value type.
DBMS_MGWMSG.NVARRAY_GET_DATE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN DATE;
| Parameters | Description |
|---|---|
|
|
The name-value array. |
|
|
The value name. |
|
|
Name comparison method. Valid values: |
The value, or NULL if the specified name is not found or if a type mismatch exists.
This function searches a name-value array for the element with the name you specify in p_name.
DBMS_MGWMSG.NVARRAY_FIND_NAME ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
| Parameters | Description |
|---|---|
|
|
The name-value array to search. |
|
|
The name to find. |
|
|
Name comparison method. Valid values: |
0 if the specified name is not found
This function searches a name-value array for an element with the name and value type you specify.
DBMS_MGWMSG.NVARRAY_FIND_NAME_TYPE ( p_array IN SYS.MGW_NAME_VALUE_ARRAY_T, p_name IN VARCHAR2, p_type IN BINARY_INTEGER p_compare IN BINARY_INTEGER DEFAULT CASE_SENSITIVE ) RETURN BINARY_INTEGER;
| Parameter | Description |
|---|---|
|
|
The name-value array to search. |
|
|
The name to find. |
|
|
The value type. Refer to the value type constants in Table 6-7 . |
|
|
Name comparison method. Valid values: |
|
|
![]() Copyright © 2001 Oracle Corporation. All Rights Reserved. |
|