Class Index | File Index

Classes


Class Metadata


Defined in: Metadata.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This prototype provides dynamic database records by storing data as JavaScript object source (similar to JSON) in a dedicated database column.
Method Summary
Method Attributes Method Name and Description
 
Removes all properties and values from a Metadata instance.
 
get(key)
Retrieves the value of a property of a Metadata instance.
 
Retrieves all properties and values of a Metadata instance.
 
Retrieves the name of the property that contains the data for the Metadata instance.
 
keys()
Get all valid keys of a Metadata instance.
 
load()
Retrieves the properties and values of a Metadata instance from the parent node.
 
 
remove(key)
Removes a property from a Metadata instance.
 
save()
Copies the properties and values of a Metadata instance to the parent node.
 
set(key, value)
Copies a value into a property of a Metadata instance.
 
setData(obj)
Replaces all properties and values of a Metadata instance with those of another object.
 
size()
Retrieves the number of properties contained in a Metadata instance.
 
Concatenates the source of the underlying HopObject of a Metadata instance.
 
Concatenates a string representation of a Metadata instance.
Class Detail
Metadata()
This prototype provides dynamic database records by storing data as JavaScript object source (similar to JSON) in a dedicated database column.
Method Detail
destroy()
Removes all properties and values from a Metadata instance.

{Object} get(key)
Retrieves the value of a property of a Metadata instance. If no argument is given the complete metadata structure is returned.
Parameters:
{String} key
The name of the desired property
Returns:
{Object} The resulting value

{Object} getData()
Retrieves all properties and values of a Metadata instance.
Deprecated:
Use get() with no arguments instead
Returns:
{Object} The property map of a Metadata instance

{String} getDataSourceName()
Retrieves the name of the property that contains the data for the Metadata instance. The name is constructed out of the instances's mountpoint and the suffix "_data".
Returns:
{String} The resulting value

{String[]} keys()
Get all valid keys of a Metadata instance.
Returns:
{String[]} The list of valid keys

{Object} load()
Retrieves the properties and values of a Metadata instance from the parent node.
Returns:
{Object}

{HopObject} onUnhandledMacro(name)
Parameters:
{String} name
Returns:
{HopObject}

remove(key)
Removes a property from a Metadata instance.
Parameters:
{String} key
The name of the desired property

save()
Copies the properties and values of a Metadata instance to the parent node.

set(key, value)
Copies a value into a property of a Metadata instance. If the first argument is omitted the complete metadata is replaced with the second argument.
Parameters:
{String} key
The name of the desired property
{Object} value
The future value of the property

setData(obj)
Replaces all properties and values of a Metadata instance with those of another object.
Parameters:
{Object} obj
The replacing data
Deprecated:
Use set() with a single argument instead

{Number} size()
Retrieves the number of properties contained in a Metadata instance.
Returns:
{Number} The size of a Metadata instance

{String} toSource()
Concatenates the source of the underlying HopObject of a Metadata instance. Useful for debugging purposes.
Returns:
{String} The source of the underlying HopObject

{String} toString()
Concatenates a string representation of a Metadata instance.
Returns:
{String} A string representing a Metadata object

Documentation generated by JsDoc Toolkit 2.3.3-beta on Sat Jun 05 2010 17:47:56 GMT+0200 (CEST)