Class RecordFieldValue

Description

Responsible for keeping track of multiple versions of a value for a specific index within a field within a Record.

  • author: Gabe Schine
  • version: $Id: RecordFieldValue.class.php,v 1.22 2007/09/04 20:25:32 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/dataManager/record/RecordFieldValue.class.php (line 24)


	
			
Variable Summary
mixed $_id
mixed $_myIndex
mixed $_oldVersion
mixed $_parent
mixed $_versions
Method Summary
RecordFieldValue RecordFieldValue (mixed $parent, mixed $myIndex)
void commit ()
void delete ()
ref getId ()
integer getIndex ()
ref getVersion (int $verID)
array getVersionIDs ()
bool hasActiveValue ()
bool isActive ()
int numVersions ()
void populate (ref $arrayOfRows)
void prune (ref $versionConstraint)
ref replicate (ref $parent)
void setActiveFlag (bool $bool)
bool setIndex (int $index)
bool setValueFromPrimitive (ref $value)
void takeRow (ref $row)
void|true undelete ()
bool willPruneAll ()
Variables
mixed $_id (line 34)
mixed $_myIndex (line 29)
mixed $_numVersions (line 26)
mixed $_oldVersion (line 32)
mixed $_parent (line 27)
mixed $_versions (line 31)
Methods
Constructor RecordFieldValue (line 36)
RecordFieldValue RecordFieldValue (mixed $parent, mixed $myIndex)
commit (line 80)

Commits the existing (and new, if applicable) versions of this value to the database. If the Record is version controlled and the new value is the same as the old value, it is ignored.

void commit ()
delete (line 288)

Deactivates all existing versions for this value.

void delete ()
getActiveVersion (line 250)

Returns the active RecordFieldData object or FALSE if none exists. If no versions have yet been set, a new RecordFieldData object is created.

  • return: object or false
ref getActiveVersion ()
getId (line 404)

Returns the id this RecordFieldValue object. The unique ID for the info

field should be the RecordID::SchemaFieldLabel::RecordFieldValueIndex

  • return: object Id The id of this object.
ref getId ()
getIndex (line 176)

Returns the index of this RecordFieldValue object.

  • return: The index.
integer getIndex ()
getNewestVersion (line 336)

Returns the most recently created version for this value.

ref getNewestVersion ()
getRecordField (line 394)

Returns the RecordField object that the current object is a part of.

  • return: object FieldValues The parent RecordField object
ref getRecordField ()
getVersion (line 277)

Returns the RecordFieldData object associated with version ID $verID.

  • return: object
ref getVersion (int $verID)
  • int $verID
getVersionIDs (line 268)

Returns an array of version IDs set for this value.

array getVersionIDs ()
hasActiveValue (line 365)

Returns TRUE if we have an active version.

bool hasActiveValue ()
isActive (line 355)

Returns TRUE if a version is active, or if we have no versions defined yet. FALSE otherwise.

bool isActive ()
newRecordFieldData (line 226)

Returns a reference to a new RecordFieldData object and adds it to the list of versions for this value. USED INTERNALLY ONLY

  • return: object
  • access: protected
ref newRecordFieldData ()
numVersions (line 149)

Returns the number of versions we have set for this value.

int numVersions ()
populate (line 50)

Sets up a number of RecordFieldData objects based on an array of database rows.

void populate (ref $arrayOfRows)
  • ref $arrayOfRows: array $arrayOfRows
prune (line 141)

Goes through all the old versions of values and actually DELETES them from the database.

void prune (ref $versionConstraint)
  • ref $versionConstraint: object $versionConstraint A VersionConstraint)
replicate (line 377)

Returns a new RecordFieldData object that is an exact data-specific replicate of the current object.

  • return: object
ref replicate (ref $parent)
  • ref $parent: object A reference to a RecordField object that will act as the parent.
setActiveFlag (line 326)

Calls either delete() or undelete() depending on the value passed.

  • access: public
void setActiveFlag (bool $bool)
  • bool $bool
setIndex (line 158)

sets the index of this entry to $index.

  • return: TRUE if the index was changed. FALSE if not.
bool setIndex (int $index)
  • int $index
setValueFromPrimitive (line 186)

"Sets" the value of this specific index to $value. If the Record is version controlled, a new version is added. Otherwise, the current active version is modified.

bool setValueFromPrimitive (ref $value)
  • ref $value: object $value A SObject object.
takeRow (line 64)

Takes a single row from a database and attempts to populate local objects.

void takeRow (ref $row)
  • ref $row: array $row
undelete (line 311)

Re-activates the newest version value for this index.

  • return: if we're already active.
void|true undelete ()
willPruneAll (line 126)

USED INTERNALLY: Returns true if all of our versions are about to be pruned.

  • access: public
bool willPruneAll ()

Documentation generated on Wed, 19 Sep 2007 10:25:51 -0400 by phpDocumentor 1.3.0RC3