xotcl.wu-wien.ac.at
Begin main content
Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]

::xotcl::Class[i] ::xo::db::Class

Class Hierarchy of ::xo::db::Class

  • ::xotcl::Object[i]
    Meta-class:
    ::xotcl::Class[i]
    Methods for instances:
    __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
    Methods to be applied on the class (in addition to the methods provided by the meta-class):
    getExitHandler, setExitHandler, unsetExitHandler
    • ::xotcl::Class[i]
      Meta-class:
      ::xotcl::Class[i]
      Parameter for instances:
      __default_metaclass (default "::xotcl::Class"), __default_superclass (default "::xotcl::Object")
      Methods for instances:
      ad_instproc, allinstances, allocC, createC, deallocC, extend_slot, infoC, instfilterC, instfilterguardC, instforward, instinvarC, instmixinC, instmixinguardC, instparametercmdC, instproc, method, newC, parameter, recreateC, slots, superclassC, unknown, uses
      Methods to be applied on the class (in addition to the methods provided by the meta-class):
      __unknown
::xo::db::Class is a meta class for interfacing with acs_object_types. acs_object_types are instances of this meta class. The meta class defines the behavior common to all acs_object_types. The behavior common to all acs_objects is defined by the class ::xo::db::Object.
Defined in packages/xotcl-core/tcl/05-db-procs.tcl

Class Relations

  • superclass: ::xotcl::Class[i]
  • subclass: ::xo::PackageMgr[i], ::xo::db::CrClass[i]

