Class PersistentOrderedSet

Description

The Set provides an implementation of the set interface that stores the sets of ids in a database. Note: Nothing should be implied in the order that the ids are returned.

Sets provide for the easy storage of groups of ids.

  • author: Adam Franco
  • version: $Id: PersistentOrderedSet.class.php,v 1.5 2007/09/13 16:04:21 adamfranco Exp $
  • license: GNU General Public License (GPL)
  • copyright: Copyright © 2005, Middlebury College

Located in /harmoni/core/sets/PersistentOrderedSet.class.php (line 20)

SObject
   |
   --OrderedSet
      |
      --PersistentOrderedSet
Variable Summary
int $_dbIndex
Method Summary
PersistentOrderedSet PersistentOrderedSet (object Id $setId, integer $dbIndex)
void addItem (object Id $id)
void moveDown (object Id $id)
void moveToPosition (object Id $id, integer $position)
void moveUp (object Id $id)
void removeAllItems ()
void removeItem (object Id $id)
void _updateOrders (array $oldOrders)
Variables
int $_dbIndex (line 27)
  • var: The dbIndex where this set is stored.
  • access: private

Inherited Variables

Inherited from OrderedSet

OrderedSet::$_i
OrderedSet::$_items
OrderedSet::$_setId
Methods
Constructor PersistentOrderedSet (line 35)

Constructor.

PersistentOrderedSet PersistentOrderedSet (object Id $setId, integer $dbIndex)
  • object Id $setId: The Id of this set.
  • integer $dbIndex: The index of the database connection which has tables in which to store the set.
addItem (line 80)

Add a new Id to the set.

  • access: public
void addItem (object Id $id)
  • object Id $id: The Id to add.

Redefinition of:
OrderedSet::addItem()
Add a new Id to the set.
moveDown (line 182)

Move the specified id toward the end of the set.

  • access: public
void moveDown (object Id $id)
  • object Id $id: The Id of the item to move.

Redefinition of:
OrderedSet::moveDown()
Move the specified id toward the end of the set.
moveToPosition (line 148)

Move the specified id to the specified position in the set.

  • access: public
void moveToPosition (object Id $id, integer $position)
  • object Id $id: The Id of the item to move.
  • integer $position: The new position of the specified id.

Redefinition of:
OrderedSet::moveToPosition()
Move the specified id to the specified position in the set.
moveUp (line 165)

Move the specified id toward the begining of the set.

  • access: public
void moveUp (object Id $id)
  • object Id $id: The Id of the item to move.

Redefinition of:
OrderedSet::moveUp()
Move the specified id toward the begining of the set.
removeAllItems (line 128)

Remove all Items from the set.

  • access: public
void removeAllItems ()

Redefinition of:
OrderedSet::removeAllItems()
Remove all Items from the set.
removeItem (line 103)

Remove an Id from the set.

  • access: public
void removeItem (object Id $id)
  • object Id $id: The Id to remove.

Redefinition of:
OrderedSet::removeItem()
Remove an Id from the set.
_updateOrders (line 200)

Update the orders of the ids in the database.

  • access: private
void _updateOrders (array $oldOrders)
  • array $oldOrders: The previous orders to compare so that only updates will be done to changed orders.

Inherited Methods

Inherited From OrderedSet

OrderedSet::OrderedSet()
OrderedSet::addItem()
OrderedSet::atPosition()
OrderedSet::count()
OrderedSet::getId()
OrderedSet::getPosition()
OrderedSet::hasNext()
OrderedSet::initializeWithData()
OrderedSet::isInSet()
OrderedSet::moveDown()
OrderedSet::moveToBeginning()
OrderedSet::moveToEnd()
OrderedSet::moveToPosition()
OrderedSet::moveUp()
OrderedSet::next()
OrderedSet::removeAllItems()
OrderedSet::removeItem()
OrderedSet::reset()
OrderedSet::toDataString()

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

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