Class: Storage

Storage

Storage handles the access to the database.
Constructor: Initializes the database and all return values.

Requires

  • module:easejs
  • module:AttributeValue
  • module:AttributeValueList
  • module:Parameter
  • module:ParameterList
  • module:RetrievalResult

Methods

getAttributeNames(_function)

Sets the attributeNames array.
Name Type Description
_function function nullable For alternative actions, if an asynchronous function is used.

getAttributesOverview(){Array}

Returns the names of all stored Attributes (tableNames as string).
Returns the current count condition for flush.
Returns the last retrieved Attributes.

getTimeCondition(){integer}

Returns the current time condition for flush.

retrieveAttributes(_tableName, _function)

Retrieves a table and sets the RetrievalResult.
Name Type Description
_tableName String Name for the table that should be retrieved.
_function function nullable For additional actions, if an asynchronous function is used.

setCountCondition(_counter)

Sets the counter for flush.
Name Type Description
_counter integer counter

setTimeCondition(_time)

Sets the time condition for flush.
Name Type Description
_time integer time in ms

store(_attributeValue)

Stores the given Attribute. If the flush condition does not match, the data is first added to the local cache before.
Name Type Description
_attributeValue AttributeValue Value that should be stored.