SDRResource Class Reference
[SDR Model Objects]

Model class for SDRResource entity. More...

Inheritance diagram for SDRResource:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($constraints=null, $multi=false)
 Constructs new SDRResource object.
 addSDRResourceProject ($project)
 Add new SDRResourceProject object connected to this object.
 addSDRSearchWordCount ($searchWord, $field, $count)
 Add new SDRSearchWordCount object connected to this object.
 addSDRVersion ($parent=null, $createdAgent, $modifiedAgent, $state= '', $comment= '', $created= '', $modified= '0000-00-00 00:00:00')
 Add new SDRVersion object connected to this object.
 addSDRVersionCache ($version, $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.
 getParentPrimaryProject ()
 Retrieves parent object of this object.
 getParentPrimaryProjectMulti ($depth=1)
 Retrieves parent object of this object with foreign objects.
 listSDRResourceProjects ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRResourceProject objects.
 listSDRResourceProjectsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRResourceProject objects using joins.
 listSDRSearchWordCounts ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRSearchWordCount objects.
 listSDRSearchWordCountsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRSearchWordCount objects using joins.
 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.
 listSDRVersions ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRVersion objects.
 listSDRVersionsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRVersion objects using joins.

Static Public Member Functions

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 SDRResource objects.
static getListMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of SDRResource 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 SDRResource entity.

INSERT DESCRIPTION HERE

Definition at line 12 of file SDRResource.php5.


Constructor & Destructor Documentation

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

Constructs new SDRResource 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

Definition at line 62 of file SDRResource.php5.

References SDatabaseModel::populate(), SModel2::registerAttributes(), SDatabaseModel::registerPrimaryKey(), and SDatabaseModel::registerTableName().


Member Function Documentation

SDRResource::addSDRResourceProject ( project  ) 

Add new SDRResourceProject object connected to this object.

This method creates a new SDRResourceProject 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 SDRResourceProject 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:
$project [SDRProject]: Can also be foreign key value. INSERT DESCRIPTION HERE
Returns:
[SDRResourceProject]: new object (already committed) or null on failure

Definition at line 455 of file SDRResource.php5.

References SDatabaseModel::commit().

SDRResource::addSDRSearchWordCount ( searchWord,
field,
count 
)

Add new SDRSearchWordCount object connected to this object.

This method creates a new SDRSearchWordCount 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 SDRSearchWordCount 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:
$searchWord [SDRSearchWord]: Can also be foreign key value. INSERT DESCRIPTION HERE
$field [SDRField]: Can also be foreign key value. INSERT DESCRIPTION HERE
$count [int]: INSERT DESCRIPTION HERE
Returns:
[SDRSearchWordCount]: new object (already committed) or null on failure

Definition at line 375 of file SDRResource.php5.

References SDatabaseModel::commit().

SDRResource::addSDRVersion ( parent = null,
createdAgent,
modifiedAgent,
state = '',
comment = '',
created = '',
modified = '0000-00-00 00:00:00' 
)

Add new SDRVersion object connected to this object.

This method creates a new SDRVersion 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 SDRVersion 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:
$parent [int]: INSERT DESCRIPTION HERE
$createdAgent [SDRAgent]: Can also be foreign key value. INSERT DESCRIPTION HERE
$modifiedAgent [SDRAgent]: Can also be foreign key value. INSERT DESCRIPTION HERE
$state [string]: INSERT DESCRIPTION HERE
$comment [string]: INSERT DESCRIPTION HERE
$created [time]: INSERT DESCRIPTION HERE
$modified [time]: INSERT DESCRIPTION HERE
Returns:
[SDRVersion]: new object (already committed) or null on failure

Definition at line 536 of file SDRResource.php5.

References SDatabaseModel::commit().

SDRResource::addSDRVersionCache ( version,
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:
$version [SDRVersion]: 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

Definition at line 290 of file SDRResource.php5.

References SDatabaseModel::commit().

static SDRResource::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

Definition at line 124 of file SDRResource.php5.

static SDRResource::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

Definition at line 158 of file SDRResource.php5.

static SDRResource::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

Definition at line 82 of file SDRResource.php5.

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

Retrieves list of SDRResource 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 SDRResource]: list of objects matching the criteria, if any, or null on error

Definition at line 175 of file SDRResource.php5.

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

Retrieves list of SDRResource 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 SDRResource]: list of objects matching the criteria, if any, or null on error

