Class StorableBoolean

Description

This is the StorablePrimitive equivalent of Boolean.

Located in /harmoni/core/dataManager/storablePrimitives/StorableBoolean.class.php (line 13)

SObject
   |
   --Boolean
      |
      --StorableBoolean
Method Summary
void alterQuery (mixed $query)
object asABlob ()
object asABoolean ()
object asAFloat ()
object asAInteger ()
object asAShortString ()
object asAString ()
integer insert (integer $dbID)
string makeSearchString (ref $value, [int $searchType = SEARCH_TYPE_EQUALS])
void prune (integer $dbID, integer $dataID)
void update (integer $dbID, integer $dataID)
void _setValue ($value $value)
Variables

Inherited Variables

Inherited from Boolean

Boolean::$_bool
Methods
alterQuery (line 131)

Takes an existing SelectQuery and adds a table join and some columns so that when it is executed the actual data can be retrieved from the row. The join condition must be "fk_data = data_id_field", since the field "fk_data" is already part of the DataManager's table structure.

  • access: public
void alterQuery (mixed $query)
asABlob (line 169)

Convert this object to a StorableBlob

  • since: 6/9/06
  • access: public
object asABlob ()
asABoolean (line 224)

Convert this object to a Boolean

  • since: 6/9/06
  • access: public
object asABoolean ()
asAFloat (line 213)

Convert this object to a StorableFloat

  • since: 6/9/06
  • access: public
object asAFloat ()
asAInteger (line 202)

Convert this object to a StorableInteger

  • since: 6/9/06
  • access: public
object asAInteger ()
asAShortString (line 191)

Convert this object to a StorableShortString

  • since: 6/9/06
  • access: public
object asAShortString ()
asAString (line 180)

Convert this object to a StorableString

  • since: 6/9/06
  • access: public
object asAString ()
createAndPopulate (line 30)

Takes a single database row, which would contain the columns added by alterQuery() and extracts the values to setup the object with the appropriate data.

  • static:
  • access: public
object StorableBoolean createAndPopulate (array $dbRow)
  • array $dbRow
insert (line 75)

Inserts a new row into the Database with the data contained in the object.

  • return: Returns the new ID of the data stored.
  • access: public
integer insert (integer $dbID)
  • integer $dbID: The DBHandler database ID to query.
makeSearchString (line 46)

Returns a string that could be inserted into an SQL query's WHERE clause, based on the Primitive value that is passed. It is used when searching for datasets that contain a certain field=value pair.

  • return: or NULL if no searching is allowed.
  • static:
string makeSearchString (ref $value, [int $searchType = SEARCH_TYPE_EQUALS])
  • int $searchType: One of the SEARCH_TYPE_* constants, defining what type of search this should be (ie, equals, contains, greater than, less than, etc)
  • ref $value: object $value The Primitive object to search for.
prune (line 143)

Deletes the data row from the appropriate table.

  • access: public
void prune (integer $dbID, integer $dataID)
  • integer $dbID: The DBHandler database ID to query.
  • integer $dataID: The ID in the database of the data to be deleted.
update (line 103)

Uses the ID passed and updates the database row with new data.

  • access: public
void update (integer $dbID, integer $dataID)
  • integer $dbID: The DBHandler database ID to query.
  • integer $dataID: The ID in the database of the data to be updated.
_setValue (line 65)

Set the value

  • since: 7/13/05
  • access: private
void _setValue ($value $value)
  • $value $value

Inherited Methods

Inherited From Boolean

Boolean::Boolean()
Boolean::false()
Boolean::fromString()
Boolean::isEqualTo()
Boolean::isFalse()
Boolean::isTrue()
Boolean::printableString()
Boolean::true()
Boolean::value()
Boolean::withValue()

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:26:44 -0400 by phpDocumentor 1.3.0RC3