com.ibm.mashups.enabler.persistence
Interface ModelPersistenceProvider


public ModelPersistenceProvider


Method Summary
 void findBySelection(ModelUrl url, Object selection, Object callback, Object parameters)
           Returns the selected objects.
 Object create(Object context)
           Creates an object based on a given context.
 void remove(Array objects, Object callback, Object parameters)
           Removes the specified objects.
 void store(Array objects, Object callback, Object parameters)
           Stores the specified objects.
 Identifiable getModifiable(Identifiable node)
           Returns the modifiable node of the provided node, if node is not already modifiable.
 

Method Detail

findBySelection

void findBySelection(ModelUrl url,
                     Object selection,
                     Object callback,
                     Object parameters)
Returns the selected objects.

Parameters:
url - url that specifies the object(s) to find
selection - selection criteria; for details on the selection object, refer to the model specific documentation
callback - callback function, which is called with the following arguments: function(result, status, parameters), where
  • result is an array containing the selected objects; may contain zero or more objects
  • status status code of the operation
  • parameters are the parameters as passed into findBySelection
parameters - parameters to pass to the callback function; optional

create

Object create(Object context)
Creates an object based on a given context.

Parameters:
context - context defining properties for the object to create; for details on the selection object, refer to the model specific documentation
Returns:
new object

remove

void remove(Array objects,
            Object callback,
            Object parameters)
Removes the specified objects.

Parameters:
objects - array of objects to remove
callback - callback function, which is called with the following arguments: function(status, parameters), where
  • status status code of the operation
  • parameters are the parameters as passed into remove
parameters - parameters to pass to the callback function; optional

store

void store(Array objects,
           Object callback,
           Object parameters)
Stores the specified objects.

Parameters:
objects - array of objects to store.
callback - callback function, which is called with the following arguments: function(status, parameters), where
  • status status code of the operation
  • parameters are the parameters as passed into store
parameters - parameters to pass to the callback function; optional

getModifiable

Identifiable getModifiable(Identifiable node)
Returns the modifiable node of the provided node, if node is not already modifiable.

Parameters:
node - the node to get the modifiable for.


Copyright IBM Corp. 2010 All Rights Reserved.