%3 ::xotcl::Object ::xotcl::Object ::xo::db::Object ::xo::db::Object delete save save_new update ::xo::db::Object->::xotcl::Object ::xo::Package ::xo::Package initialize reply_to_user require_root_folder ::xo::Package->::xo::db::Object ::xo::db::apm_parameter ::xo::db::apm_parameter ::xo::db::apm_parameter->::xo::db::Object ::xo::parameter ::xo::parameter ::xo::db::apm_parameter->::xo::parameter instmixin ::xo::db::chat_room ::xo::db::chat_room ban_user count_messages create_transcript delete delete_messages flush grant_creator grant_moderator grant_user post_message revoke_moderator revoke_user save_new transcript_messages unban_user ::xo::db::chat_room->::xo::db::Object ::xo::db::chat_transcript ::xo::db::chat_transcript save_new ::xo::db::chat_transcript->::xo::db::Object ::xo::db::CrItem ::xo::db::CrItem delete is_package_root_folder privilege=creator rename save save_new set_live_revision update_attribute_from_slot update_item_index ::xo::db::CrItem->::xo::db::Object ::xo::db::CrCache::Item ::xo::db::CrCache::Item ::xo::db::CrItem->::xo::db::CrCache::Item instmixin ::xowiki::Package ::xowiki::Package → get_package_id_from_page_id → get_url_from_id → google_sitemapindex → instantiate_page_from_id → is_xowiki_p external_name folder_path get_ids_for_bulk_actions get_parameter get_parameter_from_parameter_page import invoke item_info_from_url item_ref lookup make_link normalize_path pretty_link reparent require_root_folder resolve_page www-change-page-order www-delete www-edit-category-tree www-edit-new www-google-sitemap www-google-sitemapindex www-import-prototype-page www-manage-categories www-refresh-login www-reindex www-rss www-update-references ::xowiki::Package->::xo::Package ::xowiki::ParameterCache ::xowiki::ParameterCache ::xowiki::Package->::xowiki::ParameterCache ::xo::oauth::Package ::xo::oauth::Package ::xo::oauth::Package->::xo::Package ::xo::oauth::ClientMetadata ::xo::oauth::ClientMetadata ::xo::oauth::ClientMetadata->::xo::db::CrItem ::xo::oauth::ServerMetadata ::xo::oauth::ServerMetadata ::xo::oauth::ServerMetadata->::xo::db::CrItem ::xo::db::image ::xo::db::image ::xo::db::image->::xo::db::CrItem ::xo::db::CrFolder ::xo::db::CrFolder → fetch_object → get_instance_from_db → instance_select_query → register_content_types delete save save_new ::xo::db::CrFolder->::xo::db::CrItem ::xowiki::Page ::xowiki::Page → find_slot anchor create_form_fields_from_form_constraints create_link find_slot get_form_data include is_folder_page pretty_link render resolve_included_page_name save_new substitute_markup www-autosave-attribute www-bulk-delete www-clipboard-add www-clipboard-clear www-clipboard-content www-clipboard-copy www-clipboard-export www-create-new www-create-or-use www-csv-dump www-delete www-delete-revision www-diff www-duplicate www-edit www-list www-make-live-revision www-popular-tags www-revisions www-save-attributes www-save-tags www-toggle-publish-status www-validate-attribute www-view ::xowiki::Page->::xo::db::CrItem ::xo::oauth::Credentials ::xo::oauth::Credentials ::xo::oauth::Credentials->::xo::db::CrItem

Class ::xo::db::Object

::xo::db::Object[i] create ...

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xotcl::Object[i]
  • subclass: ::xo::Package[i], ::xo::db::apm_parameter[i], ::xo::db::chat_room[i], ::xo::db::chat_transcript[i], ::xo::db::CrItem[i]
::xo::db::Class create ::xo::db::Object \
     -superclass ::xotcl::Object

