aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/data
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/data')
-rwxr-xr-xnode_modules/montage/data/blueprint.js1831
-rwxr-xr-xnode_modules/montage/data/change-context.js (renamed from node_modules/montage/data/context.js)17
-rwxr-xr-xnode_modules/montage/data/control-listener.js (renamed from node_modules/montage/data/controllistener.js)6
-rw-r--r--node_modules/montage/data/ldap-access/ldap-mapping.js61
-rwxr-xr-xnode_modules/montage/data/ldap-access/ldap-object-id.js (renamed from node_modules/montage/data/ldapaccess/ldapobjectid.js)8
-rw-r--r--node_modules/montage/data/ldap-access/ldap-selector-semantics.js5
-rwxr-xr-xnode_modules/montage/data/ldap-access/ldap-store.js72
-rwxr-xr-xnode_modules/montage/data/ldapaccess/ldapblueprint.js135
-rwxr-xr-xnode_modules/montage/data/ldapaccess/ldapselectorevaluator.js24
-rwxr-xr-xnode_modules/montage/data/ldapaccess/ldapstore.js38
-rw-r--r--node_modules/montage/data/mapping.js632
-rw-r--r--node_modules/montage/data/nosql-access/nosql-mapping.js61
-rwxr-xr-xnode_modules/montage/data/nosql-access/nosql-object-id.js (renamed from node_modules/montage/data/nosqlaccess/nosqlobjectid.js)14
-rw-r--r--node_modules/montage/data/nosql-access/nosql-selector-semantics.js5
-rwxr-xr-xnode_modules/montage/data/nosql-access/nosql-store.js102
-rwxr-xr-xnode_modules/montage/data/nosqlaccess/nosqlblueprint.js135
-rwxr-xr-xnode_modules/montage/data/nosqlaccess/nosqlselectorevaluator.js24
-rwxr-xr-xnode_modules/montage/data/nosqlaccess/nosqlstore.js68
-rwxr-xr-xnode_modules/montage/data/object-id.js96
-rwxr-xr-xnode_modules/montage/data/object-property.js431
-rwxr-xr-xnode_modules/montage/data/objectid.js77
-rwxr-xr-xnode_modules/montage/data/objectproperty.js298
-rw-r--r--node_modules/montage/data/operation.js121
-rwxr-xr-xnode_modules/montage/data/pledge.js10
-rwxr-xr-xnode_modules/montage/data/query.js123
-rw-r--r--node_modules/montage/data/rest-access/rest-mapping.js61
-rwxr-xr-xnode_modules/montage/data/rest-access/rest-object-id.js (renamed from node_modules/montage/data/restaccess/restobjectid.js)14
-rw-r--r--node_modules/montage/data/rest-access/rest-selector-semantics.js5
-rwxr-xr-xnode_modules/montage/data/rest-access/rest-store.js221
-rwxr-xr-xnode_modules/montage/data/restaccess/restblueprint.js138
-rwxr-xr-xnode_modules/montage/data/restaccess/restselectorevaluator.js24
-rwxr-xr-xnode_modules/montage/data/restaccess/reststore.js186
-rwxr-xr-xnode_modules/montage/data/restriction.js61
-rwxr-xr-xnode_modules/montage/data/selector.js2220
-rw-r--r--node_modules/montage/data/sql-access/sql-mapping.js61
-rwxr-xr-xnode_modules/montage/data/sql-access/sql-object-id.js (renamed from node_modules/montage/data/sqlaccess/sqlobjectid.js)14
-rw-r--r--node_modules/montage/data/sql-access/sql-selector-semantics.js5
-rwxr-xr-xnode_modules/montage/data/sql-access/sql-store.js103
-rwxr-xr-xnode_modules/montage/data/sqlaccess/sqlblueprint.js135
-rwxr-xr-xnode_modules/montage/data/sqlaccess/sqlselectorevaluator.js24
-rwxr-xr-xnode_modules/montage/data/sqlaccess/sqlstore.js69
-rw-r--r--node_modules/montage/data/store-connection-information.js126
-rwxr-xr-xnode_modules/montage/data/store.js1421
-rwxr-xr-xnode_modules/montage/data/transaction-id.js267
-rwxr-xr-xnode_modules/montage/data/transactionid.js230
45 files changed, 4391 insertions, 5388 deletions
diff --git a/node_modules/montage/data/blueprint.js b/node_modules/montage/data/blueprint.js
index b3a66167..86a99ee7 100755
--- a/node_modules/montage/data/blueprint.js
+++ b/node_modules/montage/data/blueprint.js
@@ -4,94 +4,338 @@
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. 4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */ 5 </copyright> */
6/** 6/**
7 @module montage/data/blueprint 7 @module montage/data/blueprint
8 @requires montage/core/core 8 @requires montage/core/core
9 @requires montage/data/store 9 @requires montage/data/store
10 @requires montage/data/objectid 10 @requires montage/data/object-id
11 @requires data/query 11 @requires data/query
12 @requires core/exception 12 @requires core/exception
13 @requires data/objectproperty 13 @requires data/object-property
14 @requires core/promise 14 @requires core/promise
15 @requires core/logger 15 @requires core/logger
16*/ 16 */
17var Montage = require("montage").Montage; 17var Montage = require("montage").Montage;
18var Store = require("data/store").Store; 18var MappingFolder = require("data/mapping").MappingFolder;
19var TemporaryObjectId = require("data/objectid").TemporaryObjectId; 19var TemporaryObjectId = require("data/object-id").TemporaryObjectId;
20var Query = require("data/query").Query; 20var Query = require("data/query").Query;
21var Exception = require("core/exception").Exception; 21var ObjectProperty = require("data/object-property").ObjectProperty;
22var ObjectProperty = require("data/objectproperty").ObjectProperty;
23var Promise = require("core/promise").Promise; 22var Promise = require("core/promise").Promise;
23var Exception = require("core/exception").Exception;
24var logger = require("core/logger").logger("blueprint"); 24var logger = require("core/logger").logger("blueprint");
25/**
26 @class module:montage/data/blueprint.BlueprintBinder
27 @classdesc A blueprint binder is a collection of of blueprints for a specific access type. It also includes the connection information.
28 @extends module:montage/core/core.Montage
29*/
30var BlueprintBinder = exports.BlueprintBinder = Montage.create(Montage,/** @lends module:montage/data/blueprint.BlueprintBinder# */ {
31 25
32/** 26/**
33 Description TODO 27 @private
34 @private 28 */
35*/ 29var _binderManager = null;
36 _blueprintForPrototypeTable: {
37 value: {},
38 serializable: false,
39 distinct: true,
40 enumerable: false,
41 writable: false
42 },
43/** 30/**
44 Description TODO 31 @class module:montage/data/blueprint.BlueprintBinderManager
45 @type {Property} 32 @classdesc A blueprint binder manager is a singleton that is responsible for loading and dispaching binders and blueprints.
46 @default {Table} {} 33 @extends module:montage/core/core.Montage
47 */ 34 */
48 restrictionsTable: { 35var BlueprintBinderManager = exports.BlueprintBinderManager = Montage.create(Montage, /** @lends module:montage/data/blueprint.BlueprintBinderManager# */ {
49 value: {}, 36
50 serializable: true, 37 /**
51 distinct: true, 38 Description TODO
52 enumerable: false, 39 @function
53 writable: false 40 @returns itself
41 */
42 init:{
43 serializable:false,
44 enumerable:false,
45 value:function () {
46 return this;
47 }
54 }, 48 },
55/** 49
56 Description TODO 50 /**
57 @type {Property} 51 Description TODO
58 @default {String} null 52 @type {Property} Function
59 */ 53 @default {Array} new Array(10)
60 name: { 54 */
61 value: null, 55 blueprintBinders:{
62 serializable: true 56 serializable:true,
57 writable:false,
58 distinct:true,
59 value:new Array(10)
60 },
61
62 /**
63 Add a new blueprint binder.
64 @function
65 @param {Property} binder TODO
66 */
67 addBlueprintBinder:{
68 value:function (binder) {
69 if (binder !== null) {
70 var index = this.blueprintBinders.indexOf(binder);
71 if (index >= 0) {
72 this.blueprintBinders.splice(index, 1);
73 }
74 this.blueprintBinders.push(binder);
75 }
76 }
77 },
78
79 /**
80 Description TODO
81 @function
82 @param {Property} binder TODO
83 */
84 removeBlueprintBinder:{
85 value:function (binder) {
86 if (binder !== null) {
87 var index = this.blueprintBinders.indexOf(binder);
88 if (index >= 0) {
89 this.blueprintBinders.splice(index, 1);
90 }
91 }
92 }
63 }, 93 },
94
95 /**
96 Search through the binders for a blueprint that extends that prototype.
97 @function
98 @param {Property} prototypeName TODO
99 @param {Property} moduleId TODO
100 @returns The requested blueprint or null if this prototype is not managed.
101 */
102 blueprintForPrototype: {
103 value: function(prototypeName, moduleId) {
104 var binder, blueprint, index;
105 for (index = 0; typeof (binder = this.blueprintBinders[index]) !== "undefined"; index++) {
106 blueprint = binder.blueprintForPrototype(prototypeName, moduleId);
107 if (blueprint !== null) {
108 return blueprint;
109 }
110 }
111 return null;
112 }
113 }
114
115});
116