Add a new source object to the registry.
Input
Parameter | Type | Description |
|---|---|---|
v_dictobj_id | NUMBER | An object class ID from the source registry pool. |
v_name | VARCHAR2 | The name of the source registry entry. This is limited to 240 characters. |
v_parent_registry_id | NUMBER | The primary key of the parent source registry. |
v_priority_id_in | NUMBER | The ID of the project priority from the lookup table sourceregistry_priority. |
v_use_id_in | NUMBER | The ID of the source use values from the table sourceregistry_use. |
v_created_by_in | NUMBER | The ID of the user that created the source registry entry. |
v_geom | SDO_GEOMETRY | A value of type of the cover area by the source. |
v_external_id | VARCHAR2 | The ID of a record external to HPD. Used to link/reference an external registry system. This is limited to 50 characters. |
Output
Type | Description |
|---|---|
INTEGER | The primary key value of the newly created source entry. |
Example
declare v_new_reg_entry NUMBER; v_objectclass_id NUMBER; v_NAME SOURCEREGISTRY.NAME%TYPE := 'RegEntry3'; v_PARENT_REG_ID SOURCEREGISTRY.SOURCEREGISTRY_ID%TYPE := NULL; v_PRIORITY_ID SOURCEREGISTRY_PRIORITY.SOURCEREG_PRIORITY_ID%TYPE := 1; v_USE_ID SOURCEREGISTRY.SUE_SOURCEREG_USE_ID%TYPE := 1; v_CREATED_BY SOURCEREGISTRY.CREATED_BY%TYPE := 3; v_GEOM SOURCEREGISTRY.GEOM%TYPE := NULL; v_EXTERNAL_ID SOURCEREGISTRY.external_id%type := NULL; begin select objectclass_id into v_objectclass_id from objectclass_vw where acronym = 'SURVEY';
v_new_reg_entry := P_REGISTRY_MANAGER.ADDREGISTRYENTRY (v_OBJECTCLASS_ID, v_NAME, v_PARENT_REG_ID, v_PRIORITY_ID, v_USE_ID, v_CREATED_BY,v_GEOM, v_EXTERNAL_ID); DBMS_OUTPUT.PUT_LINE ('--*-- Created Registry Entry ID: '||v_new_reg_entry); end; / |
Exceptions
• DICTIONARY OBJECT ID is required
• REGISTRY SOURCE NAME is required
• Input PRIORITY_id does not exist
• Input RESPONSIBLE USER ID does not exist
• Input use_id does not exist
• Error in ADDREGISTRYENTRY: (SQL code)