-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbreeze.intellisense.js
2841 lines (2392 loc) · 127 KB
/
breeze.intellisense.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Generated on: Fri Mar 07 2014 23:33:53 GMT-0800 (Pacific Standard Time)
intellisense.annotate(breeze.core, {
'Enum': function() {
/// <signature>
/// <summary>
/// Base class for all Breeze enumerations, such as EntityState, DataType, FetchStrategy, MergeStrategy etc. }
/// A Breeze Enum is a namespaced set of constant values. Each Enum consists of a group of related constants, called 'symbols'. }
/// Unlike enums in some other environments, each 'symbol' can have both methods and properties. }
/// See the example below: }
/// </summary>
/// <param name="name" type="String" optional="true"></param>
/// <param name="methodObj" type="Object" optional="true"></param>
/// </signature>
},
'EnumSymbol': function() {
/// <signature>
/// <summary>
/// One of the constant values that is generated by the 'Enum' 'addSymbol' method. EnumSymbols should ONLY be created via }
/// the Enum.addSymbol method. }
/// </summary>
/// </signature>
},
'Event': function() {
/// <signature>
/// <summary>
/// Class to support basic event publication and subscription semantics. }
/// </summary>
/// <param name="name" type="String" optional="true"></param>
/// <param name="publisher" type="Object" optional="true">The object that will be doing the publication. i.e. the object to which this event is attached.</param>
/// <param name="defaultErrorCallback" type="Function" optional="true">If omitted then subscriber notification failures will be ignored.</param>
/// </signature>
},
});
intellisense.annotate(breeze.core.Enum.prototype, {
'fromName': function() {
/// <signature>
/// <summary>
/// Returns an Enum symbol given its name. }
/// </summary>
/// <param name="name" type="String" optional="true">Name for which an enum symbol should be returned.</param>
/// <returns type="breeze.core.EnumSymbol" >The symbol that matches the name or 'undefined' if not found.</returns>
/// </signature>
},
'addSymbol': function() {
/// <signature>
/// <summary>
/// Adds a new symbol to an Enum. }
/// </summary>
/// <param name="propertiesObj" type="Object" optional="true">A collection of properties that should be added to the new symbol. In other words, the 'propertiesObj' is any state that should be held by the symbol.</param>
/// <returns type="breeze.core.EnumSymbol" >The new symbol</returns>
/// </signature>
},
'seal': function() {
/// <signature>
/// <summary>
/// Seals this enum so that no more symbols may be added to it. This should only be called after all symbols }
/// have already been added to the Enum. }
/// </summary>
/// </signature>
},
'getSymbols': function() {
/// <signature>
/// <summary>
/// Returns all of the symbols contained within this Enum. }
/// </summary>
/// <returns type="Array" elementType="breeze.core.EnumSymbol" >All of the symbols contained within this Enum.</returns>
/// </signature>
},
'getNames': function() {
/// <signature>
/// <summary>
/// Returns the names of all of the symbols contained within this Enum. }
/// </summary>
/// <returns type="Array" elementType="String" >All of the names of the symbols contained within this Enum.</returns>
/// </signature>
},
'contains': function() {
/// <signature>
/// <summary>
/// Returns whether an Enum contains a specified symbol. }
/// </summary>
/// <param name="Object" type="Object" optional="true">or symbol to test.</param>
/// <returns type="Boolean" >Whether this Enum contains the specified symbol.</returns>
/// </signature>
},
});
intellisense.annotate(breeze.core.Enum, {
'isSymbol': function() {
/// <signature>
/// <summary>
/// Checks if an object is an Enum 'symbol'. }
/// </summary>
/// <returns type="Boolean ></returns>
/// </signature>
},
});
intellisense.annotate(breeze.core.EnumSymbol.prototype, {
'getName': function() {
/// <signature>
/// <summary>
/// Returns the name of this symbol. }
/// </summary>
/// </signature>
},
'toString': function() {
/// <signature>
/// <summary>
/// Same as the getName method. Returns the name of this symbol. }
/// </summary>
/// </signature>
},
/// <field name="parentEnum" type="breeze.core.Enum" >The 'Enum' to which this symbol belongs. __readOnly__</field>
'parentEnum': null,
});
intellisense.annotate(breeze.core.EnumSymbol, {
});
intellisense.annotate(breeze.core.Event.prototype, {
'publish': function() {
/// <signature>
/// <summary>
/// Publish data for this event. }
/// </summary>
/// <param name="data" type="Object" optional="true">Data to publish</param>
/// <param name="publishAsync" type="Boolean" optional="true">Whether to publish asynchonously or not.</param>
/// <param name="errorCallback" type="Function" optional="true">Will be called for any errors that occur during publication. If omitted, errors will be eaten.</param>
/// <returns type="Boolean" >false if event is disabled; true otherwise.</returns>
/// </signature>
},
'publishAsync': function() {
/// <signature>
/// <summary>
/// Publish data for this event asynchronously. }
/// </summary>
/// <param name="data" type="Object" optional="true">Data to publish</param>
/// <param name="errorCallback" type="Function" optional="true">Will be called for any errors that occur during publication. If omitted, errors will be eaten.</param>
/// </signature>
},
'subscribe': function() {
/// <signature>
/// <summary>
/// Subscribe to this event. }
/// </summary>
/// <param name="callback" type="Function" optional="true">Will be called whenever 'data' is published for this event. </param>
/// <returns type="Number" >This is a key for 'unsubscription'. It can be passed to the 'unsubscribe' method.</returns>
/// </signature>
},
'unsubscribe': function() {
/// <signature>
/// <summary>
/// Unsubscribe from this event. }
/// </summary>
/// <param name="unsubKey" type="Number" optional="true">The value returned from the 'subscribe' method may be used to unsubscribe here.</param>
/// <returns type="Boolean" >Whether unsubscription occured. This will return false if already unsubscribed or if the key simply cannot be found.</returns>
/// </signature>
},
});
intellisense.annotate(breeze.core.Event, {
'enable': function() {
/// <signature>
/// <summary>
/// Enables or disables the named event for an object and all of its children. }
/// </summary>
/// <param name="eventName" type="String" optional="true">The name of the event.</param>
/// <param name="target" type="Object" optional="true">The object at which enabling or disabling will occur. All event notifications that occur to this object or children of this object will be enabled or disabled.</param>
/// <param name="isEnabled" type="Boolean|null|Function" optional="true">A boolean, a null or a function that returns either a boolean or a null.</param>
/// </signature>
},
'isEnabled': function() {
/// <signature>
/// <summary>
/// Returns whether for a specific event and a specific object and its children, notification is enabled or disabled or not set. }
/// </summary>
/// <param name="eventName" type="String" optional="true">The name of the event.</param>
/// <param name="target" type="Object" optional="true">The object for which we want to know if notifications are enabled.</param>
/// <returns type="Boolean|null >A null is returned if this value has not been set.</returns>
/// </signature>
},
});
intellisense.annotate(breeze.breeze, {
'config': function() {
/// <signature>
/// <summary>
/// A singleton object that is the repository of all configuration options. }
/// </summary>
/// </signature>
},
'Validator': function() {
/// <signature>
/// <summary>
/// Instances of the Validator class provide the logic to validate another object and provide a description of any errors }
/// encountered during the validation process. They are typically associated with a 'validators' property on the following types: 'EntityType', }
/// 'DataProperty' or 'NavigationProperty'. }
/// }
/// A number of property level validators are registered automatically, i.e added to each DataProperty.validators property }
/// based on 'DataProperty' metadata. For example, }
/// }
/// - DataProperty.dataType -> one of the 'dataType' validator methods such as Validator.int64, Validator.date, Validator.bool etc. }
/// - DataProperty.maxLength -> Validator.maxLength }
/// - DataProperty.isNullable -> Validator.required (if not nullable) }
/// </summary>
/// <param name="name" type="String" optional="true">The name of this validator.</param>
/// <param name="validatorFn" type="Function" optional="true">A function to perform validation. validatorFn(value, context)</param>
/// <param name="context" type="Object" optional="true">A free form object whose properties will made available during the validation and error message creation process. This object will be passed into the Validator's validation function whenever 'validate' is called. See above for a description of additional properties that will be automatically added to this object if not otherwise specified.</param>
/// </signature>
},
'ValidationError': function() {
/// <signature>
/// <summary>
/// A ValidationError is used to describe a failed validation. }
/// </summary>
/// <param name="validator" type="Validator || null" optional="true">The Validator used to create this error, if any.</param>
/// <param name="context" type="ContextObject || null" optional="true">The Context object used in conjunction with the Validator to create this error.</param>
/// <param name="errorMessage" type="String" optional="true">The actual error message</param>
/// <param name="key" type="String" optional="true">An optional key used to define a key for this error. One will be created automatically if not provided here.</param>
/// </signature>
},
'ValidationOptions': function() {
/// <signature>
/// <summary>
/// A ValidationOptions instance is used to specify the conditions under which validation will be executed. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'EntityAction': function() {
/// <signature>
/// <summary>
/// EntityAction is an 'Enum' containing all of the valid actions that can occur to an 'Entity'. }
/// </summary>
/// </signature>
},
'EntityAspect': function() {
/// <signature>
/// <summary>
/// An EntityAspect instance is associated with every attached entity and is accessed via the entity's 'entityAspect' property. }
/// }
/// The EntityAspect itself provides properties to determine and modify the EntityState of the entity and has methods }
/// that provide a variety of services including validation and change tracking. }
/// </summary>
/// </signature>
},
'ComplexAspect': function() {
/// <signature>
/// <summary>
/// An ComplexAspect instance is associated with every complex object instance and is accessed via the complex object's 'complexAspect' property. }
/// }
/// The ComplexAspect itself provides properties to determine the parent object, parent property and original values for the complex object. }
/// </summary>
/// </signature>
},
'EntityKey': function() {
/// <signature>
/// <summary>
/// An EntityKey is an object that represents the unique identity of an entity. EntityKey's are immutable. }
/// </summary>
/// <param name="entityType" type="breeze.breeze.EntityType" optional="true">The 'EntityType' of the entity.</param>
/// <param name="keyValues" type="Value|Array of values" optional="true">A single value or an array of values.</param>
/// </signature>
},
'EntityState': function() {
/// <signature>
/// <summary>
/// EntityState is an 'Enum' containing all of the valid states for an 'Entity'. }
/// </summary>
/// </signature>
},
'DataType': function() {
/// <signature>
/// <summary>
/// DataType is an 'Enum' containing all of the supported data types. }
/// </summary>
/// </signature>
},
'DataService': function() {
/// <signature>
/// <summary>
/// A DataService instance is used to encapsulate the details of a single 'service'; this includes a serviceName, a dataService adapterInstance, }
/// and whether the service has server side metadata. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'JsonResultsAdapter': function() {
/// <signature>
/// <summary>
/// A JsonResultsAdapter instance is used to provide custom extraction and parsing logic on the json results returned by any web service. }
/// This facility makes it possible for breeze to talk to virtually any web service and return objects that will be first class 'breeze' citizens. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'MetadataStore': function() {
/// <signature>
/// <summary>
/// An instance of the MetadataStore contains all of the metadata about a collection of 'EntityType''s. }
/// MetadataStores may be shared across 'EntityManager''s. If an EntityManager is created without an }
/// explicit MetadataStore, the MetadataStore from the MetadataStore.defaultInstance property will be used. }
/// </summary>
/// <param name="config" type="Object" optional="true">Configuration settings .</param>
/// </signature>
},
'EntityType': function() {
/// <signature>
/// <summary>
/// Container for all of the metadata about a specific type of Entity. }
/// </summary>
/// <param name="config" type="Object|MetadataStore" optional="true">Configuration settings or a MetadataStore. If this parameter is just a MetadataStore then what will be created is an 'anonymous' type that will never be communicated to or from the server. It is purely for client side use and will be given an automatically generated name. Normally, however, you will use a configuration object.</param>
/// </signature>
},
'ComplexType': function() {
/// <signature>
/// <summary>
/// Container for all of the metadata about a specific type of Complex object. }
/// </summary>
/// <param name="config" type="Object" optional="true">Configuration settings</param>
/// </signature>
},
'DataProperty': function() {
/// <signature>
/// <summary>
/// A DataProperty describes the metadata for a single property of an 'EntityType' that contains simple data. }
/// </summary>
/// <param name="config" type="Configuration Object" optional="true"></param>
/// </signature>
},
'NavigationProperty': function() {
/// <signature>
/// <summary>
/// A NavigationProperty describes the metadata for a single property of an 'EntityType' that return instances of other EntityTypes. }
/// </summary>
/// <param name="config" type="Configuration Object" optional="true"></param>
/// </signature>
},
'AutoGeneratedKeyType': function() {
/// <signature>
/// <summary>
/// AutoGeneratedKeyType is an 'Enum' containing all of the valid states for an automatically generated key. }
/// </summary>
/// </signature>
},
'LocalQueryComparisonOptions': function() {
/// <signature>
/// <summary>
/// A LocalQueryComparisonOptions instance is used to specify the 'comparison rules' used when performing 'local queries' in order }
/// to match the semantics of these same queries when executed against a remote service. These options should be set based on the }
/// manner in which your remote service interprets certain comparison operations. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'NamingConvention': function() {
/// <signature>
/// <summary>
/// A NamingConvention instance is used to specify the naming conventions under which a MetadataStore }
/// will translate property names between the server and the javascript client. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'EntityQuery': function() {
/// <signature>
/// <summary>
/// An EntityQuery instance is used to query entities either from a remote datasource or from a local 'EntityManager'. }
/// </summary>
/// <param name="resourceName" type="String" optional="true"></param>
/// </signature>
},
'FilterQueryOp': function() {
/// <signature>
/// <summary>
/// FilterQueryOp is an 'Enum' containing all of the valid 'Predicate' }
/// filter operators for an 'EntityQuery'. }
/// </summary>
/// </signature>
},
'Predicate': function() {
/// <signature>
/// <summary>
/// Used to define a 'where' predicate for an EntityQuery. Predicates are immutable, which means that any }
/// method that would modify a Predicate actually returns a new Predicate. }
/// </summary>
/// <param name="property" type="String" optional="true">A property name, a nested property name or an expression involving a property name.</param>
/// <param name="operator" type="FilterQueryOp|String" optional="true"></param>
/// <param name="value" type="Object" optional="true">- This will be treated as either a property expression or a literal depending on context. In general, if the value can be interpreted as a property expression it will be, otherwise it will be treated as a literal. In most cases this works well, but you can also force the interpretation by making the value argument itself an object with a 'value' property and an 'isLiteral' property set to either true or false. Breeze also tries to infer the dataType of any literal based on context, if this fails you can force this inference by making the value argument an object with a 'value' property and a 'dataType'property set to one of the breeze.DataType enumeration instances.</param>
/// </signature>
},
'MergeStrategy': function() {
/// <signature>
/// <summary>
/// MergeStrategy is an 'Enum' that determines how entities are merged into an EntityManager. }
/// </summary>
/// </signature>
},
'FetchStrategy': function() {
/// <signature>
/// <summary>
/// FetchStrategy is an 'Enum' that determines how and where entities are retrieved from as a result of a query. }
/// </summary>
/// </signature>
},
'QueryOptions': function() {
/// <signature>
/// <summary>
/// A QueryOptions instance is used to specify the 'options' under which a query will occur. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'EntityManager': function() {
/// <signature>
/// <summary>
/// Instances of the EntityManager contain and manage collections of entities, either retrieved from a backend datastore or created on the client. }
/// </summary>
/// <param name="config" type="Object|String" optional="true">Configuration settings or a service name.</param>
/// </signature>
},
'SaveOptions': function() {
/// <signature>
/// <summary>
/// A SaveOptions instance is used to specify the 'options' under which a save will occur. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'HttpResponse': function() {
/// <signature>
/// <summary>
/// A generic wrapper for any Http response returned by a server. }
/// </summary>
/// </signature>
},
'Promise': function() {
/// <signature>
/// <summary>
/// This is an simply api documentation for the CommonJS A Promises specification as it is used within Breeze. }
/// </summary>
/// </signature>
},
});
intellisense.annotate(breeze.breeze.config.prototype, {
'setProperties': function() {
/// <signature>
/// <summary>
/// This method is now OBSOLETE. Use the 'initializeAdapterInstances' to accomplish the same result. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// </signature>
},
'registerAdapter': function() {
/// <signature>
/// <summary>
/// Method use to register implementations of standard breeze interfaces. Calls to this method are usually }
/// made as the last step within an adapter implementation. }
/// </summary>
/// <param name="interfaceName" type="String" optional="true">- one of the following interface names 'ajax', 'dataService' or 'modelLibrary'</param>
/// <param name="adapterCtor" type="Function" optional="true">- an ctor function that returns an instance of the specified interface.</param>
/// </signature>
},
'getAdapter': function() {
/// <signature>
/// <summary>
/// Returns the ctor function used to implement a specific interface with a specific adapter name. }
/// </summary>
/// <param name="interfaceName" type="String" optional="true">One of the following interface names 'ajax', 'dataService' or 'modelLibrary'</param>
/// <param name="adapterName" type="String" optional="true">The name of any previously registered adapter. If this parameter is omitted then this method returns the 'default' adapter for this interface. If there is no default adapter, then a null is returned.</param>
/// <returns type="Function|null" >Returns either a ctor function or null.</returns>
/// </signature>
},
'initializeAdapterInstances': function() {
/// <signature>
/// <summary>
/// Initializes a collection of adapter implementations and makes each one the default for its corresponding interface. }
/// </summary>
/// <param name="config" type="Object" optional="true"></param>
/// <returns type="" >[array of instances]</returns>
/// </signature>
},
'initializeAdapterInstance': function() {
/// <signature>
/// <summary>
/// Initializes a single adapter implementation. Initialization means either newing a instance of the }
/// specified interface and then calling 'initialize' on it or simply calling 'initialize' on the instance }
/// if it already exists. }
/// </summary>
/// <param name="interfaceName" type="String" optional="true">The name of the interface to which the adapter to initialize belongs.</param>
/// <param name="adapterName" type="String" optional="true">- The name of a previously registered adapter to initialize.</param>
/// <param name="isDefault" type="Boolean" optional="true">- Whether to make this the default 'adapter' for this interface.</param>
/// <returns type="An instance of the specified adapter" ></returns>
/// </signature>
},
'getAdapterInstance': function() {
/// <signature>
/// <summary>
/// Returns the adapter instance corresponding to the specified interface and adapter names. }
/// </summary>
/// <param name="interfaceName" type="String" optional="true">The name of the interface.</param>
/// <param name="adapterName" type="String" optional="true">- The name of a previously registered adapter. If this parameter is omitted then the default implementation of the specified interface is returned. If there is no defaultInstance of this interface, then the first registered instance of this interface is returned.</param>
/// <returns type="An instance of the specified adapter" ></returns>
/// </signature>
},
});
intellisense.annotate(breeze.breeze.config, {
});
intellisense.annotate(breeze.breeze.Validator.prototype, {
'validate': function() {
/// <signature>
/// <summary>
/// Run this validator against the specified value. This method will usually be called internally either }
/// automatically by an property change, entity attach, query or save operation, or manually as a result of }
/// a validateEntity call on the EntityAspect. The resulting ValidationResults are available via the }
/// EntityAspect.getValidationErrors method. }
/// </summary>
/// <param name="value" type="Object" optional="true">Value to validate</param>
/// <param name="additionalContext" type="Object" optional="true">Any additional contextual information that the Validator can make use of.</param>
/// <returns type="ValidationError|null" >A ValidationError if validation fails, null otherwise</returns>
/// </signature>
},
'getMessage': function() {
/// <signature>
/// <summary>
/// Returns the message generated by the most recent execution of this Validator. }
/// </summary>
/// <returns type="String" ></returns>
/// </signature>
},
/// <field name="name" type="String" >The name of this validator.</field>
'name': null,
/// <field name="context" type="Object" >The context for this validator. This object will typically contain at a minimum the following properties. 'name', 'displayName', and 'message' or 'messageTemplate'. __readOnly__</field>
'context': null,
});
intellisense.annotate(breeze.breeze.Validator, {
'register': function() {
/// <signature>
/// <summary>
/// Register a validator instance so that any deserialized metadata can reference it. }
/// </summary>
/// <param name="validator" type="breeze.breeze.Validator" optional="true">Validator to register.</param>
/// </signature>
},
'registerFactory': function() {
/// <signature>
/// <summary>
/// Register a validator factory so that any deserialized metadata can reference it. }
/// </summary>
/// <param name="validatorFactory" type="Function" optional="true">A function that optionally takes a context property and returns a Validator instance.</param>
/// <param name="name" type="String" optional="true">The name of the validator.</param>
/// </signature>
},
'required': function() {
/// <signature>
/// <summary>
/// Returns a standard 'required value' Validator }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'maxLength': function() {
/// <signature>
/// <summary>
/// Returns a standard maximum string length Validator; the maximum length must be specified }
/// </summary>
/// <param name="context" type="Object" optional="true"></param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'stringLength': function() {
/// <signature>
/// <summary>
/// Returns a standard string length Validator; both minimum and maximum lengths must be specified. }
/// </summary>
/// <param name="context" type="Object" optional="true"></param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'string': function() {
/// <signature>
/// <summary>
/// Returns a standard string dataType Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'guid': function() {
/// <signature>
/// <summary>
/// Returns a Guid data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'duration': function() {
/// <signature>
/// <summary>
/// Returns a ISO 8601 duration string Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'number': function() {
/// <signature>
/// <summary>
/// Returns a standard numeric data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'int64': function() {
/// <signature>
/// <summary>
/// Returns a standard large integer data type - 64 bit - Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'int32': function() {
/// <signature>
/// <summary>
/// Returns a standard 32 bit integer data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'int16': function() {
/// <signature>
/// <summary>
/// Returns a standard 16 bit integer data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'byte': function() {
/// <signature>
/// <summary>
/// Returns a standard byte data type Validator. (This is a integer between 0 and 255 inclusive for js purposes). }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'bool': function() {
/// <signature>
/// <summary>
/// Returns a standard boolean data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'date': function() {
/// <signature>
/// <summary>
/// Returns a standard date data type Validator. }
/// </summary>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'creditCard': function() {
/// <signature>
/// <summary>
/// Returns a credit card number validator }
/// Performs a luhn algorithm checksum test for plausability }
/// catches simple mistakes; only service knows for sure }
/// </summary>
/// <param name="context" type="Object" optional="true">optional parameters to pass through to validation constructor</param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'regularExpression': function() {
/// <signature>
/// <summary>
/// Returns a regular expression validator; the expression must be specified }
/// </summary>
/// <param name="context" type="Object" optional="true"></param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'emailAddress': function() {
/// <signature>
/// <summary>
/// Returns the email address validator }
/// </summary>
/// <param name="context" type="Object" optional="true">optional parameters to pass through to validation constructor</param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'phone': function() {
/// <signature>
/// <summary>
/// Returns the phone validator }
/// Provides basic assertions on the format and will help to eliminate most nonsense input }
/// Matches: }
/// International dialing prefix: {{}, +, 0, 0000} (with or without a trailing break character, if not '+': [-/. ]) }
/// > ((\+)|(0(\d+)?[-/.\s])) }
/// Country code: {{}, 1, ..., 999} (with or without a trailing break character: [-/. ]) }
/// > [1-9]\d{,2}[-/.\s]? }
/// Area code: {(0), ..., (000000), 0, ..., 000000} (with or without a trailing break character: [-/. ]) }
/// > ((\(\d{1,6}\)|\d{1,6})[-/.\s]?)? }
/// Local: {0, ...}+ (with or without a trailing break character: [-/. ]) }
/// > (\d+[-/.\s]?)+\d+ }
/// </summary>
/// <param name="context" type="Object" optional="true">optional parameters to pass through to validation constructor</param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'url': function() {
/// <signature>
/// <summary>
/// Returns the URL (protocol required) validator }
/// </summary>
/// <param name="context" type="Object" optional="true">optional parameters to pass through to validation constructor</param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
'makeRegExpValidator': function() {
/// <signature>
/// <summary>
/// Creates a regular expression validator with a fixed expression. }
/// Many of the stock validators are built with this factory method. }
/// Their expressions are often derived from }
/// https://github.com/srkirkland/DataAnnotationsExtensions/blob/master/DataAnnotationsExtensions }
/// You can try many of them at http://dataannotationsextensions.org/ }
/// </summary>
/// <param name="validatorName" type="String" optional="true">name of this validator</param>
/// <param name="expression" type="String | RegExp" optional="true">regular expression to apply</param>
/// <param name="defaultMessage" type="String" optional="true">default message for failed validations</param>
/// <param name="context" type="Object" optional="true">optional parameters to pass through to validation constructor</param>
/// <returns type="breeze.breeze.Validator >A new Validator</returns>
/// </signature>
},
/// <field name="messageTemplates" type="Object" >Map of standard error message templates keyed by validator name. You can add to or modify this object to customize the template used for any validation error message.</field>
'messageTemplates': null,
});
intellisense.annotate(breeze.breeze.ValidationError.prototype, {
/// <field name="validator" type="breeze.breeze.Validator" >The Validator associated with this ValidationError.</field>
'validator': null,
/// <field name="context" type="Object" >A 'context' object associated with this ValidationError.</field>
'context': null,
/// <field name="property" type="DataProperty|NavigationProperty" >The DataProperty or NavigationProperty associated with this ValidationError.</field>
'property': null,
/// <field name="propertyName" type="String" >The property name associated with this ValidationError. This will be a 'property path' for any properties of a complex object.</field>
'propertyName': null,
/// <field name="errorMessage" type="String" >The error message associated with the ValidationError.</field>
'errorMessage': null,
/// <field name="key" type="String" >The key by which this validation error may be removed from a collection of ValidationErrors.</field>
'key': null,
/// <field name="isServerError" type="Bool" >Whether this is a server error. </field>
'isServerError': null,
});
intellisense.annotate(breeze.breeze.ValidationError, {
'getKey': function() {
/// <signature>
/// <summary>
/// Composes a ValidationError 'key' given a validator or an errorName and an optional propertyName }
/// </summary>
/// <param name="validator" type="ValidatorOrErrorKey" optional="true">A Validator or an 'error name' if no validator is available.</param>
/// <param name="propertyName" type="" optional="true">A property name</param>
/// <returns type="String >A ValidationError 'key'</returns>
/// </signature>
},
});
intellisense.annotate(breeze.breeze.ValidationOptions.prototype, {
'using': function() {
/// <signature>
/// <summary>
/// Returns a copy of this ValidationOptions with changes to the specified config properties. }
/// </summary>
/// <param name="config" type="Object" optional="true">The object to apply to create a new QueryOptions.</param>
/// <returns type="breeze.breeze.ValidationOptions" ></returns>
/// </signature>
},
'setAsDefault': function() {
/// <signature>
/// <summary>
/// Sets the 'defaultInstance' by creating a copy of the current 'defaultInstance' and then applying all of the properties of the current instance. }
/// The current instance is returned unchanged. }
/// </summary>
/// </signature>
},
/// <field name="validateOnAttach" type="Boolean" >Whether entity and property level validation should occur when entities are attached to the EntityManager other than via a query.</field>
'validateOnAttach': null,
/// <field name="validateOnSave" type="Boolean" >Whether entity and property level validation should occur before entities are saved. A failed validation will force the save to fail early.</field>
'validateOnSave': null,
/// <field name="validateOnQuery" type="Boolean" >Whether entity and property level validation should occur after entities are queried from a remote server.</field>
'validateOnQuery': null,
/// <field name="validateOnPropertyChange" type="Boolean" >Whether property level validation should occur after entities are modified.</field>
'validateOnPropertyChange': null,
});
intellisense.annotate(breeze.breeze.ValidationOptions, {
/// <field name="defaultInstance" type="breeze.breeze.ValidationOptions" >The default value whenever ValidationOptions are not specified.</field>
'defaultInstance': null,
});
intellisense.annotate(breeze.breeze.EntityAction.prototype, {
});
intellisense.annotate(breeze.breeze.EntityAction, {
/// <field name="Attach" type="breeze.breeze.EntityAction" >Attach - Entity was attached via an AttachEntity call.</field>
'Attach': null,
/// <field name="AttachOnQuery" type="breeze.breeze.EntityAction" >AttachOnQuery - Entity was attached as a result of a query.</field>
'AttachOnQuery': null,
/// <field name="AttachOnImport" type="breeze.breeze.EntityAction" >AttachOnImport - Entity was attached as a result of an import.</field>
'AttachOnImport': null,
/// <field name="Detach" type="breeze.breeze.EntityAction" >AttachOnQuery - Entity was detached.</field>
'Detach': null,
/// <field name="MergeOnQuery" type="breeze.breeze.EntityAction" >MergeOnQuery - Properties on the entity were merged as a result of a query.</field>
'MergeOnQuery': null,
/// <field name="MergeOnImport" type="breeze.breeze.EntityAction" >MergeOnImport - Properties on the entity were merged as a result of an import.</field>
'MergeOnImport': null,
/// <field name="MergeOnImport" type="breeze.breeze.EntityAction" >MergeOnImport - Properties on the entity were merged as a result of a save</field>
'MergeOnImport': null,
/// <field name="PropertyChange" type="breeze.breeze.EntityAction" >PropertyChange - A property on the entity was changed.</field>
'PropertyChange': null,
/// <field name="EntityStateChange" type="breeze.breeze.EntityAction" >EntityStateChange - The EntityState of the entity was changed.</field>
'EntityStateChange': null,
/// <field name="AcceptChanges" type="breeze.breeze.EntityAction" >AcceptChanges - AcceptChanges was called on the entity, or its entityState was set to Unmodified.</field>
'AcceptChanges': null,
/// <field name="RejectChanges" type="breeze.breeze.EntityAction" >RejectChanges - RejectChanges was called on the entity.</field>
'RejectChanges': null,
/// <field name="Clear" type="breeze.breeze.EntityAction" >Clear - The EntityManager was cleared. All entities detached.</field>
'Clear': null,
});
intellisense.annotate(breeze.breeze.EntityAspect.prototype, {
'getKey': function() {
/// <signature>
/// <summary>
/// Returns the 'EntityKey' for this Entity. }
/// </summary>
/// <param name="forceRefresh" type="Boolean" optional="true">Forces the recalculation of the key. This should normally be unnecessary.</param>
/// <returns type="breeze.breeze.EntityKey" >The 'EntityKey' associated with this Entity.</returns>
/// </signature>
},
'acceptChanges': function() {
/// <signature>
/// <summary>
/// Returns the entity to an 'EntityState' of 'Unchanged' by committing all changes made since the entity was last queried }
/// had 'acceptChanges' called on it. }
/// </summary>
/// </signature>
},
'rejectChanges': function() {
/// <signature>
/// <summary>
/// Returns the entity to an EntityState of 'Unchanged' by rejecting all changes made to it since the entity was last queried }
/// had 'rejectChanges' called on it. }
/// </summary>
/// </signature>
},
'setUnchanged': function() {
/// <signature>
/// <summary>
/// Sets the entity to an EntityState of 'Unchanged'. This is also the equivalent of calling 'EntityAspect/acceptChanges' }
/// </summary>
/// </signature>
},
'setModified': function() {
/// <signature>
/// <summary>
/// Sets the entity to an EntityState of 'Modified'. This can also be achieved by changing the value of any property on an 'Unchanged' entity. }
/// </summary>
/// </signature>
},
'setDeleted': function() {
/// <signature>
/// <summary>
/// Sets the entity to an EntityState of 'Deleted'. This both marks the entity as being scheduled for deletion during the next 'Save' call }
/// but also removes the entity from all of its related entities. }
/// </summary>
/// </signature>
},
'setDetached': function() {
/// <signature>
/// <summary>
/// Sets the entity to an EntityState of 'Detached'. This removes the entity from all of its related entities, but does NOT change the EntityState of any existing entities. }
/// </summary>
/// </signature>
},
'loadNavigationProperty': function() {
/// <signature>
/// <summary>
/// Performs a query for the value of a specified 'NavigationProperty'. }