SDRVersion Class Reference
[SDR Model Objects]

Model class for SDRVersion entity. More...

Inheritance diagram for SDRVersion:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($constraints=null, $multi=false)
 Constructs new SDRVersion object.
 addSDRVersionCache ($cserd, $Title= '', $Description= '', $MetadataXMLCache= '', $created= '0000-00-00 00:00:00', $modified= '0000-00-00 00:00:00')
 Add new SDRVersionCache object connected to this object.
 addSDRVersionFieldValue ($field, $value)
 Add new SDRVersionFieldValue object connected to this object.
 getMetadata ()
 Retrieve the metadata for this version as an SDRMetadataObj.
 getParentCreatedAgent ()
 Retrieves parent object of this object.
 getParentCreatedAgentMulti ($depth=1)
 Retrieves parent object of this object with foreign objects.
 getParentCserd ()
 Retrieves parent object of this object.
 getParentCserdMulti ($depth=1)
 Retrieves parent object of this object with foreign objects.
 getParentModifiedAgent ()
 Retrieves parent object of this object.
 getParentModifiedAgentMulti ($depth=1)
 Retrieves parent object of this object with foreign objects.
 listSDRVersionCaches ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRVersionCache objects.
 listSDRVersionCachesMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRVersionCache objects using joins.
 listSDRVersionFieldValues ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRVersionFieldValue objects.
 listSDRVersionFieldValuesMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRVersionFieldValue objects using joins.

Static Public Member Functions

static createVersion ($cserdId, $createdAgentId, $modifiedAgentId, $comment)
 Create and commit a new SDRVersion.
static exists ($constraints=array())
 Checks to see if object exists according to constraints.
static existsMulti ($constraints=array())
 Checks to see if object-set exists according to constraints.
static getAttributesStatic ()
 Retrieves attributes and information about them.
static getList ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of SDRVersion objects.
static getListMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of SDRVersion objects using joins.
static getTableNameStatic ()
 Retrieves name of table represented by this class.
static retrieve ($constraints=array(), $checkOnly=false)
 Retrieves a single object of this type, given the constraints.
static retrieveMulti ($constraints=array(), $checkOnly=false, $depth=1)
 Retrieves a single object of this type, given the constraints, grabbing foreign objects.

Static Public Attributes

static $ATTRIBUTES
 Attributes for this entity and information about them.


Detailed Description

Model class for SDRVersion entity.

INSERT DESCRIPTION HERE


Constructor & Destructor Documentation

SDRVersion::__construct ( constraints = null,
multi = false 
)

Constructs new SDRVersion object.

This method will only populate the object if a constraints array is passed in, to use for selecting the information for the object from the database (see Guide to Database Constraints).

Parameters:
$constraints [array]: constraints array for populating
$multi [boolean]: if true, use joins when populating


Member Function Documentation

SDRVersion::addSDRVersionCache ( cserd,
Title = '',
Description = '',
MetadataXMLCache = '',
created = '0000-00-00 00:00:00',
modified = '0000-00-00 00:00:00' 
)

Add new SDRVersionCache object connected to this object.

This method creates a new SDRVersionCache and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new SDRVersionCache object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$cserd [SDRResource]: Can also be foreign key value. INSERT DESCRIPTION HERE
$Title [string]: INSERT DESCRIPTION HERE
$Description [string]: INSERT DESCRIPTION HERE
$MetadataXMLCache [string]: INSERT DESCRIPTION HERE
$created [time]: INSERT DESCRIPTION HERE
$modified [time]: INSERT DESCRIPTION HERE
Returns:
[SDRVersionCache]: new object (already committed) or null on failure

SDRVersion::addSDRVersionFieldValue ( field,
value 
)

Add new SDRVersionFieldValue object connected to this object.

