SDRField Class Reference
[SDR Model Objects]

Model class for SDRField entity. More...

Inheritance diagram for SDRField:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($constraints=null)
 Constructs new SDRField object.
 addSDRFieldValue ($value)
 Add new SDRFieldValue object connected to this object.
 addSDRProjectField ($project, $indexOrder, $required= '')
 Add new SDRProjectField object connected to this object.
 addSDRSearchWordCount ($searchWord, $cserd, $count)
 Add new SDRSearchWordCount object connected to this object.
 addSDRVersionFieldValue ($version, $value)
 Add new SDRVersionFieldValue object connected to this object.
 listSDRFieldValues ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRFieldValue objects.
 listSDRFieldValuesMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRFieldValue objects using joins.
 listSDRProjectFields ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of children SDRProjectField objects.
 listSDRProjectFieldsMulti ($constraints=array(), $limit=array(), $order=array(), $count=false, $depth=1)
 Retrieves list of children SDRProjectField 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.
 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 exists ($constraints=array())
 Checks to see if object exists according to constraints.
static findOrAddField ($name)
 Retrieve a field by a given name, or create and return if it does not exist.
static getAttributesStatic ()
 Retrieves attributes and information about them.
static getList ($constraints=array(), $limit=array(), $order=array(), $count=false)
 Retrieves list of SDRField objects.
static getNamesAndIds ()
 Get an associative array where the keys are the field names and the values are the field IDs.
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 Public Attributes

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


Detailed Description

Model class for SDRField entity.

A metadata field meant to describe some attribute of the resource (i.e., Type or Subject)


Constructor & Destructor Documentation

SDRField::__construct ( constraints = null  ) 

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


Member Function Documentation

SDRField::addSDRFieldValue ( value  ) 

Add new SDRFieldValue object connected to this object.

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

SDRField::addSDRProjectField ( project,
indexOrder,
required = '' 
)

Add new SDRProjectField object connected to this object.

This method creates a new SDRProjectField 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 SDRProjectField 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
$indexOrder [int]: INSERT DESCRIPTION HERE
$required [string]: INSERT DESCRIPTION HERE
Returns:
[SDRProjectField]: new object (already committed) or null on failure

SDRField::addSDRSearchWordCount ( searchWord,
cserd,
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
$cserd [SDRResource]: Can also be foreign key value. INSERT DESCRIPTION HERE
$count [int]: INSERT DESCRIPTION HERE
Returns:
[SDRSearchWordCount]: new object (already committed) or null on failure

SDRField::addSDRVersionFieldValue ( version,
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:
$version [SDRVersion]: 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 SDRField::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 SDRField::findOrAddField ( name  )  [static]

Retrieve a field by a given name, or create and return if it does not exist.

Parameters:
$name [string]: The name of the field
Returns:
[SDRField]: A field with the specified name, or false on failure

static SDRField::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 SDRField::getList ( constraints = array(),
limit = array(),
order = array(),
count = false 
) [static]

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

static SDRField::getTableNameStatic (  )  [static]

Retrieves name of table represented by this class.

Returns:
[string]: table name

SDRField::listSDRFieldValues ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRFieldValue objects.

This method retrieves objects of type SDRFieldValue which have their fieldId 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:
[SDRFieldValue]: array of child objects, or an integer if $count is true, or null on error

SDRField::listSDRFieldValuesMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRFieldValue objects using joins.

This method retrieves objects of type SDRFieldValue which have their fieldId 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 listSDRFieldValues(), 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:
[SDRFieldValue]: array of child objects, or an integer if $count is true, or null on error

SDRField::listSDRProjectFields ( constraints = array(),
limit = array(),
order = array(),
count = false 
)

Retrieves list of children SDRProjectField objects.

This method retrieves objects of type SDRProjectField which have their fieldId 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:
[SDRProjectField]: array of child objects, or an integer if $count is true, or null on error

SDRField::listSDRProjectFieldsMulti ( constraints = array(),
limit = array(),
order = array(),
count = false,
depth = 1 
)

Retrieves list of children SDRProjectField objects using joins.

This method retrieves objects of type SDRProjectField which have their fieldId 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 listSDRProjectFields(), 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:
[SDRProjectField]: array of child objects, or an integer if $count is true, or null on error

SDRField::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 fieldId 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:
[SDRSearchWordCount]: array of child objects, or an integer if $count is true, or null on error

SDRField::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 fieldId 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 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

SDRField::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 fieldId 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

SDRField::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 fieldId 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 SDRField::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:
[SDRField]: 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:40 2010 for Common by  doxygen 1.5.6