Class StorableFloat

Description

This is the StorablePrimitive equivalent of Float.

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

SObject
   |
   --Magnitude
      |
      --Number
         |
         --Float
            |
            --Double
               |
               --StorableFloat
Method Summary
void alterQuery (mixed $query)
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)
Methods
alterQuery (line 160)

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)
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 StorableFloat createAndPopulate (array $dbRow)
  • array $dbRow
insert (line 104)

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 172)

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 132)

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 94)

Set the value

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

Redefinition of:
Double::_setValue()
Set the internal value to a PHP primitive.

Inherited Methods

Inherited From Double

Double::fromString()
Double::withValue()
Double::zero()
Double::_setValue()

Inherited From Float

Float::dividedBy()
Float::fromString()
Float::multipliedBy()
Float::plus()
Float::withValue()
Float::zero()
Float::_setValue()

Inherited From Number

Number::abs()
Number::asDouble()
Number::asFloat()
Number::asInteger()
Number::asNumber()
Number::ceiling()
Number::dividedBy()
Number::floor()
Number::fromString()
Number::isEqualTo()
Number::isLessThan()
Number::minus()
Number::modIntegerQuotient()
Number::modulo()
Number::multipliedBy()
Number::negated()
Number::plus()
Number::printableString()
Number::reciprical()
Number::remainder()
Number::remIntegerQuotient()
Number::truncated()
Number::value()
Number::withValue()
Number::zero()
Number::_setValue()

Inherited From Magnitude

Magnitude::isBetween()
Magnitude::isEqualTo()
Magnitude::isGreaterThan()
Magnitude::isGreaterThanOrEqualTo()
Magnitude::isLessThan()
Magnitude::isLessThanOrEqualTo()
Magnitude::max()
Magnitude::min()

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