Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ledgersmb::dbobject(3pm) [debian man page]

LedgerSMB::DBObject(3pm)				User Contributed Perl Documentation				  LedgerSMB::DBObject(3pm)

NAME
LedgerSMB::DBObject - LedgerSMB class for building objects from db relations SYOPSIS
This module creates object instances based on LedgerSMB's in-database ORM. METHODS
new ($class, base => $LedgerSMB::hash) This is the base constructor for all child classes. It must be used with base argument because this is necessary for database connectivity and the like. Of course the base object can be any object that inherits LedgerSMB, so you can use any subclass of that. The per-session dbh is passed between the objects this way as is any information that is needed. exec_method ($self, procname => $function_name, [args => @args, schema => $schema, continue_on_error=>$continue_on_error]) Provides the basic mapping of parameters to the SQL stored procedure function arguments. If @args is not defined, args are mapped from the object's properties, stripping them of their in_ prefix. If schema is provided, that is used instead of PostgreSQL's search path. If continue_on_error is provided and true, the operation will not raise an exception in the event of a database error, and it will be up to the application to handle any exceptions. __validate__ is called on every new() invocation. It is blank in this module but can be overridden in decendant modules. _db_array_scalars(@elements) creates a db array from scalars. _db_array_literal(@elements) creates a multiple dimension db array from preparsed db arrays or other data which does not need to be escaped. set_ordering Sets the ordering used by default for specific functions called by exec_method run_custom_queries Backward-compatible with 1.2 custom query system for moving forward. Copyright (C) 2007, The LedgerSMB core team. This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should have been included with your software. perl v5.14.2 2011-12-10 LedgerSMB::DBObject(3pm)

Check Out this Related Man Page

LedgerSMB::File(3pm)					User Contributed Perl Documentation				      LedgerSMB::File(3pm)

NAME
LedgerSMB::File - Provides routines for managing file attachments. SYNPSIS
This provides routines for managing file attachments. Subclasses may be used to provide functionality for specific types of file attachments. PROPERTIES
/ACCESSORS attached_by_id Entity id of the individual who attached the file. attached_by Entity name of individual who attached file attached_at Timestamp of attachment point. content This stores the binary content of the file. mime_type_id ID of the MIME type. Undef if unknown. mime_type_text Standard text code of the MIME type file_name File name, user specified description Description, user specified id ID of file. undef if unknown ref_key Referential key for the file to attach to. reference Reference control code (text string) for attached financial database object. file_class ID of the file class. src_class ID of class of the original attachment point (for a link) file_path Path, relative to $LedgerSMB::tempdir, where file data is stored (for LaTeX use of attached images). dbobject Object for db interface. sizex X axis dimensions, if Image::Size is installed and file is image (only on files retrieved for invoices). sizey Y axis dimensions, if Image::Size is installed and file is image (only on files retrieved for invoices). x_info A hash for extended information Note additionally the $self hashref contains the basic required attributes for DBObject, namely dbh, _roles, and _locale. METHODS
new Returns a blessed object to_hashref Returns a hashref of properties for the object. new_dbobject $file->new_dbobject({base => (LedgerSMB | LedgerSMB::Form), locale => LedgerSMB::Locale}); Creates a new file object. Locale only needs to be specified when using LedgerSMB::Form objects since these are not included. Returns 0 on success. Error codes on exit (OR'd): 1: No database handle included 2: No locale handle included 4: Invalid base. In most cases when working with new code it is simpler to just $file->dbobject(LedgerSMB::DBObject->new({base => $request}); get_mime_type Sends the textual representation of the MIME type. If not set, retrieves and sets it. set_mime_type Sets the mipe_type_id from the mime_type_text detect_type Auto-detects the type of the file. Not yet implemented get Retrives a file. ID and file_class properties must be set. get_for_template({ref_key => int, file_class => int}) Returns file data for invoices for embedded images, except that content is set to a directive relative to tempdir where these files are stored. list({ref_key => int, file_class => int}) Lists files directly attached to the object. list_links({ref_key => int, file_class => int}) Lists the links directly attached to the object. exec_method Provides a compatible interface to LedgerSMB::DBObject::exec_method merge(hashref) Merges in specific attributes from the ref. commit() Returns the value of DBI->commit COPYRIGHT
Copyright (C) 2011 The LedgerSMB Core Team This file is licensed under the Gnu General Public License version 2, or at your option any later version. A copy of the license should have been included with your software. perl v5.14.2 2012-05-14 LedgerSMB::File(3pm)
Man Page