Class VersionConstraint

Description

A VersionConstraint specifies, upon FullDataSet::prune(), what values to actually prune, and which to keep, what DataSetTags to keep, and if the whole DataSets should be deleted or not.

  • version: $Id: VersionConstraint.interface.php,v 1.6 2007/09/04 20:25:33 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/dataManager/versionConstraints/VersionConstraint.interface.php (line 14)


	
			
Direct descendents
Class Description
DateVersionConstraint Limits pruning based on a cutoff date, specified in the past. The date is passed to the constructor, and can be a specific date or a relative date, like "-2 weeks" or "-12 hours". Dates in the future will throw an error.
NumberVersionConstraint Removes versions based on the number for a certain value stored in the database. The maximum number allowed is passed to the constructor, and any extra values will be deleted based on age.
PruneAllVersionConstraint Prunes out ALL inactive values, of everything.
Method Summary
bool checkRecord (ref $record)
void checkRecordFieldValue (ref $value)
void checkTags (ref $record)
Methods
checkRecord (line 42)

Takes a Record and returns if it is still valid or should be deleted. TRUE if it's still OK.

NOTE: if a Record is flagged for deletion and the children are not, then there's gonna be broken data in the database.

  • deprecated: no longer used - Jul 13, 2005
bool checkRecord (ref $record)
  • ref $record: object $record

Redefined in descendants as:
checkRecordFieldValue (line 23)

Takes a RecordFieldValue object and sets "prune" flags for all versions based on whether it should be

pruned from the database or not, depending on the constraint specified in this object. If the version is active, though, nothing is done!

void checkRecordFieldValue (ref $value)

Redefined in descendants as:
checkTags (line 32)

Takes a Record and checks all the tags to make sure none of them fail the constraints. If they do, it asks the RecordTagManager to delete them from the database.

void checkTags (ref $record)
  • ref $record: object $record

Redefined in descendants as:

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