Methods (to be applied on instances)

  • delete (scripted, public)

     <instance of xo::db::Object[i]> delete

    Delete the object from the database and from memory

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_test_xo_db_object test_xo_db_object (test xotcl-core) xo::db::Object instproc delete xo::db::Object instproc delete test_test_xo_db_object->xo::db::Object instproc delete test_xotcl_core_tutorial_1 xotcl_core_tutorial_1 (test xotcl-core) test_xotcl_core_tutorial_1->xo::db::Object instproc delete

    Testcases:
    xotcl_core_tutorial_1, test_xo_db_object
    ::acs::dc call acs_object delete -object_id ${:object_id}
    :destroy
  • save (scripted, public)

     <instance of xo::db::Object[i]> save [ -package_id package_id ] \
        [ -modifying_user modifying_user ] [ -context_id context_id ]

    Save the current object in the database

    Switches:
    -package_id
    (optional)
    -modifying_user
    (optional)
    -context_id
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_test_xo_db_object test_xo_db_object (test xotcl-core) xo::db::Object instproc save xo::db::Object instproc save test_test_xo_db_object->xo::db::Object instproc save test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test xotcl-core) test_xotcl_core_tutorial_2->xo::db::Object instproc save

    Testcases:
    xotcl_core_tutorial_2, test_xo_db_object
    set cmd [list :update]
    if {[info exists package_id]} {lappend cmd -package_id $package_id}
    if {[info exists modifying_user]} {lappend cmd -modifying_user $modifying_user}
    if {[info exists context_id]} {lappend cmd -context_id $context_id}
    {*}$cmd
  • save_new (scripted, public)

     <instance of xo::db::Object[i]> save_new [ -package_id package_id ] \
        [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
        [ -context_id context_id ]

    Save the XOTcl Object with a fresh acs_object in the database.

    Switches:
    -package_id
    (optional)
    -creation_user
    (optional)
    -creation_ip
    (optional)
    -context_id
    (optional)
    Returns:
    new object id

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_test_xo_db_object test_xo_db_object (test xotcl-core) xo::db::Object instproc save_new xo::db::Object instproc save_new test_test_xo_db_object->xo::db::Object instproc save_new

    Testcases:
    test_xo_db_object
    if {![info exists package_id] && [info exists :package_id]} {
      set package_id ${:package_id}
    }
    if {![info exists context_id]} {
      set context_id [expr {[info exists :context_id] ? ${:context_id} : ""}]
    }
    [:info class] get_context package_id creation_user creation_ip
    ::xo::dc transaction {
      set id [[:info class] new_acs_object  -package_id $package_id  -creation_user $creation_user  -creation_ip $creation_ip  -context_id $context_id  ""]
      [:info class] initialize_acs_object [self$id
      :insert
    }
    return $id
  • update (scripted, public)

     <instance of xo::db::Object[i]> update [ -package_id package_id ] \
        [ -modifying_user modifying_user ] [ -context_id context_id ]

    Update the current object in the database

    Switches:
    -package_id
    (optional)
    -modifying_user
    (optional)
    -context_id
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_test_xo_db_object test_xo_db_object (test xotcl-core) xo::db::Object instproc update xo::db::Object instproc update test_test_xo_db_object->xo::db::Object instproc update test_xotcl_core_tutorial_2 xotcl_core_tutorial_2 (test xotcl-core) test_xotcl_core_tutorial_2->xo::db::Object instproc update

    Testcases:
    xotcl_core_tutorial_2, test_xo_db_object
    set object_id ${:object_id}
    if {![info exists package_id] && [info exists :package_id]} {
      set package_id ${:package_id}
    }
    if {![info exists context_id]} {
      set context_id [expr {[info exists :context_id] ? ${:context_id} : ""}]
    }
    [:info class] get_context package_id modifying_user modifying_ip
    set title ${:object_title}
    ::xo::dc dml update_object {
      update acs_objects set
         title          = :title,
         modifying_user = :modifying_user,
         modifying_ip   = :modifying_ip,
         context_id     = :context_id
      where object_id = :object_id
    }
    # Make sure object memory image reflects db values
    foreach att {modifying_user modifying_ip context_id} {
      set :${att} [set $att]
    }
    set :last_modified [::xo::dc get_value -prepare integer  get_last_modified {
      select last_modified from acs_objects
      where object_id = :object_id
    }]