Definition at line 194 of file SDRResource.php5.

SDRResource::getParentPrimaryProject (  ) 

Retrieves parent object of this object.

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

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

Definition at line 208 of file SDRResource.php5.

References SDRProject::retrieve().

SDRResource::getParentPrimaryProjectMulti ( depth = 1  ) 

Retrieves parent object of this object with foreign objects.

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

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

Definition at line 221 of file SDRResource.php5.

static SDRResource::getTableNameStatic (  )  [static]

Retrieves name of table represented by this class.

Returns:
[string]: table name

Definition at line 91 of file SDRResource.php5.

SDRResource::listSDRResourceProjects ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRResourceProject objects.

This method retrieves objects of type SDRResourceProject which have their cserdId field equal to the value of this object's cserdId 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:
[SDRResourceProject]: array of child objects, or an integer if $count is true, or null on error

Definition at line 411 of file SDRResource.php5.

SDRResource::listSDRResourceProjectsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRResourceProject objects using joins.

This method retrieves objects of type SDRResourceProject which have their cserdId field equal to the value of this object's cserdId 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 listSDRResourceProjects(), 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:
[SDRResourceProject]: array of child objects, or an integer if $count is true, or null on error

Definition at line 435 of file SDRResource.php5.

SDRResource::listSDRSearchWordCounts ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRSearchWordCount objects.

This method retrieves objects of type SDRSearchWordCount which have their cserdId field equal to the value of this object's cserdId 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:
[SDRSearchWordCount]: array of child objects, or an integer if $count is true, or null on error

Definition at line 329 of file SDRResource.php5.

SDRResource::listSDRSearchWordCountsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRSearchWordCount objects using joins.

This method retrieves objects of type SDRSearchWordCount which have their cserdId field equal to the value of this object's cserdId 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 listSDRSearchWordCounts(), 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:
[SDRSearchWordCount]: array of child objects, or an integer if $count is true, or null on error

Definition at line 353 of file SDRResource.php5.

SDRResource::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 cserdId field equal to the value of this object's cserdId 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

Definition at line 241 of file SDRResource.php5.

SDRResource::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 cserdId field equal to the value of this object's cserdId 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

Definition at line 265 of file SDRResource.php5.

SDRResource::listSDRVersions ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRVersion objects.

This method retrieves objects of type SDRVersion which have their cserdId field equal to the value of this object's cserdId 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:
[SDRVersion]: array of child objects, or an integer if $count is true, or null on error

Definition at line 486 of file SDRResource.php5.

SDRResource::listSDRVersionsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRVersion objects using joins.

This method retrieves objects of type SDRVersion which have their cserdId field equal to the value of this object's cserdId 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 listSDRVersions(), 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:
[SDRVersion]: array of child objects, or an integer if $count is true, or null on error

Definition at line 510 of file SDRResource.php5.

static SDRResource::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:
[SDRResource]: 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)

Definition at line 106 of file SDRResource.php5.

Referenced by SDRVersionCache::getParentCserd(), SDRVersion::getParentCserd(), SDRSearchWordCount::getParentCserd(), and SDRResourceProject::getParentCserd().

static SDRResource::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:
[SDRResource]: 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)

Definition at line 140 of file SDRResource.php5.

Referenced by SDRVersionCache::getParentCserdMulti(), SDRVersion::getParentCserdMulti(), SDRSearchWordCount::getParentCserdMulti(), and SDRResourceProject::getParentCserdMulti().


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

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