| alpha--model--types

# Class: Relation Source Location: /model/types/Relation.inc ## Class Relation Class Overview
Implements interfaces: AlphaTypeInterface The Relation complex data type Located in /model/types/Relation.inc [line 52]
    AlphaType
       |
       --Relation
Author(s): John Collins <dev@alphaframework.org> Information Tags:
Version: | $Id: Relation.inc 1341 2011-03-17 15:02:02Z johnc $
Copyright: | Copyright (c) 2011, John Collins (founder of Alpha Framework). 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 the Alpha Framework 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 AND
     CONTRIBUTORS "AS IS" 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 THE COPYRIGHT HOLDER OR
     CONTRIBUTORS 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.
Since: | 1.0
License: | The BSD License
| Properties $helper | Methods __construct getLookup getRelatedClass getRelatedClassDisplayField getRelatedClassDisplayFieldValue getRelatedClassField getRelatedClassHeaderFields getRelatedObject getRelatedObjects getRelationType getRule getSide getSize getValue setRelatedClass setRelatedClassDisplayField setRelatedClassField setRelatedClassHeaderFields setRelationType setRule setTaggedClass setValue
[ Top ] Inherited Properties, Constants, and Methods
Inherited Properties | Inherited Methods | Inherited Constants
--- | --- | ---
| Inherited From AlphaType AlphaType::getHelper() Used to get the validation helper message string AlphaType::setHelper() Set the validation helper text AlphaType::__toString() Used to convert the object to a printable string |
[ Top ] Constant Summary
MAX_SIZE | The absolute maximum size of the value for the this Relation
[ Top ] Property Summary
string | $helper | The error message for the Relation type when validation fails
[ Top ] Method Summary
Relation | __construct() | Constructor
RelationLookup | getLookup() | Get the lookup object if available (only on MANY-TO-MANY relations, null otherwise)
string | getRelatedClass() | Get the name of the business object class that this class is related to
string | getRelatedClassDisplayField() | Getter for the display field from the related class
string | getRelatedClassDisplayFieldValue() | Getter for the display value of the related class field. In the case of a MANY-TO-MANY Relation, a comma-seperated sorted list of values is returned.
string | getRelatedClassField() | Getter for the field of the related class
array | getRelatedClassHeaderFields() | Getter for the selection widget field headings of the related class
array | getRelatedObject() | For one-to-one relations, get the object on the other side
array | getRelatedObjects() | For one-to-many and many-to-many relations, get the objects on the other side
string | getRelationType() | Getter for the relation type
string | getRule() | Get the validation rule
string | getSide() | Gets the side ('left' or 'right') of the passed classname on the current Relation object
integer | getSize() | Get the allowable size of the Relation in the database field
mixed | getValue() | Getter for the Relation value
void | setRelatedClass() | Set the name of the business object class that this class is related to
void | setRelatedClassDisplayField() | Setter for the display field from the related class
void | setRelatedClassField() | Setter for the field of the related class
void | setRelatedClassHeaderFields() | Setter for ONE-TO-MANY relations, which sets the header fields to render from the related class
void | setRelationType() | Setter for the relation type
void | setRule() | Setter to override the default validation rule
void | setTaggedClass() | Set the taggedClass property to the name of the tagged class when building relations to the TagObject BO.
void | setValue() | Setter for the value (OID of related object) of this relation
[ Top ] Properties string $helper [line 174] The error message for the Relation type when validation fails API Tags:
Access: | protected
Information Tags:
Since: | 1.0
[ Top ] Methods Constructor __construct [line 197]
`Relation __construct( )`
Constructor API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getLookup [line 632]
`RelationLookup getLookup( )`
Get the lookup object if available (only on MANY-TO-MANY relations, null otherwise) API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getRelatedClass [line 240]
`string getRelatedClass( [ $side = ''], string $RC )`
Get the name of the business object class that this class is related to Parameters:
string | $RC: |
| $side: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
[ Top ] getRelatedClassDisplayField [line 351]
`string getRelatedClassDisplayField( [string $side = ''] )`
Getter for the display field from the related class Parameters:
string | $side: | Only required for MANY-TO-MANY relations
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
[ Top ] getRelatedClassDisplayFieldValue [line 466]
`string getRelatedClassDisplayFieldValue( [string $accessingClassName = ''] )`
Getter for the display value of the related class field. In the case of a MANY-TO-MANY Relation, a comma-seperated sorted list of values is returned. Parameters:
string | $accessingClassName: | Used to indicate the reading side when accessing from MANY-TO-MANY relation (leave blank for other relation types)
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Throws: | AlphaException
Since: | 1.0
[ Top ] getRelatedClassField [line 294]
`string getRelatedClassField( )`
Getter for the field of the related class API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getRelatedClassHeaderFields [line 315]
`array getRelatedClassHeaderFields( )`
Getter for the selection widget field headings of the related class API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getRelatedObject [line 601]
`array getRelatedObject( )`
For one-to-one relations, get the object on the other side API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | AlphaException
[ Top ] getRelatedObjects [line 536]
`array getRelatedObjects( [ $accessingClassName = ''] )`
For one-to-many and many-to-many relations, get the objects on the other side string $accessingClassName Used to indicate the reading side when accessing from MANY-TO-MANY relation (leave blank for other relation types) Parameters:
| $accessingClassName: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Throws: | AlphaException
Since: | 1.0
[ Top ] getRelationType [line 400]
`string getRelationType( )`
Getter for the relation type API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getRule [line 442]
`string getRule( )`
Get the validation rule API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getSide [line 644]
`string getSide( string $BOClassname )`
Gets the side ('left' or 'right') of the passed classname on the current Relation object Parameters:
string | $BOClassname: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
[ Top ] getSize [line 622]
`integer getSize( )`
Get the allowable size of the Relation in the database field API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] getValue [line 432]
`mixed getValue( )`
Getter for the Relation value API Tags:
Access: | public
Information Tags:
Since: | 1.0
Implementation of: AlphaTypeInterface::getValue() Get the value [ Top ] setRelatedClass [line 210]
`void setRelatedClass( string $RC, [string $side = ''] )`
Set the name of the business object class that this class is related to Parameters:
string | $RC: |
string | $side: | Only required for MANY-TO-MANY relations
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
[ Top ] setRelatedClassDisplayField [line 327]
`void setRelatedClassDisplayField( string $RCDF, [string $side = ''] )`
Setter for the display field from the related class Parameters:
string | $RCDF: |
string | $side: | Only required for MANY-TO-MANY relations
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
[ Top ] setRelatedClassField [line 265]
`void setRelatedClassField( string $RCF )`
Setter for the field of the related class Parameters:
string | $RCF: |
API Tags:
Access: | public
Information Tags:
Throws: | IllegalArguementException
Throws: | AlphaException
Since: | 1.0
[ Top ] setRelatedClassHeaderFields [line 305]
`void setRelatedClassHeaderFields( array $fieldNames )`
Setter for ONE-TO-MANY relations, which sets the header fields to render from the related class Parameters:
array | $fieldNames: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setRelationType [line 377]
`void setRelationType( string $RT )`
Setter for the relation type Parameters:
string | $RT: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
Throws: | IllegalArguementException
Throws: | FailedLookupCreateException
[ Top ] setRule [line 452]
`void setRule( string $rule )`
Setter to override the default validation rule Parameters:
string | $rule: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setTaggedClass [line 661]
`void setTaggedClass( $taggedClass $taggedClass )`
Set the taggedClass property to the name of the tagged class when building relations to the TagObject BO. Parameters:
$taggedClass | $taggedClass: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
[ Top ] setValue [line 411]
`void setValue( integer $val )`
Setter for the value (OID of related object) of this relation Parameters:
integer | $val: |
API Tags:
Access: | public
Information Tags:
Since: | 1.0
Throws: | IllegalArguementException
Implementation of: AlphaTypeInterface::setValue() Set the value of the type [ Top ] Constants MAX_SIZE = 11 [line 190] The absolute maximum size of the value for the this Relation Information Tags:
Since: | 1.0
[ Top ] Documentation generated on Thu, 17 Mar 2011 16:44:42 +0000 by phpDocumentor 1.4.3