This method creates a new SDRVersionFieldValue and makes sure that relevant foreign keys in that object point to this object and any other necessary objects as passed in as parameters to this method. For parameters that request another model object, you may either pass in the model object itself, or the id value for that object, as would be used in the foreign key of the new SDRVersionFieldValue object. For example, if the new object needs to point to both this object and, say, a user object, then you can either pass in a user object, or a user ID.

Parameters:
$field [SDRField]: Can also be foreign key value. INSERT DESCRIPTION HERE
$value [SDRValue]: Can also be foreign key value. INSERT DESCRIPTION HERE
Returns:
[SDRVersionFieldValue]: new object (already committed) or null on failure

static SDRVersion::createVersion ( cserdId,
createdAgentId,
modifiedAgentId,
comment 
) [static]

Create and commit a new SDRVersion.

Parameters:
$cserdId [int]: The NUMERIC cserdId for this version
$createdAgentId [int]: The id of the SDRAgent creating this version
$modifiedAgentId [int]: The id of the SDRAgent modifying this version
$comment [string]: A comment describing this version
Returns:
[SDRVersion]: A new version object, or false if it cannot be created

static SDRVersion::exists ( constraints = array()  )  [static]

Checks to see if object exists according to constraints.

This is simply an alias for retrieve($constraints, true);

Parameters:
$constraints [array]: constraints used to check for existence of object
Returns:
[boolean]: whether object exists in DB

static SDRVersion::existsMulti ( constraints = array()  )  [static]

Checks to see if object-set exists according to constraints.

This is simply an alias for retrieveMulti($constraints, true);

Parameters:
$constraints [array]: constraints used to check for existence of object
Returns:
[boolean]: whether object exists in DB

static SDRVersion::getAttributesStatic (  )  [static]

Retrieves attributes and information about them.

This method is needed because there is no generic way to get at the $ATTRIBUTES static member variable without this kind of method. If you do not need to generically grab the attributes of a model class, just use ModelClass::$ATTRIBUTES or $obj->getAttributes().

Returns:
[array]: contents of static $ATTRIBUTES array

static SDRVersion::getList ( constraints = array(),
limit = array(),
order = array(),
count = false 
) [static]

Retrieves list of SDRVersion objects.

See Guide to Database Constraints for more on how to construct constraint and other arrays for this method.

Parameters:
$constraints [array]: limit results by criteria
$limit [array]: limit results by count
$order [array]: change ordering of results
$count [boolean]: if true, return the number of objects that would have been returned, rather than the objects themselves
Returns:
[array of SDRVersion]: list of objects matching the criteria, if any, or null on error

static SDRVersion::getListMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
) [static]

Retrieves list of SDRVersion objects using joins.

See Guide to Database Constraints for more on how to construct constraint and other arrays for this method. This method differs from getList() in that it initializes the objects with joins, so that their child objects are included as well. Everything else is the same

Parameters:
$constraints [array]: limit results by criteria
$limit [array]: limit results by count
$order [array]: change ordering of results
$count [boolean]: if true, return the number of objects that would have been returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[array of SDRVersion]: list of objects matching the criteria, if any, or null on error

SDRVersion::getMetadata (  ) 

Retrieve the metadata for this version as an SDRMetadataObj.

Returns:
[SDRMetadataObj]: The metadata for this version

SDRVersion::getParentCreatedAgent (  ) 

Retrieves parent object of this object.

The parent object of a SDRVersion is a SDRAgent, related by the fact that SDRAgent's id has the same value as our createdAgentId field.

Returns:
[SDRAgent]: parent object, or null on error

SDRVersion::getParentCreatedAgentMulti ( depth = 1  ) 

Retrieves parent object of this object with foreign objects.

The parent object of a SDRVersion is a SDRAgent, related by the fact that SDRAgent's id has the same value as our createdAgentId field.

Parameters:
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRAgent]: parent object, or null on error

SDRVersion::getParentCserd (  ) 

Retrieves parent object of this object.

The parent object of a SDRVersion is a SDRResource, related by the fact that SDRResource's cserdId has the same value as our cserdId field.