Methods

  • proc class_to_object_type

  • proc create_all_functions

  • proc delete (public)

    ::xo::db::Class[i] delete -id id 
    Delete the object from the database

    Switches:
    -id (required)
  • proc delete_all_acs_objects (public)

    ::xo::db::Class[i] delete_all_acs_objects -object_type object_type 
    Delete all acs_objects of the object_type from the database.

    Switches:
    -object_type (required)
  • proc drop_type (public)

    ::xo::db::Class[i] drop_type -object_type object_type  \
        [ -drop_table drop_table ] [ -cascade_p cascade_p ]
    Drop the object_type from the database and drop optionally the table. This method deletes as well all acs_objects of the object_type from the database.

    Switches:
    -object_type (required)
    -drop_table (defaults to "f") (optional)
    -cascade_p (defaults to "t") (optional)
  • proc exists_in_db (public)

    ::xo::db::Class[i] exists_in_db -id id 
    Check, if an acs_object exists in the database.

    Switches:
    -id (required)
    Returns:
    0 or 1
  • proc get_all_package_functions

  • proc get_class_from_db (public)

    ::xo::db::Class[i] get_class_from_db [ -object_type object_type ]
    Fetch an acs_object_type from the database and create an XOTcl class from this information.

    Switches:
    -object_type (optional)
    Returns:
    class name of the created XOTcl class
  • proc get_instance_from_db (public)

    ::xo::db::Class[i] get_instance_from_db -id id 
    Create an XOTcl object from an acs_object_id. This method determines the type and initializes the object from the information stored in the database. The XOTcl object is destroyed automatically on cleanup (end of a connection request).

    Switches:
    -id (required)
    Returns:
    fully qualified object
  • proc get_object_type (public)

    ::xo::db::Class[i] get_object_type [ -id id ]
    Return the object type for the give id.

    Switches:
    -id (optional)
    Returns:
    object_type, typically an XOTcl class
  • proc get_table_name (public)

    ::xo::db::Class[i] get_table_name -object_type object_type 
    Get the table_name of an object_type from the database. If the object_type does not exist, the return value is empty.

    Switches:
    -object_type (required)
    Returns:
    table_name
  • proc object_type_exists_in_db (public)

    ::xo::db::Class[i] object_type_exists_in_db [ -object_type object_type ]
    Check, if an object_type exists in the database.

    Switches:
    -object_type (optional)
    Returns:
    0 or 1
  • proc object_type_to_class

  • instproc check_default_values

  • instproc check_table_atts (public)

    <instance of ::xo::db::Class[i]> check_table_atts
    Check table_name and id_column and set meaningful defaults, if these attributes are not provided.

  • instproc create_object_type (public)

    <instance of ::xo::db::Class[i]> create_object_type
    Create an acs object_type for the current XOTcl class

  • instproc db_slots

  • instproc dbproc_nonposargs

  • instproc drop_object_type (public)

    <instance of ::xo::db::Class[i]> drop_object_type \
        [ -cascade cascade ]
    Drop an acs object_type; cascde true means that the attributes are droped as well.

    Switches:
    -cascade (defaults to "true") (optional)
  • instproc fetch_query

  • instproc fix_function_args

  • instproc generate_proc_body

  • instproc generate_psql

  • instproc get_context

  • instproc get_function_args

  • instproc get_instances_from_db (public)

    <instance of ::xo::db::Class[i]> get_instances_from_db \
        [ -select_attributes select_attributes ] \
        [ -from_clause from_clause ] [ -where_clause where_clause ] \
        [ -orderby orderby ] [ -page_size page_size ] \
        [ -page_number page_number ]
    Returns a set (ordered composite) of the answer tuples of an 'instance_select_query' with the same attributes. Note, that the returned objects might by partially instantiated.

    Switches:
    -select_attributes (optional)
    -from_clause (optional)
    -where_clause (optional)
    -orderby (optional)
    -page_size (defaults to "20") (optional)
    -page_number (optional)
    Returns:
    ordered composite
  • instproc init

  • instproc init_type_hierarchy

  • instproc initialize_acs_object

  • instproc instance_select_query (public)

    <instance of ::xo::db::Class[i]> instance_select_query \
        [ -select_attributes select_attributes ] [ -orderby orderby ] \
        [ -where_clause where_clause ] [ -from_clause from_clause ] \
        [ -count on|off ] [ -page_size page_size ] \
        [ -page_number page_number ]
    Returns the SQL-query to select ACS Objects of the object_type of the class.

    Switches:
    -select_attributes (optional)
    -orderby (optional)
    for ordering the solution set
    -where_clause (optional)
    clause for restricting the answer set
    -from_clause (optional)
    -count (boolean) (defaults to "false") (optional)
    return the query for counting the solutions
    -page_size (defaults to "20") (optional)
    -page_number (optional)
    Returns:
    SQL query
  • instproc instantiate_objects (public)

    <instance of ::xo::db::Class[i]> instantiate_objects [ -dbn dbn ] \
        [ -sql sql ] [ -full_statement_name full_statement_name ] \
        [ -as_ordered_composite on|off ] [ -object_class object_class ] \
        [ -named_objects on|off ] \
        [ -object_named_after object_named_after ] \
        [ -destroy_on_cleanup on|off ] [ -initialize initialize ]
    Retrieve multiple objects from the database using the given SQL query and create XOTcl objects from the tuples.

    Switches:
    -dbn (optional)
    -sql (optional)
    The SQL query to retrieve tuples. Note that if the SQL query only returns a restricted set of attributes, the objects will be only partially instantiated.
    -full_statement_name (optional)
    -as_ordered_composite (boolean) (defaults to "true") (optional)
    return an ordered composite object preserving the order. If the flag is false, one has to use "info instances" to access the resulted objects.
    -object_class (defaults to "::xotcl::Object") (optional)
    specifies the XOTcl class, for which instances are created.
    -named_objects (boolean) (defaults to "false") (optional)
    -object_named_after (optional)
    -destroy_on_cleanup (boolean) (defaults to "true") (optional)
    -initialize (defaults to "true") (optional)
  • instproc mk_insert_method

  • instproc mk_save_method

  • instproc new_acs_object

  • instproc new_persistent_object (public)

    <instance of ::xo::db::Class[i]> new_persistent_object \
        [ -package_id package_id ] [ -creation_user creation_user ] \
        [ -creation_ip creation_ip ] args [ args... ]
    Create a new instance of the given class, configure it with the given arguments and insert it into the database. The XOTcl object is destroyed automatically on cleanup (end of a connection request).

    Switches:
    -package_id (optional)
    -creation_user (optional)
    -creation_ip (optional)
    Parameters:
    args
    Returns:
    fully qualified object
  • instproc object_types (public)

    <instance of ::xo::db::Class[i]> object_types \
        [ -subtypes_first on|off ]
    Return the type and subtypes of the class, on which the method is called. If subtypes_first is specified, the subtypes are returned first.

    Switches:
    -subtypes_first (boolean) (defaults to "false") (optional)
    Returns:
    list of object_types
  • instproc object_types_query

  • instproc sql-arguments

  • instproc table_definition

  • instproc unknown

Instances

::xo::db::Object[i], ::xo::db::apm_parameter[i], ::xo::db::sql::acs[i], ::xo::db::sql::acs_activity[i], ::xo::db::sql::acs_attribute[i], ::xo::db::sql::acs_event[i], ::xo::db::sql::acs_group[i], ::xo::db::sql::acs_log[i], ::xo::db::sql::acs_message[i], ::xo::db::sql::acs_object[i], ::xo::db::sql::acs_object_type[i], ::xo::db::sql::acs_object_util[i], ::xo::db::sql::acs_permission[i], ::xo::db::sql::acs_privilege[i], ::xo::db::sql::acs_reference[i], ::xo::db::sql::acs_rel[i], ::xo::db::sql::acs_rel_type[i], ::xo::db::sql::acs_sc_binding[i], ::xo::db::sql::acs_sc_contract[i], ::xo::db::sql::acs_sc_impl[i], ::xo::db::sql::acs_sc_impl_alias[i], ::xo::db::sql::acs_sc_implementation[i], ::xo::db::sql::acs_sc_msg_type[i], ::xo::db::sql::acs_sc_operation[i], ::xo::db::sql::acs_user[i], ::xo::db::sql::admin_rel[i], ::xo::db::sql::apm[i], ::xo::db::sql::apm_application[i], ::xo::db::sql::apm_package[i], ::xo::db::sql::apm_package_type[i], ::xo::db::sql::apm_package_version[i], ::xo::db::sql::apm_parameter_value[i], ::xo::db::sql::apm_service[i], ::xo::db::sql::application_group[i], ::xo::db::sql::authority[i], ::xo::db::sql::category[i], ::xo::db::sql::category_link[i], ::xo::db::sql::category_synonym[i], ::xo::db::sql::category_tree[i], ::xo::db::sql::composition_rel[i], ::xo::db::sql::content_extlink[i], ::xo::db::sql::content_folder[i], ::xo::db::sql::content_item[i], ::xo::db::sql::content_item_search[i], ::xo::db::sql::content_keyword[i], ::xo::db::sql::content_revision[i], ::xo::db::sql::content_search[i], ::xo::db::sql::content_symlink[i], ::xo::db::sql::content_template[i], ::xo::db::sql::content_type[i], ::xo::db::sql::doc[i], ::xo::db::sql::file_storage[i], ::xo::db::sql::image[i], ::xo::db::sql::journal_entry[i], ::xo::db::sql::membership_rel[i], ::xo::db::sql::notification[i], ::xo::db::sql::notification_delivery_method[i], ::xo::db::sql::notification_interval[i], ::xo::db::sql::notification_reply[i], ::xo::db::sql::notification_request[i], ::xo::db::sql::notification_type[i], ::xo::db::sql::party[i], ::xo::db::sql::party_approved_member[i], ::xo::db::sql::person[i], ::xo::db::sql::recurrence[i], ::xo::db::sql::rel_constraint[i], ::xo::db::sql::rel_segment[i], ::xo::db::sql::rss_gen_subscr[i], ::xo::db::sql::search_observer[i], ::xo::db::sql::site_node[i], ::xo::db::sql::site_node_object_map[i], ::xo::db::sql::subsite_callback[i], ::xo::db::sql::template_demo_note[i], ::xo::db::sql::time_interval[i], ::xo::db::sql::timespan[i], ::xo::db::sql::timezone[i], ::xo::db::sql::util[i], ::xo::db::sql::xorb_servicecontract[i], ::xo::db::sql::xorb_serviceimplementation[i]

Methods: Source: Variables:
[All Methods | Documented Methods | Hide Methods] [Display Source | Hide Source] [Show Variables | Hide Variables]