Bric::Biz::ATType - A class to represent ElementType types. $LastChangedRevision$ $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $ use Bric::Biz::ATType; This class sets up properties that are common to all elements (Bric::Biz::ElementType) objects of a type.

Constructors
Constructs and returns a new Bric::Biz::ATType object initialized with the parameters in the $init hash reference. The supported keys for $init are: The name of this ATType. A short description of this ATType. A boolean value flagging whether elements (ElementTypes) of this this ATType represent top level elements (story type elements or media type elements) or subelements. Defaults to false. A boolean value flagging whether elements (ElementTypes) of this this ATType represent pages. Defaults to false. A boolean value flagging whether elements (ElementTypes) of this this ATType are fixed URL elements. Defaults to false. A boolean value flagging whether elements (ElementTypes) of this this ATType are rleated story elements. Defaults to false. A boolean value flagging whether elements (ElementTypes) of this this ATType are rleated media elements. Defaults to false. A boolean value flagging whether elements (ElementTypes) of this this ATType are media elements. Defaults to false. The ID corresponding to the Bric::Util::Class entry for one of the following classes: Throws: NONE. Side Effects: NONE. Notes: NONE. Looks up and instantiates a new Bric::Biz::ATType object based on the Bric::Biz::ATType object ID or name passed. If $id or $name is not found in the database, "lookup()" returns "undef". Throws: Too many Bric::Biz::ATType objects found. Unable to connect to database. Unable to prepare SQL statement. Unable to select column into arrayref. Unable to execute SQL statement. Unable to bind to columns to statement handle. Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Returns a list or anonymous array of Bric::Biz::ATType objects based on the search parameters passed via an anonymous hash. The supported lookup keys are: ATType ID. May use "ANY" for a list of possible values. Lookup ATType by name. May use "ANY" for a list of possible values. Lookup ATType by description. May use "ANY" for a list of possible values. Boolean; return all top level ATTypes Boolean; return all paginated ATTypes. Boolean; return all fixed URL ATTypes. Boolean; return all active ATTypes. If passed as "all", returns all ATTypes. Boolean; return all related story ATTypes. Boolean; return all related media ATTypes. Boolean; return all media ATTypes. Return all ATTypes associated with this business class ID. See "new()" for a list of business asset classes. May use "ANY" for a list of possible values. Return all ATTypes in the Bric::Util::Grp::ATType group corresponding to this ID. May use "ANY" for a list of possible values. Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to select column into arrayref. Unable to execute SQL statement. Unable to bind to columns to statement handle. Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE.

Destructors
Dummy method to prevent wasting time trying to AUTOLOAD DESTROY. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Class Methods
Returns a list or anonymous array of Bric::Biz::ATType object IDs based on the search criteria passed via an anonymous hash. The supported lookup keys are the same as those for "list()". Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to select column into arrayref. Unable to execute SQL statement. Unable to bind to columns to statement handle. Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. Returns an anonymous hash of introspection data for this object. If called with a true argument, it will return an ordered list or anonymous array of introspection data. If a second true argument is passed instead of a first, then a list or anonymous array of introspection data will be returned for properties that uniquely identify an object (excluding "id", which is assumed). Each hash key is the name of a property or attribute of the object. The value for a hash key is another anonymous hash containing the following keys: The name of the property or attribute. Is the same as the hash key when an anonymous hash is returned. The display name of the property or attribute. A reference to the method that will retrieve the value of the property or attribute. An anonymous array of arguments to pass to a call to get_meth in order to retrieve the value of the property or attribute. A reference to the method that will set the value of the property or attribute. An anonymous array of arguments to pass to a call to set_meth in order to set the value of the property or attribute. The type of value the property or attribute contains. There are only three types: If the value is a 'short' value, this hash key contains the length of the field. The property is searchable via the list() and list_ids() methods. The property or attribute is required. An anonymous hash of properties used to display the property or attribute. Possible keys include: The display field type. Possible values are The Length, in letters, to display a text or password field. The maximum length of the property or value - usually defined by the SQL DDL. The number of rows to format in a textarea field. The number of columns to format in a textarea field. An anonymous hash of key/value pairs reprsenting the values and display names to use in a select list. Throws: NONE. Side Effects: NONE. Notes: NONE.

Public Instance Methods
Get/Set the name of this AT type. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the description for this AT type. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the top level flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the paginated flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the fixed url flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the related story flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the related media flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the media flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the business class ID. See "new()" for a list of the business asset classes. Throws: NONE. Side Effects: NONE. Notes: NONE. Get/Set the active flag. Throws: NONE. Side Effects: NONE. Notes: NONE. Deletes the AT type from the database. Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to execute SQL statement. Side Effects: NONE. Notes: NONE. Save the AT type and/or all changes to the database. Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to execute SQL statement. Side Effects: NONE. Notes: NONE.

Private Class Methods
NONE

Private Instance Methods
Updates the ATType in the database. Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to execute SQL statement. Side Effects: NONE. Notes: NONE. Inserts the ATType into the database. Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to execute SQL statement. Side Effects: NONE. Notes: NONE.

Private Functions
Function used by "lookup()" and "list()" to return a list of Bric::Biz::ATType objects or, if called with an optional third argument, returns a list of Bric::Biz::ATType object IDs (used by "list_ids()"). Throws: Unable to connect to database. Unable to prepare SQL statement. Unable to select column into arrayref. Unable to execute SQL statement. Unable to bind to columns to statement handle. Unable to fetch row from statement handle. Side Effects: NONE. Notes: NONE. NONE Garth Webb <garth@perijove.com> Refactored by David Wheeler <david@justatheory.com> perl, Bric, Bric::Biz::ElementType