Main Tables Views Materialized Views Indexes Constraints Triggers Procedures Functions Packages Sequences Java Sources Jobs Sanity Check Index DDL scrips
Arguments Source

LOOKUP_XCCDF_IDENT

DDL script

Arguments:

NameData TypeDefault ValueIn/Out
SYSTEM_INVARCHAR2 IN
IDENTIFIER_INVARCHAR2 IN

Returns:

NUMBER(38)

Source

Legend: comment string keyword reserved word operator
     1: function
     2: lookup_xccdf_ident(system_in in varchar2, identifier_in in varchar2)
     3: return number
     4: is
     5:     pragma autonomous_transaction;
     6:     xccdf_ident_id number;
     7:     ident_sys_id number;
     8: begin
     9:     begin
    10:         select id
    11:           into ident_sys_id
    12:           from rhnXccdfIdentSystem
    13:          where system = system_in;
    14:     exception when no_data_found then
    15:         begin
    16:             ident_sys_id := insert_xccdf_ident_system(system_in);
    17:         exception when dup_val_on_index then
    18:             select id
    19:               into ident_sys_id
    20:               from rhnXccdfIdentSystem
    21:              where system = system_in;
    22:         end;
    23:     end;
    24: 
    25:     select id
    26:       into xccdf_ident_id
    27:       from rhnXccdfIdent
    28:      where identsystem_id = ident_sys_id and identifier = identifier_in;
    29:     return xccdf_ident_id;
    30: exception when no_data_found then
    31:     begin
    32:         xccdf_ident_id := insert_xccdf_ident(ident_sys_id, identifier_in);
    33:     exception when dup_val_on_index then
    34:         select id
    35:           into xccdf_ident_id
    36:           from rhnXccdfIdent
    37:          where identsystem_id = ident_sys_id and identifier = identifier_in;
    38:     end;
    39:     return xccdf_ident_id;
    40: end lookup_xccdf_ident;