.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "MQdb::DBObject 3pm" .TH MQdb::DBObject 3pm "2022-12-13" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" MQdb::DBObject \- DESCRIPTION of Object .SH "SYNOPSIS" .IX Header "SYNOPSIS" Root class for all objects in MappedQuery toolkit .SH "DESCRIPTION" .IX Header "DESCRIPTION" Root object for toolkit and all derived subclasses. All objects in the MappedQuery structure are designed to be persisted in a database. Here database is a more broad term and can be considered any object persistance systems. Currently the toolkit works with \s-1SQL\s0 based systems but object databases or custom storage engines are possible. Provides base common methods used by all objects. .SH "AUTHOR" .IX Header "AUTHOR" Contact Jessica Severin: jessica.severin@gmail.com .SH "LICENSE" .IX Header "LICENSE" .Vb 10 \& * Software License Agreement (BSD License) \& * MappedQueryDB [MQdb] toolkit \& * copyright (c) 2006\-2009 Jessica Severin \& * All rights reserved. \& * Redistribution and use in source and binary forms, with or without \& * modification, are permitted provided that the following conditions are met: \& * * Redistributions of source code must retain the above copyright \& * notice, this list of conditions and the following disclaimer. \& * * Redistributions in binary form must reproduce the above copyright \& * notice, this list of conditions and the following disclaimer in the \& * documentation and/or other materials provided with the distribution. \& * * Neither the name of Jessica Severin nor the \& * names of its contributors may be used to endorse or promote products \& * derived from this software without specific prior written permission. \& * \& * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS \*(Aq\*(AqAS IS\*(Aq\*(Aq AND ANY \& * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \& * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \& * DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS BE LIABLE FOR ANY \& * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \& * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \& * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND \& * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \& * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \& * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .Ve .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 3 \& Description: instance creation method \& Returntype : instance of this Class (subclass) \& Exceptions : none .Ve .SS "init" .IX Subsection "init" .Vb 3 \& Description: initialization method which subclasses can extend \& Returntype : $self \& Exceptions : subclass dependent .Ve .SS "copy" .IX Subsection "copy" .Vb 4 \& Description: Shallow copy which copies all base attributes of object \& to new instance of same class \& Returntype : same as calling instance \& Exceptions : subclass dependent .Ve .SS "class" .IX Subsection "class" .Vb 5 \& Description: fixed string symbol for this class. Must be implemented \& for each subclass and each subclass within toolkit \& should return a unique name. used by global methods. \& Returntype : string \& Exceptions : error if subclass does not redefine .Ve .SS "database" .IX Subsection "database" .Vb 4 \& Description: the MQdb::Database where this object is permanently persisted to. \& Here database is any object persistance system. \& Returntype : MQdb::Database \& Exceptions : die if invalid setter value type is provided .Ve .SS "primary_id" .IX Subsection "primary_id" .Vb 3 \& Description: the unique identifier for this object within database. \& Returntype : scalar or UNDEF \& Exceptions : none .Ve .SS "id" .IX Subsection "id" .Vb 4 \& Description: the unique identifier for this object within database. \& Returns empty string if not persisted. \& Returntype : scalar or \*(Aq\*(Aq \& Exceptions : none .Ve .SS "db_id" .IX Subsection "db_id" .Vb 4 \& Description: the worldwide unique identifier for this object. \& A URL\-like combination of database, class, and id \& Returntype : string or undef if database is not defined \& Exceptions : none .Ve .SS "display_desc" .IX Subsection "display_desc" .Vb 5 \& Description: general purpose debugging method that returns a nice \& human readable description of the object instance contents. \& Each subclass should implement and return a nice string. \& Returntype : string scalar \& Exceptions : none .Ve .SS "display_info" .IX Subsection "display_info" .Vb 4 \& Description: convenience method which prints the display_desc string \& with a carriage return to STDOUT. useful for debugging. \& Returntype : none \& Exceptions : none .Ve .SS "xml" .IX Subsection "xml" .Vb 7 \& Description: every object in system should be persistable in XML format. \& returns an XML description of the object and all child objects. \& Each subclass must implement and return a proper XML string. \& Best if one implements xml_start() and xml_end() and use here. \& Returntype : string scalar \& Exceptions : none \& Default : default is a simple xml_start + xml_end .Ve .SS "xml_start" .IX Subsection "xml_start" .Vb 7 \& Description: every object in system should be persistable in XML format. \& returns an XML description of the object and all child objects. \& Each subclass should OVERRIDE this method and return a proper XML string. \& xml_start is the primary XML start tag \& Example : return sprintf("", $id, $name....); \& Returntype : string scalar \& Exceptions : none .Ve .SS "xml_end" .IX Subsection "xml_end" .Vb 7 \& Description: every object in system should be persistable in XML format. \& returns an XML description of the object and all child objects. \& Each subclass should OVERRIDE this method and return a proper XML string. \& xml_end is the primary XML end tag \& Example : return ""; \& Returntype : string scalar \& Exceptions : none .Ve .SS "simple_xml" .IX Subsection "simple_xml" .Vb 5 \& Description: short hand for xml_start() . xml_end() \& Can be used when only the primary XML start tag and attributes are needed \& No need to override if xml_start() and xml_end() are implemented \& Returntype : string scalar \& Exceptions : none .Ve