acs_object::get (public)

 acs_object::get -object_id object_id [ -array array ] \
    [ -element element ]

Defined in packages/acs-tcl/tcl/object-procs.tcl

Gets information about an acs_object. If called without "-element", it returns a dict containing object_id, package_id, object_type, context_id, security_inherit_p, creation_user, creation_date_ansi, creation_ip, last_modified_ansi, modifying_user, modifying_ip, tree_sortkey, object_name. If called with "-element" it returns the denoted element (similar to e.g. "party::get").

Switches:
-object_id (required)
for which the information should be retrieved
-array (optional)
An array in the caller's namespace into which the info should be delivered (upvared)
-element (optional)
to be returned
Error:
when object_id does not exist

Testcases:
acs_object_procs_test
Source code:
    if {[info exists array]} {
        upvar 1 $array row
    }
    db_1row select_object {
        select o.object_id,
               o.title,
               o.package_id,
               o.object_type,
               o.context_id,
               o.security_inherit_p,
               o.creation_user,
               to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date_ansi,
               o.creation_ip,
               to_char(o.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi,
               o.modifying_user,
               o.modifying_ip,
               acs_object.name(o.object_id) as object_name
        from   acs_objects o
        where  o.object_id = :object_id
    } -column_array row

    if {[info exists element]} {
        return [dict get [array get row] $element]
    } else {
        return [array get row]
    }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/object-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: