man Bric::Biz::Asset::Business::Parts::Tile::Data () - Data (Field) Element
NAME
Bric::Biz::Asset::Business::Parts::Tile::Data - Data (Field) Element
VERSION
$LastChangedRevision$
DATE
$LastChangedDate: 2004-08-12 17:13:34 -0700 (Thu, 12 Aug 2004) $
SYNOPSIS
# Creation of New Objects $data = Bric::Biz::Asset::Business::Parts::Tile::Data->new($params); $data = Bric::Biz::Asset::Business::Parts::Tile::Data->lookup({ id => $id }); @data = Bric::Biz::Asset::Business::Parts::Tile::Data->list($params);
# Retrieval of Object IDs @ids = = Bric::Biz::Asset::Business::Parts::Tile::Data->list_ids($params);
# Manipulation of Data Field $data = $data->set_data( $data_value ); $data_value = $data->get_data;
DESCRIPTION
This class contains the contents of field elements, also known as data elements. These are the objects that hold the values of story element fields. This class inherits from Bric::Biz::Asset::Business::Parts::Tile.
INTERFACE
Constructors
Construct a new data element object. The supported initial attributes are:
- object_type
- A string identifying the type of document the new data element is associated with. It's value can be story or media.
- object_instance_id
- The ID of the story or media document the new data element is associated with.
- place
- The order of this element relative to the other subelements of the parent element.
- element_data_id
- The ID of the Bric::Biz::AssetType::Parts::Data object that defines the structure of the new data element.
- parent_id
- The ID of the container element that is the parent of the new data element.
- active
- A boolean value indicating whether the container element is active or inactive. Throws: NONE. Side Effects: NONE. Notes: NONE. Looks up a data element in the database by its ID and returns it. The lookup parameters are:
- id
- The ID of the data element to lookup. Required.
- object
- A story or media document object with which the data element is associated. Required unless CWobject_type is specified.
- object_type
- The type of document object with which the data element is associated. Must be either media or story. Required unless CWobject is specified. Throws:
- Missing required Parameter 'id'.
- Missing required Parameter 'object_type' or 'object'.
- Improper type of object passed to lookup.
- Side Effects: NONE. Notes: NONE. Searches for and returns a list or anonymous array of data element objects. The supported parameters that can be searched are:
- object
- A story or media object with which the data elements are associated. Required unless CWobject_type is specified.
- object_type
- The type of document with which the data elements are associated. Required unless CWobject is specified.
- object_instance_id
- The ID of a story or data object with wich the data elements are associated. Can only be used if CWobject_type is also specified and CWobject is not specified.
- name
- The name of the data elements. Since the SQL CWLIKE operator is used with this search parameter, SQL wildcards can be used.
- key_name
- The key name of the data elements. Since the SQL CWLIKE operator is used with this search parameter, SQL wildcards can be used.
- parent_id
- The ID of the container element that is the parent element of the data elements.
- element_data_id
- The ID of the Bric::Biz::AssetType::Parts::Data object that specifies the structure of the data elements.
- active
- A boolean value indicating whether the returned data elements are active or inactive. Throws: NONE. Side Effects: NONE. Notes: NONE.
Destructors
- $data->DESTROY
- Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.
Public Class Methods
Returns a list or anonymous array of data element IDs. The search parameters are the same as for CWlist(). Throws: NONE. Side Effects: NONE. Notes: NONE.
Public Instance Methods
See also Bric::Biz::Asset::Business::Parts::Tile, from which Bric::Biz::Asset::Business::Parts::Tile::Data inherits. Returns the ID of the Bric::Biz::AssetType::Parts::Data object that describes this element. Throws: NONE. Side Effects: NONE. Notes: NONE.
- $data->set_element_data_id($element_data_id)
- Sets the ID of the Bric::Biz::AssetType::Parts::Data object that describes this element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the Bric::Biz::AssetType::Parts::Data object that defines the structure of this data element. Throws: NONE. Side Effects: NONE. Notes: NONE. An alias for CW$data->get_name. Throws: NONE. Side Effects: NONE. Notes: NONE. An alias for CW$data->get_key_name. Throws: NONE. Side Effects: NONE. Notes: NONE.
- $data->set_data($value)
- Sets the value of the data element. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns the value of this data element. If the SQL type of the data object is date, then CW$format, if it is passed, will be used to format the date. Otherwise, the format set in the preferences will be used. Throws: NONE. Side Effects: NONE. Notes: NONE.
- $data->prepare_clone
- Prepares the data element to be cloned, such as when a new version of a document is created, or when a document itself is cloned. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns false, since data elements are not container elements. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if this data element's value is autopopulated. Throws: NONE. Side Effects: NONE. Notes: NONE.
- $data->lock_val
- For autopopulated data elements, this method prevents the value from being autopopulated. Throws: NONE. Side Effects: NONE. Notes: NONE. Allows auotpopulated data elements to be autopopulated. Throws: NONE. Side Effects: NONE. Notes: NONE. Returns true if the tile has been locked. Throws: NONE. Side Effects: NONE. Notes: NONE. Saves the changes to the data element to the database. Throws: NONE. Side Effects: NONE. Notes: NONE.
PRIVATE
Private Class Methods
Called by CWlist() or CWlist_ids(), this method returns either a list of ids or a list of objects, depending on the third argument. Throws:
- *
- Object of type CW$obj_class not allowed to be tiled.
- *
- Improper args for list. Side Effects: NONE. Notes: NONE.
Private Instance Methods
- $data->_do_insert()
- Called by CWsave(), this method inserts the data element into the database. Throws:
- *
- Object must be a media or story to add tiles. Side Effects: NONE. Notes: NONE.
- $data->_do_update
- Called by CWsave(), this method updates the data element into the database. Throws:
- *
- Object must be a media or story to add tiles. Side Effects: NONE. Notes: NONE. Returns the sql type for the value of this data element. Throws: NONE. Side Effects: NONE. Notes: NONE.
- $name = _get_table_name($object_type);
- Returns the name of the table this data element uses. This method can act as a class or instance method depending on how it's called. Throws: NONE. Side Effects: NONE. Notes: NONE.
NOTES
NONE
AUTHOR
Michael Soderstrom <miraso@pacbell.net>
SEE ALSO
perl, Bric, Bric::Biz::Asset, Bric::Biz::Asset::Business, Bric::Biz::Asset::Business::Parts::Tile