diff options
author | Pierre Frisch | 2011-12-22 07:25:50 -0800 |
---|---|---|
committer | Valerio Virgillito | 2012-01-27 11:18:17 -0800 |
commit | b89a7ee8b956c96a1dcee995ea840feddc5d4b27 (patch) | |
tree | 0f3136ab0ecdbbbed6a83576581af0a53124d6f1 /node_modules/montage/data/sqlaccess | |
parent | 2401f05d1f4b94d45e4568b81fc73e67b969d980 (diff) | |
download | ninja-b89a7ee8b956c96a1dcee995ea840feddc5d4b27.tar.gz |
First commit of Ninja to ninja-internal
Signed-off-by: Valerio Virgillito <rmwh84@motorola.com>
Diffstat (limited to 'node_modules/montage/data/sqlaccess')
-rwxr-xr-x | node_modules/montage/data/sqlaccess/sqlblueprint.js | 135 | ||||
-rwxr-xr-x | node_modules/montage/data/sqlaccess/sqlobjectid.js | 22 | ||||
-rwxr-xr-x | node_modules/montage/data/sqlaccess/sqlselectorevaluator.js | 24 | ||||
-rwxr-xr-x | node_modules/montage/data/sqlaccess/sqlstore.js | 69 |
4 files changed, 250 insertions, 0 deletions
diff --git a/node_modules/montage/data/sqlaccess/sqlblueprint.js b/node_modules/montage/data/sqlaccess/sqlblueprint.js new file mode 100755 index 00000000..5c389e3c --- /dev/null +++ b/node_modules/montage/data/sqlaccess/sqlblueprint.js | |||
@@ -0,0 +1,135 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/sqlaccess/sqlblueprint | ||
8 | @requires montage/core/core | ||
9 | @requires montage/data/blueprint | ||
10 | @requires montage/data/sqlaccess/sqlselectorevaluator | ||
11 | @requires montage/core/logger | ||
12 | */ | ||
13 | var Montage = require("montage").Montage; | ||
14 | var Blueprint = require("data/blueprint").Blueprint; | ||
15 | var BlueprintBinder = require("data/blueprint").BlueprintBinder; | ||
16 | var ToOneAttribute = require("data/blueprint").ToOneAttribute; | ||
17 | var ToManyAttribute = require("data/blueprint").ToManyAttribute; | ||
18 | var ToOneRelationship = require("data/blueprint").ToOneRelationship; | ||
19 | var ToManyRelationship = require("data/blueprint").ToManyRelationship; | ||
20 | var SqlSelectorEvaluator = require("data/sqlaccess/sqlselectorevaluator").SqlSelectorEvaluator; // registering the evaluators | ||
21 | var logger = require("core/logger").logger("sqlblueprint"); | ||
22 | |||
23 | /** | ||
24 | @class module:montage/data/sqlaccess/sqlblueprint.SqlBlueprintBinder | ||
25 | @extends module:montage/data/blueprint.BlueprintBinder | ||
26 | */ | ||
27 | var SqlBlueprintBinder = exports.SqlBlueprintBinder = Montage.create(BlueprintBinder,/** @lends module:montage/data/sqlaccess/sqlblueprint.SqlBlueprintBinder# */ { | ||
28 | |||
29 | /** | ||
30 | Description TODO | ||
31 | @type {Property} URL | ||
32 | @default {String} "montage/data/sqlaccess/sqlstore" | ||
33 | */ | ||
34 | storeModuleId: { | ||
35 | value: "data/sqlaccess/sqlstore" | ||
36 | }, | ||
37 | /** | ||
38 | Description TODO | ||
39 | @type {Property} | ||
40 | @default {String} "SqlStore" | ||
41 | */ | ||
42 | storePrototypeName: { | ||
43 | value: "SqlStore" | ||
44 | }, | ||
45 | /** | ||
46 | Description TODO | ||
47 | @function | ||
48 | @returns {Function} SqlBlueprint.create() | ||
49 | */ | ||
50 | createBlueprint: { | ||
51 | value: function() { | ||
52 | return SqlBlueprint.create(); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | |||
57 | }) | ||
58 | /** | ||
59 | @class module:montage/data/sqlaccess/sqlblueprint.SqlBlueprint | ||
60 | */ | ||
61 | var SqlBlueprint = exports.SqlBlueprint = Montage.create(Blueprint,/** @lends module:montage/data/sqlaccess/sqlblueprint.SqlBlueprint# */ { | ||
62 | |||
63 | /** | ||
64 | Conventional method to crete new attribute.<br> | ||
65 | This can be overwritten by specific stores. | ||
66 | @function | ||
67 | @returns {Function} SqlToOneAttribute.create() | ||
68 | */ | ||
69 | createToOneAttribute: { | ||
70 | value: function() { | ||
71 | return SqlToOneAttribute.create(); | ||
72 | } | ||
73 | }, | ||
74 | |||
75 | /** | ||
76 | Conventional method to crete new attribute.<br> | ||
77 | This can be overwritten by specific stores. | ||
78 | @function | ||
79 | @returns {Function} SqlToManyAttribute.create() | ||
80 | */ | ||
81 | createToManyAttribute: { | ||
82 | value: function() { | ||
83 | return SqlToManyAttribute.create(); | ||
84 | } | ||
85 | }, | ||
86 | |||
87 | /** | ||
88 | Conventional method to crete new attribute.<br> | ||
89 | This can be overwritten by specific stores. | ||
90 | @function | ||
91 | @returns {Function} SqlToOneRelationship.create() | ||
92 | */ | ||
93 | createToOneRelationship: { | ||
94 | value: function() { | ||
95 | return SqlToOneRelationship.create(); | ||
96 | } | ||
97 | }, | ||
98 | |||
99 | /** | ||
100 | Conventional method to crete new attribute.<br> | ||
101 | This can be overwritten by specific stores. | ||
102 | @function | ||
103 | @returns {Function} SqlToManyRelationship.create() | ||
104 | */ | ||
105 | createToManyRelationship: { | ||
106 | value: function() { | ||
107 | return SqlToManyRelationship.create(); | ||
108 | } | ||
109 | } | ||
110 | |||
111 | }); | ||
112 | /** | ||
113 | @class module:montage/data/sqlaccess/sqlblueprint.SqlToOneAttribute | ||
114 | */ | ||
115 | var SqlToOneAttribute = exports.SqlToOneAttribute = Montage.create(ToOneAttribute,/** @lends module:montage/data/sqlaccess/sqlblueprint.SqlToOneAttribute# */ { | ||
116 | |||
117 | }); | ||
118 | /** | ||
119 | @class module:montage/data/sqlaccess/sqlblueprint.SqlToOneRelationship | ||
120 | */ | ||
121 | var SqlToOneRelationship = exports.SqlToOneRelationship = Montage.create(ToOneRelationship,/** @lends module:montage/data/sqlaccess/sqlblueprint.SqlToOneRelationship# */ { | ||
122 | |||
123 | }); | ||
124 | /** | ||
125 | @class module:montage/data/sqlaccess/sqlblueprint.SqlToManyAttribute | ||
126 | */ | ||
127 | var SqlToManyAttribute = exports.SqlToManyAttribute = Montage.create(ToManyAttribute,/** @lends module:montage/data/sqlaccess/sqlblueprint.SqlToManyAttribute# */ { | ||
128 | |||
129 | }); | ||
130 | /** | ||
131 | @class module:montage/data/sqlaccess/sqlblueprint.SqlToManyRelationship | ||
132 | */ | ||
133 | var SqlToManyRelationship = exports.SqlToManyRelationship = Montage.create(ToManyRelationship, /** @lends module:montage/data/sqlaccess/sqlblueprint.SqlToManyRelationship# */{ | ||
134 | |||
135 | }); | ||
diff --git a/node_modules/montage/data/sqlaccess/sqlobjectid.js b/node_modules/montage/data/sqlaccess/sqlobjectid.js new file mode 100755 index 00000000..1a450fbe --- /dev/null +++ b/node_modules/montage/data/sqlaccess/sqlobjectid.js | |||
@@ -0,0 +1,22 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/sqlaccess/sqlobjectid | ||
8 | @requires montage/core/core | ||
9 | @requires montage/data/objectid | ||
10 | @requires montage/core/logger | ||
11 | */ | ||
12 | var Montage = require("montage").Montage; | ||
13 | var ObjectId = require("data/objectid").ObjectId; | ||
14 | var logger = require("core/logger").logger("sqlobjectid"); | ||
15 | /** | ||
16 | @class module:montage/data/sqlaccess/sqlobjectid.SqlObjectId | ||
17 | @extends module:montage/data/objectid.ObjectId | ||
18 | */ | ||
19 | var SqlObjectId = exports.SqlObjectId = Montage.create(ObjectId, /** @lends module:montage/data/sqlaccess/sqlobjectid.SqlObjectId# */{ | ||
20 | |||
21 | |||
22 | }); | ||
diff --git a/node_modules/montage/data/sqlaccess/sqlselectorevaluator.js b/node_modules/montage/data/sqlaccess/sqlselectorevaluator.js new file mode 100755 index 00000000..91eb2e1c --- /dev/null +++ b/node_modules/montage/data/sqlaccess/sqlselectorevaluator.js | |||
@@ -0,0 +1,24 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/sqlaccess/sqlselectorevaluator | ||
8 | @requires montage/core/core | ||
9 | @requires montage/data/selector | ||
10 | @requires montage/core/logger | ||
11 | */ | ||
12 | var Montage = require("montage").Montage; | ||
13 | var SelectorEvaluator = require("data/selector").SelectorEvaluator; | ||
14 | var Selector = require("data/selector").Selector; | ||
15 | var logger = require("core/logger").logger("sqlselectorevaluator"); | ||
16 | /** | ||
17 | @class module:montage/data/sqlaccess/sqlselectorevaluator.SqlSelectorEvaluator | ||
18 | @extends module:montage/data/selector.SelectorEvaluator | ||
19 | */ | ||
20 | var SqlSelectorEvaluator = exports.SqlSelectorEvaluator = Montage.create(SelectorEvaluator,/** @lends module:montage/data/sqlaccess/sqlselectorevaluator.SqlSelectorEvaluator# */ { | ||
21 | |||
22 | |||
23 | }); | ||
24 | Selector.registry.registerEvaluator(SqlSelectorEvaluator); | ||
diff --git a/node_modules/montage/data/sqlaccess/sqlstore.js b/node_modules/montage/data/sqlaccess/sqlstore.js new file mode 100755 index 00000000..e8d22eb4 --- /dev/null +++ b/node_modules/montage/data/sqlaccess/sqlstore.js | |||
@@ -0,0 +1,69 @@ | |||
1 | /* <copyright> | ||
2 | This file contains proprietary software owned by Motorola Mobility, Inc.<br/> | ||
3 | No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/> | ||
4 | (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. | ||
5 | </copyright> */ | ||
6 | /** | ||
7 | @module montage/data/sqlaccess/sqlstore | ||
8 | @requires montage/core/core | ||
9 | @requires montage/data/store | ||
10 | @requires montage/core/logger | ||
11 | */ | ||
12 | var Montage = require("montage").Montage; | ||
13 | var Store = require("data/store").Store; | ||
14 | var logger = require("core/logger").logger("sqlstore"); | ||
15 | |||
16 | /** | ||
17 | @class module:montage/data/sqlaccess/sqlstore.SqlStore | ||
18 | @extends module:montage/data/store.Store | ||
19 | */ | ||
20 | var SqlStore = exports.SqlStore = Montage.create(Store,/** @lends module:montage/data/sqlaccess/sqlstore.SqlStore# */ { | ||
21 | |||
22 | /** | ||
23 |