Returns:
[SDRResource]: parent object, or null on error

SDRVersion::getParentCserdMulti ( depth = 1  ) 

Retrieves parent object of this object with foreign objects.

The parent object of a SDRVersion is a SDRResource, related by the fact that SDRResource's cserdId has the same value as our cserdId field.

Parameters:
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRResource]: parent object, or null on error

SDRVersion::getParentModifiedAgent (  ) 

Retrieves parent object of this object.

The parent object of a SDRVersion is a SDRAgent, related by the fact that SDRAgent's id has the same value as our modifiedAgentId field.

Returns:
[SDRAgent]: parent object, or null on error

SDRVersion::getParentModifiedAgentMulti ( depth = 1  ) 

Retrieves parent object of this object with foreign objects.

The parent object of a SDRVersion is a SDRAgent, related by the fact that SDRAgent's id has the same value as our modifiedAgentId field.

Parameters:
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRAgent]: parent object, or null on error

static SDRVersion::getTableNameStatic (  )  [static]

Retrieves name of table represented by this class.

Returns:
[string]: table name

SDRVersion::listSDRVersionCaches ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRVersionCache objects.

This method retrieves objects of type SDRVersionCache which have their versionId field equal to the value of this object's id field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[SDRVersionCache]: array of child objects, or an integer if $count is true, or null on error

SDRVersion::listSDRVersionCachesMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRVersionCache objects using joins.

This method retrieves objects of type SDRVersionCache which have their versionId field equal to the value of this object's id field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listSDRVersionCaches(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRVersionCache]: array of child objects, or an integer if $count is true, or null on error

SDRVersion::listSDRVersionFieldValues ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRVersionFieldValue objects.

This method retrieves objects of type SDRVersionFieldValue which have their versionId field equal to the value of this object's id field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
Returns:
[SDRVersionFieldValue]: array of child objects, or an integer if $count is true, or null on error

SDRVersion::listSDRVersionFieldValuesMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRVersionFieldValue objects using joins.

This method retrieves objects of type SDRVersionFieldValue which have their versionId field equal to the value of this object's id field. The constraints, limit and order parameters can be used to trim down and order the results. See Guide to Database Constraints for more on using database constraints with DBI2/SModel2. Unlike listSDRVersionFieldValues(), this method joins the child objects with their parent objects.

Parameters:
$constraints [array]: constraints array to further limit results
$limit [array]: limit array to control how many and which results are returned
$order [array]: order array to control the ordering of the returned results
$count [boolean]: if true, only return the count of how many objects would be returned, rather than the objects themselves
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRVersionFieldValue]: array of child objects, or an integer if $count is true, or null on error

static SDRVersion::retrieve ( constraints = array(),
checkOnly = false 
) [static]

Retrieves a single object of this type, given the constraints.

Use this method instead of the constructor since the constructor cannot return error conditions properly.

Parameters:
$constraints [array]: constraints to use when retrieving object
$checkOnly [boolean]: if true, just return whether the row exists in the DB
Returns:
[SDRVersion]: retrieved object, or null on error or object does not exist (or true/false if $checkOnly is true, to indicate whether the row exists in the DB)

static SDRVersion::retrieveMulti ( constraints = array(),
checkOnly = false,
depth = 1 
) [static]

Retrieves a single object of this type, given the constraints, grabbing foreign objects.

Use this method instead of the constructor since the constructor cannot return error conditions properly. This method uses getListMulti() instead of getList() to grab the object.

Parameters:
$constraints [array]: constraints to use when retrieving object
$checkOnly [boolean]: if true, just return whether the row exists in the DB
$depth [int]: how deep to traverse dependencies when doing joins
Returns:
[SDRVersion]: retrieved object, or null on error or object does not exist (or true/false if $checkOnly is true, to indicate whether the row exists in the DB)


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:02:57 2010 for Common by  doxygen 1.5.6