1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.api.ldap.trigger;
21
22
23 import org.apache.directory.api.ldap.model.name.Dn;
24
25
26
27
28
29
30
31
32 public abstract class StoredProcedureParameter
33 {
34
35
36
37 public static final class Generic_LDAP_CONTEXT extends StoredProcedureParameter
38 {
39 private Dn ctxName;
40
41
42 private Generic_LDAP_CONTEXT( Dn ctxName )
43 {
44 super( "$ldapContext" );
45 this.ctxName = ctxName;
46 }
47
48
49
50
51
52
53
54
55 public static StoredProcedureParameter instance( Dn ctxName )
56 {
57 return new Generic_LDAP_CONTEXT( ctxName );
58 }
59
60
61
62
63
64 public Dn getCtxName()
65 {
66 return ctxName;
67 }
68
69
70
71
72
73 @Override
74 public String toString()
75 {
76 return name + " \"" + ctxName.getName() + "\"";
77 }
78 }
79
80
81
82
83
84 public static final class Generic_OPERATION_PRINCIPAL extends StoredProcedureParameter
85 {
86 private static Generic_OPERATION_PRINCIPAL instance = new Generic_OPERATION_PRINCIPAL( "$operationPrincipal" );
87
88
89 private Generic_OPERATION_PRINCIPAL( String identifier )
90 {
91 super( identifier );
92 }
93
94
95
96
97
98 public static StoredProcedureParameter instance()
99 {
100 return instance;
101 }
102 }
103
104 protected final String name;
105
106
107 protected StoredProcedureParameter( String name )
108 {
109 this.name = name;
110 }
111
112
113
114
115
116 public String getName()
117 {
118 return name;
119 }
120
121
122 @Override
123 public String toString()
124 {
125 return name;
126 }
127
128
129
130
131
132
133 @Override
134 public int hashCode()
135 {
136 int h = 37;
137
138 h = h * 17 + ( ( name == null ) ? 0 : name.hashCode() );
139
140 return h;
141 }
142
143
144
145
146
147 @Override
148 public boolean equals( Object obj )
149 {
150 if ( this == obj )
151 {
152 return true;
153 }
154
155 if ( obj == null )
156 {
157 return false;
158 }
159
160 if ( getClass() != obj.getClass() )
161 {
162 return false;
163 }
164
165 StoredProcedureParameter other = ( StoredProcedureParameter ) obj;
166
167 if ( name == null )
168 {
169 if ( other.name != null )
170 {
171 return false;
172 }
173 }
174 else if ( !name.equals( other.name ) )
175 {
176 return false;
177 }
178
179 return true;
180 }
181
182
183
184
185
186 public static final class Modify_OBJECT extends StoredProcedureParameter
187 {
188 private static Modify_OBJECT instance = new Modify_OBJECT( "$object" );
189
190
191 private Modify_OBJECT( String identifier )
192 {
193 super( identifier );
194 }
195
196
197
198
199
200 public static StoredProcedureParameter instance()
201 {
202 return instance;
203 }
204 }
205
206
207
208
209
210 public static final class Modify_MODIFICATION extends StoredProcedureParameter
211 {
212 private static Modify_MODIFICATION instance = new Modify_MODIFICATION( "$modification" );
213
214
215 private Modify_MODIFICATION( String identifier )
216 {
217 super( identifier );
218 }
219
220
221
222
223
224 public static StoredProcedureParameter instance()
225 {
226 return instance;
227 }
228 }
229
230
231
232
233
234 public static final class Modify_OLD_ENTRY extends StoredProcedureParameter
235 {
236 private static Modify_OLD_ENTRY instance = new Modify_OLD_ENTRY( "$oldEntry" );
237
238
239 private Modify_OLD_ENTRY( String identifier )
240 {
241 super( identifier );
242 }
243
244
245
246
247
248 public static StoredProcedureParameter instance()
249 {
250 return instance;
251 }
252 }
253
254
255
256
257
258 public static final class Modify_NEW_ENTRY extends StoredProcedureParameter
259 {
260 private static Modify_NEW_ENTRY instance = new Modify_NEW_ENTRY( "$newEntry" );
261
262
263 private Modify_NEW_ENTRY( String identifier )
264 {
265 super( identifier );
266 }
267
268
269
270
271
272 public static StoredProcedureParameter instance()
273 {
274 return instance;
275 }
276 }
277
278
279
280
281
282 public static final class Add_ENTRY extends StoredProcedureParameter
283 {
284 private static Add_ENTRY instance = new Add_ENTRY( "$entry" );
285
286
287 private Add_ENTRY( String identifier )
288 {
289 super( identifier );
290 }
291
292
293
294
295
296 public static StoredProcedureParameter instance()
297 {
298 return instance;
299 }
300 }
301
302
303
304
305
306 public static final class Add_ATTRIBUTES extends StoredProcedureParameter
307 {
308 private static Add_ATTRIBUTES instance = new Add_ATTRIBUTES( "$attributes" );
309
310
311 private Add_ATTRIBUTES( String identifier )
312 {
313 super( identifier );
314 }
315
316
317
318
319
320 public static StoredProcedureParameter instance()
321 {
322 return instance;
323 }
324 }
325
326
327
328
329
330 public static final class Delete_NAME extends StoredProcedureParameter
331 {
332 private static Delete_NAME instance = new Delete_NAME( "$name" );
333
334
335 private Delete_NAME( String identifier )
336 {
337 super( identifier );
338 }
339
340
341
342
343
344 public static StoredProcedureParameter instance()
345 {
346 return instance;
347 }
348 }
349
350
351
352
353
354 public static final class Delete_DELETED_ENTRY extends StoredProcedureParameter
355 {
356 private static Delete_DELETED_ENTRY instance = new Delete_DELETED_ENTRY( "$deletedEntry" );
357
358
359 private Delete_DELETED_ENTRY( String identifier )
360 {
361 super( identifier );
362 }
363
364
365
366
367
368 public static StoredProcedureParameter instance()
369 {
370 return instance;
371 }
372 }
373
374
375
376
377
378 public static final class ModifyDN_ENTRY extends StoredProcedureParameter
379 {
380 private static ModifyDN_ENTRY instance = new ModifyDN_ENTRY( "$entry" );
381
382
383 private ModifyDN_ENTRY( String identifier )
384 {
385 super( identifier );
386 }
387
388
389
390
391
392 public static StoredProcedureParameter instance()
393 {
394 return instance;
395 }
396 }
397
398
399
400
401
402 public static final class ModifyDN_NEW_RDN extends StoredProcedureParameter
403 {
404 private static ModifyDN_NEW_RDN instance = new ModifyDN_NEW_RDN( "$newrdn" );
405
406
407 private ModifyDN_NEW_RDN( String identifier )
408 {
409 super( identifier );
410 }
411
412
413
414
415
416 public static StoredProcedureParameter instance()
417 {
418 return instance;
419 }
420 }
421
422
423
424
425
426 public static final class ModifyDN_DELETE_OLD_RDN extends StoredProcedureParameter
427 {
428 private static ModifyDN_DELETE_OLD_RDN instance = new ModifyDN_DELETE_OLD_RDN( "$deleteoldrdn" );
429
430
431 private ModifyDN_DELETE_OLD_RDN( String identifier )
432 {
433 super( identifier );
434 }
435
436
437
438
439
440 public static StoredProcedureParameter instance()
441 {
442 return instance;
443 }
444 }
445
446
447
448
449
450 public static final class ModifyDN_NEW_SUPERIOR extends StoredProcedureParameter
451 {
452 private static ModifyDN_NEW_SUPERIOR instance = new ModifyDN_NEW_SUPERIOR( "$newSuperior" );
453
454
455 private ModifyDN_NEW_SUPERIOR( String identifier )
456 {
457 super( identifier );
458 }
459
460
461
462
463
464 public static StoredProcedureParameter instance()
465 {
466 return instance;
467 }
468 }
469
470
471
472
473
474 public static final class ModifyDN_OLD_RDN extends StoredProcedureParameter
475 {
476 private static ModifyDN_OLD_RDN instance = new ModifyDN_OLD_RDN( "$oldRDN" );
477
478
479 private ModifyDN_OLD_RDN( String identifier )
480 {
481 super( identifier );
482 }
483
484
485
486
487
488 public static StoredProcedureParameter instance()
489 {
490 return instance;
491 }
492 }
493
494
495
496
497
498 public static final class ModifyDN_OLD_SUPERIOR_DN extends StoredProcedureParameter
499 {
500 private static ModifyDN_OLD_SUPERIOR_DN instance = new ModifyDN_OLD_SUPERIOR_DN( "$oldRDN" );
501
502
503 private ModifyDN_OLD_SUPERIOR_DN( String identifier )
504 {
505 super( identifier );
506 }
507
508
509
510
511
512 public static StoredProcedureParameter instance()
513 {
514 return instance;
515 }
516 }
517
518
519
520
521
522 public static final class ModifyDN_NEW_DN extends StoredProcedureParameter
523 {
524 private static ModifyDN_NEW_DN instance = new ModifyDN_NEW_DN( "$oldRDN" );
525
526
527 private ModifyDN_NEW_DN( String identifier )
528 {
529 super( identifier );
530 }
531
532
533
534
535
536 public static StoredProcedureParameter instance()
537 {
538 return instance;
539 }
540 }
541 }