Implements the Dojo Object Store interface for uniform access to Connection objects.
Example
define([
"dojo/_base/lang",
"blueconic/api/data/store/connectionStore"
], function(lang, connectionStore) {
var id = '4e4fc9d9-b92f-4c9e-b11c-1c1314f02964'; // An example ID used in BlueConic
// Retrieve object by id
connectionStore.get(id).then(lang.hitch(this, function(object) {
// Successfully retrieved the object
}), lang.hitch(this, function() {
// Failed to retrieve the object
}));
});
Functions
-
add(connection)dojo/Deferred
-
Adds a connection.
Name Type Description connection blueconic.api.data.domain.Connection The connection to add.
Returns:
Type Description dojo/Deferred deferred with the added object as value. -
get(id)dojo/Deferred
-
Returns one connection specified by the given id.
Name Type Description id String The id of the Connection to retrieve.
Returns:
Type Description dojo/Deferred blueconic.api.data.domain.Connection wrapped in a Deferred. -
asyncgetGoals(connectionId)Array.<blueconic/api/data/domain/Goal>
-
Get all the goals belonging to a specific connection.
Name Type Description connectionId string the id of the connection from which you want to retrieve the goals
Throws:
exception when references could not be retrieved
Returns:
Type Description Array.<blueconic/api/data/domain/Goal> -
query()dojo/Deferred
-
Query the store for connections based on the provided parameters.
Returns:
Type Description dojo/Deferred deferred containing the result set of type blueconic.api.data.domain.Connection wrapped in a dojo/store/util/QueryResults.