001    /*
002     * Copyright 2007-2014 UnboundID Corp.
003     * All Rights Reserved.
004     */
005    /*
006     * Copyright (C) 2008-2014 UnboundID Corp.
007     *
008     * This program is free software; you can redistribute it and/or modify
009     * it under the terms of the GNU General Public License (GPLv2 only)
010     * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011     * as published by the Free Software Foundation.
012     *
013     * This program is distributed in the hope that it will be useful,
014     * but WITHOUT ANY WARRANTY; without even the implied warranty of
015     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016     * GNU General Public License for more details.
017     *
018     * You should have received a copy of the GNU General Public License
019     * along with this program; if not, see <http://www.gnu.org/licenses>.
020     */
021    package com.unboundid.ldap.sdk;
022    
023    
024    
025    import java.io.Serializable;
026    import java.util.HashMap;
027    
028    
029    import static com.unboundid.ldap.sdk.LDAPMessages.*;
030    
031    
032    
033    /**
034     * This class defines a number of constants associated with LDAP result codes.
035     * The {@code ResultCode} constant values defined in this class are immutable,
036     * and at most one result code object will ever be created for a given int
037     * value, so it is acceptable to compare result codes with either the
038     * {@code ResultCode#equals} method or the "{@code ==}" operator.
039     *<BR><BR>
040     * The result codes that are currently defined include:
041     * <BR>
042     * <CENTER>
043     *   <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="50%">
044     *     <TR>
045     *       <TH ALIGN="LEFT">Name</TH>
046     *       <TH ALIGN="RIGHT">Integer Value</TH>
047     *     </TR>
048     *     <TR>
049     *       <TD ALIGN="LEFT">SUCCESS</TD>
050     *       <TD ALIGN="RIGHT">0</TD>
051     *     </TR>
052     *     <TR>
053     *       <TD ALIGN="LEFT">OPERATIONS_ERROR</TD>
054     *       <TD ALIGN="RIGHT">1</TD>
055     *     </TR>
056     *     <TR>
057     *       <TD ALIGN="LEFT">PROTOCOL_ERROR</TD>
058     *       <TD ALIGN="RIGHT">2</TD>
059     *     </TR>
060     *     <TR>
061     *       <TD ALIGN="LEFT">TIME_LIMIT_EXCEEDED</TD>
062     *       <TD ALIGN="RIGHT">3</TD>
063     *     </TR>
064     *     <TR>
065     *       <TD ALIGN="LEFT">SIZE_LIMIT_EXCEEDED</TD>
066     *       <TD ALIGN="RIGHT">4</TD>
067     *     </TR>
068     *     <TR>
069     *       <TD ALIGN="LEFT">COMPARE_FALSE</TD>
070     *       <TD ALIGN="RIGHT">5</TD>
071     *     </TR>
072     *     <TR>
073     *       <TD ALIGN="LEFT">COMPARE_TRUE</TD>
074     *       <TD ALIGN="RIGHT">6</TD>
075     *     </TR>
076     *     <TR>
077     *       <TD ALIGN="LEFT">AUTH_METHOD_NOT_SUPPORTED</TD>
078     *       <TD ALIGN="RIGHT">7</TD>
079     *     </TR>
080     *     <TR>
081     *       <TD ALIGN="LEFT">STRONG_AUTH_REQUIRED</TD>
082     *       <TD ALIGN="RIGHT">8</TD>
083     *     </TR>
084     *     <TR>
085     *       <TD ALIGN="LEFT">REFERRAL</TD>
086     *       <TD ALIGN="RIGHT">10</TD>
087     *     </TR>
088     *     <TR>
089     *       <TD ALIGN="LEFT">ADMIN_LIMIT_EXCEEDED</TD>
090     *       <TD ALIGN="RIGHT">11</TD>
091     *     </TR>
092     *     <TR>
093     *       <TD ALIGN="LEFT">UNAVAILABLE_CRITICAL_EXTENSION</TD>
094     *       <TD ALIGN="RIGHT">12</TD>
095     *     </TR>
096     *     <TR>
097     *       <TD ALIGN="LEFT">CONFIDENTIALITY_REQUIRED</TD>
098     *       <TD ALIGN="RIGHT">13</TD>
099     *     </TR>
100     *     <TR>
101     *       <TD ALIGN="LEFT">SASL_BIND_IN_PROGRESS</TD>
102     *       <TD ALIGN="RIGHT">14</TD>
103     *     </TR>
104     *     <TR>
105     *       <TD ALIGN="LEFT">NO_SUCH_ATTRIBUTE</TD>
106     *       <TD ALIGN="RIGHT">16</TD>
107     *     </TR>
108     *     <TR>
109     *       <TD ALIGN="LEFT">UNDEFINED_ATTRIBUTE_TYPE</TD>
110     *       <TD ALIGN="RIGHT">17</TD>
111     *     </TR>
112     *     <TR>
113     *       <TD ALIGN="LEFT">INAPPROPRIATE_MATCHING</TD>
114     *       <TD ALIGN="RIGHT">18</TD>
115     *     </TR>
116     *     <TR>
117     *       <TD ALIGN="LEFT">CONSTRAINT_VIOLATION</TD>
118     *       <TD ALIGN="RIGHT">19</TD>
119     *     </TR>
120     *     <TR>
121     *       <TD ALIGN="LEFT">ATTRIBUTE_OR_VALUE_EXISTS</TD>
122     *       <TD ALIGN="RIGHT">20</TD>
123     *     </TR>
124     *     <TR>
125     *       <TD ALIGN="LEFT">INVALID_ATTRIBUTE_SYNTAX</TD>
126     *       <TD ALIGN="RIGHT">21</TD>
127     *     </TR>
128     *     <TR>
129     *       <TD ALIGN="LEFT">NO_SUCH_OBJECT</TD>
130     *       <TD ALIGN="RIGHT">32</TD>
131     *     </TR>
132     *     <TR>
133     *       <TD ALIGN="LEFT">ALIAS_PROBLEM</TD>
134     *       <TD ALIGN="RIGHT">33</TD>
135     *     </TR>
136     *     <TR>
137     *       <TD ALIGN="LEFT">INVALID_DN_SYNTAX</TD>
138     *       <TD ALIGN="RIGHT">34</TD>
139     *     </TR>
140     *     <TR>
141     *       <TD ALIGN="LEFT">ALIAS_DEREFERENCING_PROBLEM</TD>
142     *       <TD ALIGN="RIGHT">36</TD>
143     *     </TR>
144     *     <TR>
145     *       <TD ALIGN="LEFT">INAPPROPRIATE_AUTHENTICATION</TD>
146     *       <TD ALIGN="RIGHT">48</TD>
147     *     </TR>
148     *     <TR>
149     *       <TD ALIGN="LEFT">INVALID_CREDENTIALS</TD>
150     *       <TD ALIGN="RIGHT">49</TD>
151     *     </TR>
152     *     <TR>
153     *       <TD ALIGN="LEFT">INSUFFICIENT_ACCESS_RIGHTS</TD>
154     *       <TD ALIGN="RIGHT">50</TD>
155     *     </TR>
156     *     <TR>
157     *       <TD ALIGN="LEFT">BUSY</TD>
158     *       <TD ALIGN="RIGHT">51</TD>
159     *     </TR>
160     *     <TR>
161     *       <TD ALIGN="LEFT">UNAVAILABLE</TD>
162     *       <TD ALIGN="RIGHT">52</TD>
163     *     </TR>
164     *     <TR>
165     *       <TD ALIGN="LEFT">UNWILLING_TO_PERFORM</TD>
166     *       <TD ALIGN="RIGHT">53</TD>
167     *     </TR>
168     *     <TR>
169     *       <TD ALIGN="LEFT">LOOP-DETECT</TD>
170     *       <TD ALIGN="RIGHT">54</TD>
171     *     </TR>
172     *     <TR>
173     *       <TD ALIGN="LEFT">SORT_CONTROL_MISSING</TD>
174     *       <TD ALIGN="RIGHT">60</TD>
175     *     </TR>
176     *     <TR>
177     *       <TD ALIGN="LEFT">OFFSET_RANGE_ERROR</TD>
178     *       <TD ALIGN="RIGHT">61</TD>
179     *     </TR>
180     *     <TR>
181     *       <TD ALIGN="LEFT">NAMING_VIOLATION</TD>
182     *       <TD ALIGN="RIGHT">64</TD>
183     *     </TR>
184     *     <TR>
185     *       <TD ALIGN="LEFT">OBJECT_CLASS_VIOLATION</TD>
186     *       <TD ALIGN="RIGHT">65</TD>
187     *     </TR>
188     *     <TR>
189     *       <TD ALIGN="LEFT">NOT_ALLOWED_ON_NONLEAF</TD>
190     *       <TD ALIGN="RIGHT">66</TD>
191     *     </TR>
192     *     <TR>
193     *       <TD ALIGN="LEFT">NOT_ALLOWED_ON_NONLEAF</TD>
194     *       <TD ALIGN="RIGHT">66</TD>
195     *     </TR>
196     *     <TR>
197     *       <TD ALIGN="LEFT">NOT_ALLOWED_ON_RDN</TD>
198     *       <TD ALIGN="RIGHT">67</TD>
199     *     </TR>
200     *     <TR>
201     *       <TD ALIGN="LEFT">ENTRY_ALREADY_EXISTS</TD>
202     *       <TD ALIGN="RIGHT">68</TD>
203     *     </TR>
204     *     <TR>
205     *       <TD ALIGN="LEFT">OBJECT_CLASS_MODS_PROHIBITED</TD>
206     *       <TD ALIGN="RIGHT">69</TD>
207     *     </TR>
208     *     <TR>
209     *       <TD ALIGN="LEFT">AFFECTS_MULTIPLE_DSAS</TD>
210     *       <TD ALIGN="RIGHT">71</TD>
211     *     </TR>
212     *     <TR>
213     *       <TD ALIGN="LEFT">VIRTUAL_LIST_VIEW_ERROR</TD>
214     *       <TD ALIGN="RIGHT">76</TD>
215     *     </TR>
216     *     <TR>
217     *       <TD ALIGN="LEFT">OTHER</TD>
218     *       <TD ALIGN="RIGHT">80</TD>
219     *     </TR>
220     *     <TR>
221     *       <TD ALIGN="LEFT">SERVER_DOWN</TD>
222     *       <TD ALIGN="RIGHT">81</TD>
223     *     </TR>
224     *     <TR>
225     *       <TD ALIGN="LEFT">LOCAL_ERROR</TD>
226     *       <TD ALIGN="RIGHT">82</TD>
227     *     </TR>
228     *     <TR>
229     *       <TD ALIGN="LEFT">ENCODING_ERROR</TD>
230     *       <TD ALIGN="RIGHT">83</TD>
231     *     </TR>
232     *     <TR>
233     *       <TD ALIGN="LEFT">DECODING_ERROR</TD>
234     *       <TD ALIGN="RIGHT">84</TD>
235     *     </TR>
236     *     <TR>
237     *       <TD ALIGN="LEFT">TIMEOUT</TD>
238     *       <TD ALIGN="RIGHT">85</TD>
239     *     </TR>
240     *     <TR>
241     *       <TD ALIGN="LEFT">AUTH_UNKNOWN</TD>
242     *       <TD ALIGN="RIGHT">86</TD>
243     *     </TR>
244     *     <TR>
245     *       <TD ALIGN="LEFT">FILTER_ERROR</TD>
246     *       <TD ALIGN="RIGHT">87</TD>
247     *     </TR>
248     *     <TR>
249     *       <TD ALIGN="LEFT">USER_CANCELED</TD>
250     *       <TD ALIGN="RIGHT">88</TD>
251     *     </TR>
252     *     <TR>
253     *       <TD ALIGN="LEFT">PARAM_ERROR</TD>
254     *       <TD ALIGN="RIGHT">89</TD>
255     *     </TR>
256     *     <TR>
257     *       <TD ALIGN="LEFT">NO_MEMORY</TD>
258     *       <TD ALIGN="RIGHT">90</TD>
259     *     </TR>
260     *     <TR>
261     *       <TD ALIGN="LEFT">CONNECT_ERROR</TD>
262     *       <TD ALIGN="RIGHT">91</TD>
263     *     </TR>
264     *     <TR>
265     *       <TD ALIGN="LEFT">NOT_SUPPORTED</TD>
266     *       <TD ALIGN="RIGHT">92</TD>
267     *     </TR>
268     *     <TR>
269     *       <TD ALIGN="LEFT">CONTROL_NOT_FOUND</TD>
270     *       <TD ALIGN="RIGHT">93</TD>
271     *     </TR>
272     *     <TR>
273     *       <TD ALIGN="LEFT">NO_RESULTS_RETURNED</TD>
274     *       <TD ALIGN="RIGHT">94</TD>
275     *     </TR>
276     *     <TR>
277     *       <TD ALIGN="LEFT">MORE_RESULTS_TO_RETURN</TD>
278     *       <TD ALIGN="RIGHT">95</TD>
279     *     </TR>
280     *     <TR>
281     *       <TD ALIGN="LEFT">CLIENT_LOOP</TD>
282     *       <TD ALIGN="RIGHT">96</TD>
283     *     </TR>
284     *     <TR>
285     *       <TD ALIGN="LEFT">REFERRAL_LIMIT_EXCEEDED</TD>
286     *       <TD ALIGN="RIGHT">97</TD>
287     *     </TR>
288     *     <TR>
289     *       <TD ALIGN="LEFT">CANCELED</TD>
290     *       <TD ALIGN="RIGHT">118</TD>
291     *     </TR>
292     *     <TR>
293     *       <TD ALIGN="LEFT">NO_SUCH_OPERATION</TD>
294     *       <TD ALIGN="RIGHT">119</TD>
295     *     </TR>
296     *     <TR>
297     *       <TD ALIGN="LEFT">TOO_LATE</TD>
298     *       <TD ALIGN="RIGHT">120</TD>
299     *     </TR>
300     *     <TR>
301     *       <TD ALIGN="LEFT">CANNOT_CANCEL</TD>
302     *       <TD ALIGN="RIGHT">121</TD>
303     *     </TR>
304     *     <TR>
305     *       <TD ALIGN="LEFT">ASSERTION_FAILED</TD>
306     *       <TD ALIGN="RIGHT">122</TD>
307     *     </TR>
308     *     <TR>
309     *       <TD ALIGN="LEFT">AUTHORIZATION_DENIED</TD>
310     *       <TD ALIGN="RIGHT">123</TD>
311     *     </TR>
312     *     <TR>
313     *       <TD ALIGN="LEFT">E_SYNC_REFRESH_REQUIRED</TD>
314     *       <TD ALIGN="RIGHT">4096</TD>
315     *     </TR>
316     *     <TR>
317     *       <TD ALIGN="LEFT">NO_OPERATION</TD>
318     *       <TD ALIGN="RIGHT">16654</TD>
319     *     </TR>
320     *     <TR>
321     *       <TD ALIGN="LEFT">INTERACTIVE_TRANSACTION_ABORTED</TD>
322     *       <TD ALIGN="RIGHT">30221001</TD>
323     *     </TR>
324     *     <TR>
325     *       <TD ALIGN="LEFT">DATABASE_LOCK_CONFLICT</TD>
326     *       <TD ALIGN="RIGHT">30221002</TD>
327     *     </TR>
328     *   </TABLE>
329     * </CENTER>
330     */
331    public final class ResultCode
332           implements Serializable
333    {
334      /**
335       * The integer value (0) for the "SUCCESS" result code.
336       */
337      public static final int SUCCESS_INT_VALUE = 0;
338    
339    
340    
341      /**
342       * The result code (0) that will be used to indicate a successful operation.
343       */
344      public static final ResultCode SUCCESS =
345           new ResultCode(INFO_RC_SUCCESS.get(), SUCCESS_INT_VALUE);
346    
347    
348    
349      /**
350       * The integer value (1) for the "OPERATIONS_ERROR" result code.
351       */
352      public static final int OPERATIONS_ERROR_INT_VALUE = 1;
353    
354    
355    
356      /**
357       * The result code (1) that will be used to indicate that an operation was
358       * requested out of sequence.
359       */
360      public static final ResultCode OPERATIONS_ERROR =
361           new ResultCode(INFO_RC_OPERATIONS_ERROR.get(),
362                          OPERATIONS_ERROR_INT_VALUE);
363    
364    
365    
366      /**
367       * The integer value (2) for the "PROTOCOL_ERROR" result code.
368       */
369      public static final int PROTOCOL_ERROR_INT_VALUE = 2;
370    
371    
372    
373      /**
374       * The result code (2) that will be used to indicate that the client sent a
375       * malformed request.
376       */
377      public static final ResultCode PROTOCOL_ERROR =
378           new ResultCode(INFO_RC_PROTOCOL_ERROR.get(), PROTOCOL_ERROR_INT_VALUE);
379    
380    
381    
382      /**
383       * The integer value (3) for the "TIME_LIMIT_EXCEEDED" result code.
384       */
385      public static final int TIME_LIMIT_EXCEEDED_INT_VALUE = 3;
386    
387    
388    
389      /**
390       * The result code (3) that will be used to indicate that the server was
391       * unable to complete processing on the request in the allotted time limit.
392       */
393      public static final ResultCode TIME_LIMIT_EXCEEDED =
394           new ResultCode(INFO_RC_TIME_LIMIT_EXCEEDED.get(),
395                          TIME_LIMIT_EXCEEDED_INT_VALUE);
396    
397    
398    
399      /**
400       * The integer value (4) for the "SIZE_LIMIT_EXCEEDED" result code.
401       */
402      public static final int SIZE_LIMIT_EXCEEDED_INT_VALUE = 4;
403    
404    
405    
406      /**
407       * The result code (4) that will be used to indicate that the server found
408       * more matching entries than the configured request size limit.
409       */
410      public static final ResultCode SIZE_LIMIT_EXCEEDED =
411           new ResultCode(INFO_RC_SIZE_LIMIT_EXCEEDED.get(),
412                          SIZE_LIMIT_EXCEEDED_INT_VALUE);
413    
414    
415    
416      /**
417       * The integer value (5) for the "COMPARE_FALSE" result code.
418       */
419      public static final int COMPARE_FALSE_INT_VALUE = 5;
420    
421    
422    
423      /**
424       * The result code (5) that will be used if a requested compare assertion does
425       * not match the target entry.
426       */
427      public static final ResultCode COMPARE_FALSE =
428           new ResultCode(INFO_RC_COMPARE_FALSE.get(), COMPARE_FALSE_INT_VALUE);
429    
430    
431    
432      /**
433       * The integer value (6) for the "COMPARE_TRUE" result code.
434       */
435      public static final int COMPARE_TRUE_INT_VALUE = 6;
436    
437    
438    
439      /**
440       * The result code (6) that will be used if a requested compare assertion
441       * matched the target entry.
442       */
443      public static final ResultCode COMPARE_TRUE =
444           new ResultCode(INFO_RC_COMPARE_TRUE.get(), COMPARE_TRUE_INT_VALUE);
445    
446    
447    
448      /**
449       * The integer value (7) for the "AUTH_METHOD_NOT_SUPPORTED" result code.
450       */
451      public static final int AUTH_METHOD_NOT_SUPPORTED_INT_VALUE = 7;
452    
453    
454    
455      /**
456       * The result code (7) that will be used if the client requested a form of
457       * authentication that is not supported by the server.
458       */
459      public static final ResultCode AUTH_METHOD_NOT_SUPPORTED =
460           new ResultCode(INFO_RC_AUTH_METHOD_NOT_SUPPORTED.get(),
461                          AUTH_METHOD_NOT_SUPPORTED_INT_VALUE);
462    
463    
464    
465      /**
466       * The integer value (8) for the "STRONG_AUTH_REQUIRED" result code.
467       */
468      public static final int STRONG_AUTH_REQUIRED_INT_VALUE = 8;
469    
470    
471    
472      /**
473       * The result code (8) that will be used if the client requested an operation
474       * that requires a strong authentication mechanism.
475       */
476      public static final ResultCode STRONG_AUTH_REQUIRED =
477           new ResultCode(INFO_RC_STRONG_AUTH_REQUIRED.get(),
478                          STRONG_AUTH_REQUIRED_INT_VALUE);
479    
480    
481    
482      /**
483       * The integer value (10) for the "REFERRAL" result code.
484       */
485      public static final int REFERRAL_INT_VALUE = 10;
486    
487    
488    
489      /**
490       * The result code (10) that will be used if the server sends a referral to
491       * the client to refer to data in another location.
492       */
493      public static final ResultCode REFERRAL =
494           new ResultCode(INFO_RC_REFERRAL.get(), REFERRAL_INT_VALUE);
495    
496    
497    
498      /**
499       * The integer value (11) for the "ADMIN_LIMIT_EXCEEDED" result code.
500       */
501      public static final int ADMIN_LIMIT_EXCEEDED_INT_VALUE = 11;
502    
503    
504    
505      /**
506       * The result code (11) that will be used if a server administrative limit has
507       * been exceeded.
508       */
509      public static final ResultCode ADMIN_LIMIT_EXCEEDED =
510           new ResultCode(INFO_RC_ADMIN_LIMIT_EXCEEDED.get(),
511                          ADMIN_LIMIT_EXCEEDED_INT_VALUE);
512    
513    
514    
515      /**
516       * The integer value (12) for the "UNAVAILABLE_CRITICAL_EXTENSION" result
517       * code.
518       */
519      public static final int UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE = 12;
520    
521    
522    
523      /**
524       * The result code (12) that will be used if the client requests a critical
525       * control that is not supported by the server.
526       */
527      public static final ResultCode UNAVAILABLE_CRITICAL_EXTENSION =
528           new ResultCode(INFO_RC_UNAVAILABLE_CRITICAL_EXTENSION.get(),
529                          UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE);
530    
531    
532    
533      /**
534       * The integer value (13) for the "CONFIDENTIALITY_REQUIRED" result code.
535       */
536      public static final int CONFIDENTIALITY_REQUIRED_INT_VALUE = 13;
537    
538    
539    
540      /**
541       * The result code (13) that will be used if the server requires a secure
542       * communication mechanism for the requested operation.
543       */
544      public static final ResultCode CONFIDENTIALITY_REQUIRED =
545           new ResultCode(INFO_RC_CONFIDENTIALITY_REQUIRED.get(),
546                          CONFIDENTIALITY_REQUIRED_INT_VALUE);
547    
548    
549    
550      /**
551       * The integer value (14) for the "SASL_BIND_IN_PROGRESS" result code.
552       */
553      public static final int SASL_BIND_IN_PROGRESS_INT_VALUE = 14;
554    
555    
556    
557      /**
558       * The result code (14) that will be returned from the server after SASL bind
559       * stages in which more processing is required.
560       */
561      public static final ResultCode SASL_BIND_IN_PROGRESS =
562           new ResultCode(INFO_RC_SASL_BIND_IN_PROGRESS.get(),
563                          SASL_BIND_IN_PROGRESS_INT_VALUE);
564    
565    
566    
567      /**
568       * The integer value (16) for the "NO_SUCH_ATTRIBUTE" result code.
569       */
570      public static final int NO_SUCH_ATTRIBUTE_INT_VALUE = 16;
571    
572    
573    
574      /**
575       * The result code (16) that will be used if the client referenced an
576       * attribute that does not exist in the target entry.
577       */
578      public static final ResultCode NO_SUCH_ATTRIBUTE =
579           new ResultCode(INFO_RC_NO_SUCH_ATTRIBUTE.get(),
580                          NO_SUCH_ATTRIBUTE_INT_VALUE);
581    
582    
583    
584      /**
585       * The integer value (17) for the "UNDEFINED_ATTRIBUTE_TYPE" result code.
586       */
587      public static final int UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE = 17;
588    
589    
590    
591      /**
592       * The result code (17) that will be used if the client referenced an
593       * attribute that is not defined in the server schema.
594       */
595      public static final ResultCode UNDEFINED_ATTRIBUTE_TYPE =
596           new ResultCode(INFO_RC_UNDEFINED_ATTRIBUTE_TYPE.get(),
597                          UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE);
598    
599    
600    
601      /**
602       * The integer value (18) for the "INAPPROPRIATE_MATCHING" result code.
603       */
604      public static final int INAPPROPRIATE_MATCHING_INT_VALUE = 18;
605    
606    
607    
608      /**
609       * The result code (18) that will be used if the client attempted to use an
610       * attribute in a search filter in a manner not supported by the matching
611       * rules associated with that attribute.
612       */
613      public static final ResultCode INAPPROPRIATE_MATCHING =
614           new ResultCode(INFO_RC_INAPPROPRIATE_MATCHING.get(),
615                          INAPPROPRIATE_MATCHING_INT_VALUE);
616    
617    
618    
619      /**
620       * The integer value (19) for the "CONSTRAINT_VIOLATION" result code.
621       */
622      public static final int CONSTRAINT_VIOLATION_INT_VALUE = 19;
623    
624    
625    
626      /**
627       * The result code (19) that will be used if the requested operation would
628       * violate some constraint defined in the server.
629       */
630      public static final ResultCode CONSTRAINT_VIOLATION =
631           new ResultCode(INFO_RC_CONSTRAINT_VIOLATION.get(),
632                          CONSTRAINT_VIOLATION_INT_VALUE);
633    
634    
635    
636      /**
637       * The integer value (20) for the "ATTRIBUTE_OR_VALUE_EXISTS" result code.
638       */
639      public static final int ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE = 20;
640    
641    
642    
643      /**
644       * The result code (20) that will be used if the client attempts to modify an
645       * entry in a way that would create a duplicate value, or create multiple
646       * values for a single-valued attribute.
647       */
648      public static final ResultCode ATTRIBUTE_OR_VALUE_EXISTS =
649           new ResultCode(INFO_RC_ATTRIBUTE_OR_VALUE_EXISTS.get(),
650                          ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE);
651    
652    
653    
654      /**
655       * The integer value (21) for the "INVALID_ATTRIBUTE_SYNTAX" result code.
656       */
657      public static final int INVALID_ATTRIBUTE_SYNTAX_INT_VALUE = 21;
658    
659    
660    
661      /**
662       * The result code (21) that will be used if the client attempts to perform an
663       * operation that would create an attribute value that violates the syntax
664       * for that attribute.
665       */
666      public static final ResultCode INVALID_ATTRIBUTE_SYNTAX =
667           new ResultCode(INFO_RC_INVALID_ATTRIBUTE_SYNTAX.get(),
668                          INVALID_ATTRIBUTE_SYNTAX_INT_VALUE);
669    
670    
671    
672      /**
673       * The integer value (32) for the "NO_SUCH_OBJECT" result code.
674       */
675      public static final int NO_SUCH_OBJECT_INT_VALUE = 32;
676    
677    
678    
679      /**
680       * The result code (32) that will be used if the client targeted an entry that
681       * does not exist.
682       */
683      public static final ResultCode NO_SUCH_OBJECT =
684           new ResultCode(INFO_RC_NO_SUCH_OBJECT.get(), NO_SUCH_OBJECT_INT_VALUE);
685    
686    
687    
688      /**
689       * The integer value (33) for the "ALIAS_PROBLEM" result code.
690       */
691      public static final int ALIAS_PROBLEM_INT_VALUE = 33;
692    
693    
694    
695      /**
696       * The result code (33) that will be used if the client targeted an entry that
697       * as an alias.
698       */
699      public static final ResultCode ALIAS_PROBLEM =
700           new ResultCode(INFO_RC_ALIAS_PROBLEM.get(), ALIAS_PROBLEM_INT_VALUE);
701    
702    
703    
704      /**
705       * The integer value (34) for the "INVALID_DN_SYNTAX" result code.
706       */
707      public static final int INVALID_DN_SYNTAX_INT_VALUE = 34;
708    
709    
710    
711      /**
712       * The result code (34) that will be used if the client provided an invalid
713       * DN.
714       */
715      public static final ResultCode INVALID_DN_SYNTAX =
716           new ResultCode(INFO_RC_INVALID_DN_SYNTAX.get(),
717                          INVALID_DN_SYNTAX_INT_VALUE);
718    
719    
720    
721      /**
722       * The integer value (36) for the "ALIAS_DEREFERENCING_PROBLEM" result code.
723       */
724      public static final int ALIAS_DEREFERENCING_PROBLEM_INT_VALUE = 36;
725    
726    
727    
728      /**
729       * The result code (36) that will be used if a problem is encountered while
730       * the server is attempting to dereference an alias.
731       */
732      public static final ResultCode ALIAS_DEREFERENCING_PROBLEM =
733           new ResultCode(INFO_RC_ALIAS_DEREFERENCING_PROBLEM.get(),
734                          ALIAS_DEREFERENCING_PROBLEM_INT_VALUE);
735    
736    
737    
738      /**
739       * The integer value (48) for the "INAPPROPRIATE_AUTHENTICATION" result code.
740       */
741      public static final int INAPPROPRIATE_AUTHENTICATION_INT_VALUE = 48;
742    
743    
744    
745      /**
746       * The result code (48) that will be used if the client attempts to perform a
747       * type of authentication that is not supported for the target user.
748       */
749      public static final ResultCode INAPPROPRIATE_AUTHENTICATION =
750           new ResultCode(INFO_RC_INAPPROPRIATE_AUTHENTICATION.get(),
751                          INAPPROPRIATE_AUTHENTICATION_INT_VALUE);
752    
753    
754    
755      /**
756       * The integer value (49) for the "INVALID_CREDENTIALS" result code.
757       */
758      public static final int INVALID_CREDENTIALS_INT_VALUE = 49;
759    
760    
761    
762      /**
763       * The result code (49) that will be used if the client provided invalid
764       * credentials while trying to authenticate.
765       */
766      public static final ResultCode INVALID_CREDENTIALS =
767           new ResultCode(INFO_RC_INVALID_CREDENTIALS.get(),
768                          INVALID_CREDENTIALS_INT_VALUE);
769    
770    
771    
772      /**
773       * The integer value (50) for the "INSUFFICIENT_ACCESS_RIGHTS" result code.
774       */
775      public static final int INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE = 50;
776    
777    
778    
779      /**
780       * The result code (50) that will be used if the client does not have
781       * permission to perform the requested operation.
782       */
783      public static final ResultCode INSUFFICIENT_ACCESS_RIGHTS =
784           new ResultCode(INFO_RC_INSUFFICIENT_ACCESS_RIGHTS.get(),
785                          INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE);
786    
787    
788    
789      /**
790       * The integer value (51) for the "BUSY" result code.
791       */
792      public static final int BUSY_INT_VALUE = 51;
793    
794    
795    
796      /**
797       * The result code (51) that will be used if the server is too busy to process
798       * the requested operation.
799       */
800      public static final ResultCode BUSY = new ResultCode(INFO_RC_BUSY.get(),
801                                                           BUSY_INT_VALUE);
802    
803    
804    
805      /**
806       * The integer value (52) for the "UNAVAILABLE" result code.
807       */
808      public static final int UNAVAILABLE_INT_VALUE = 52;
809    
810    
811    
812      /**
813       * The result code (52) that will be used if the server is unavailable.
814       */
815      public static final ResultCode UNAVAILABLE =
816           new ResultCode(INFO_RC_UNAVAILABLE.get(), UNAVAILABLE_INT_VALUE);
817    
818    
819    
820      /**
821       * The integer value (53) for the "UNWILLING_TO_PERFORM" result code.
822       */
823      public static final int UNWILLING_TO_PERFORM_INT_VALUE = 53;
824    
825    
826    
827      /**
828       * The result code (53) that will be used if the server is not willing to
829       * perform the requested operation.
830       */
831      public static final ResultCode UNWILLING_TO_PERFORM =
832           new ResultCode(INFO_RC_UNWILLING_TO_PERFORM.get(),
833                          UNWILLING_TO_PERFORM_INT_VALUE);
834    
835    
836    
837      /**
838       * The integer value (54) for the "LOOP_DETECT" result code.
839       */
840      public static final int LOOP_DETECT_INT_VALUE = 54;
841    
842    
843    
844      /**
845       * The result code (54) that will be used if the server detects a chaining or
846       * alias loop.
847       */
848      public static final ResultCode LOOP_DETECT =
849           new ResultCode(INFO_RC_LOOP_DETECT.get(), LOOP_DETECT_INT_VALUE);
850    
851    
852    
853      /**
854       * The integer value (60) for the "SORT_CONTROL_MISSING" result code.
855       */
856      public static final int SORT_CONTROL_MISSING_INT_VALUE = 60;
857    
858    
859    
860      /**
861       * The result code (60) that will be used if the client sends a virtual list
862       * view control without a server-side sort control.
863       */
864      public static final ResultCode SORT_CONTROL_MISSING =
865           new ResultCode(INFO_RC_SORT_CONTROL_MISSING.get(),
866                          SORT_CONTROL_MISSING_INT_VALUE);
867    
868    
869    
870      /**
871       * The integer value (61) for the "OFFSET_RANGE_ERROR" result code.
872       */
873      public static final int OFFSET_RANGE_ERROR_INT_VALUE = 61;
874    
875    
876    
877      /**
878       * The result code (61) that will be used if the client provides a virtual
879       * list view control with a target offset that is out of range for the
880       * available data set.
881       */
882      public static final ResultCode OFFSET_RANGE_ERROR =
883           new ResultCode(INFO_RC_OFFSET_RANGE_ERROR.get(),
884                          OFFSET_RANGE_ERROR_INT_VALUE);
885    
886    
887    
888      /**
889       * The integer value (64) for the "NAMING_VIOLATION" result code.
890       */
891      public static final int NAMING_VIOLATION_INT_VALUE = 64;
892    
893    
894    
895      /**
896       * The result code (64) that will be used if the client request violates a
897       * naming constraint (e.g., a name form or DIT structure rule) defined in the
898       * server.
899       */
900      public static final ResultCode NAMING_VIOLATION =
901           new ResultCode(INFO_RC_NAMING_VIOLATION.get(),
902                          NAMING_VIOLATION_INT_VALUE);
903    
904    
905    
906      /**
907       * The integer value (65) for the "OBJECT_CLASS_VIOLATION" result code.
908       */
909      public static final int OBJECT_CLASS_VIOLATION_INT_VALUE = 65;
910    
911    
912    
913      /**
914       * The result code (65) that will be used if the client request violates an
915       * object class constraint (e.g., an undefined object class, a
916       * disallowed attribute, or a missing required attribute) defined in the
917       * server.
918       */
919      public static final ResultCode OBJECT_CLASS_VIOLATION =
920           new ResultCode(INFO_RC_OBJECT_CLASS_VIOLATION.get(),
921                          OBJECT_CLASS_VIOLATION_INT_VALUE);
922    
923    
924    
925      /**
926       * The integer value (66) for the "NOT_ALLOWED_ON_NONLEAF" result code.
927       */
928      public static final int NOT_ALLOWED_ON_NONLEAF_INT_VALUE = 66;
929    
930    
931    
932      /**
933       * The result code (66) that will be used if the requested operation is not
934       * allowed to be performed on non-leaf entries.
935       */
936      public static final ResultCode NOT_ALLOWED_ON_NONLEAF =
937           new ResultCode(INFO_RC_NOT_ALLOWED_ON_NONLEAF.get(),
938                          NOT_ALLOWED_ON_NONLEAF_INT_VALUE);
939    
940    
941    
942      /**
943       * The integer value (67) for the "NOT_ALLOWED_ON_RDN" result code.
944       */
945      public static final int NOT_ALLOWED_ON_RDN_INT_VALUE = 67;
946    
947    
948    
949      /**
950       * The result code (67) that will be used if the requested operation would
951       * alter the RDN of the entry but the operation was not a modify DN request.
952       */
953      public static final ResultCode NOT_ALLOWED_ON_RDN =
954           new ResultCode(INFO_RC_NOT_ALLOWED_ON_RDN.get(),
955                          NOT_ALLOWED_ON_RDN_INT_VALUE);
956    
957    
958    
959      /**
960       * The integer value (68) for the "ENTRY_ALREADY_EXISTS" result code.
961       */
962      public static final int ENTRY_ALREADY_EXISTS_INT_VALUE = 68;
963    
964    
965    
966      /**
967       * The result code (68) that will be used if the requested operation would
968       * create a conflict with an entry that already exists in the server.
969       */
970      public static final ResultCode ENTRY_ALREADY_EXISTS =
971           new ResultCode(INFO_RC_ENTRY_ALREADY_EXISTS.get(),
972                          ENTRY_ALREADY_EXISTS_INT_VALUE);
973    
974    
975    
976      /**
977       * The integer value (69) for the "OBJECT_CLASS_MODS_PROHIBITED" result code.
978       */
979      public static final int OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE = 69;
980    
981    
982    
983      /**
984       * The result code (69) that will be used if the requested operation would
985       * alter the set of object classes defined in the entry in a disallowed
986       * manner.
987       */
988      public static final ResultCode OBJECT_CLASS_MODS_PROHIBITED =
989           new ResultCode(INFO_RC_OBJECT_CLASS_MODS_PROHIBITED.get(),
990                          OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE);
991    
992    
993    
994      /**
995       * The integer value (71) for the "AFFECTS_MULTIPLE_DSAS" result code.
996       */
997      public static final int AFFECTS_MULTIPLE_DSAS_INT_VALUE = 71;
998    
999    
1000    
1001      /**
1002       * The result code (71) that will be used if the requested operation would
1003       * impact entries in multiple data sources.
1004       */
1005      public static final ResultCode AFFECTS_MULTIPLE_DSAS =
1006           new ResultCode(INFO_RC_AFFECTS_MULTIPLE_DSAS.get(),
1007                          AFFECTS_MULTIPLE_DSAS_INT_VALUE);
1008    
1009    
1010    
1011      /**
1012       * The integer value (76) for the "VIRTUAL_LIST_VIEW_ERROR" result code.
1013       */
1014      public static final int VIRTUAL_LIST_VIEW_ERROR_INT_VALUE = 76;
1015    
1016    
1017    
1018      /**
1019       * The result code (76) that will be used if an error occurred while
1020       * performing processing associated with the virtual list view control.
1021       */
1022      public static final ResultCode VIRTUAL_LIST_VIEW_ERROR =
1023           new ResultCode(INFO_RC_VIRTUAL_LIST_VIEW_ERROR.get(),
1024                          VIRTUAL_LIST_VIEW_ERROR_INT_VALUE);
1025    
1026    
1027    
1028      /**
1029       * The integer value (80) for the "OTHER" result code.
1030       */
1031      public static final int OTHER_INT_VALUE = 80;
1032    
1033    
1034    
1035      /**
1036       * The result code (80) that will be used if none of the other result codes
1037       * are appropriate.
1038       */
1039      public static final ResultCode OTHER =
1040           new ResultCode(INFO_RC_OTHER.get(), OTHER_INT_VALUE);
1041    
1042    
1043    
1044      /**
1045       * The integer value (81) for the "SERVER_DOWN" result code.
1046       */
1047      public static final int SERVER_DOWN_INT_VALUE = 81;
1048    
1049    
1050    
1051      /**
1052       * The client-side result code (81) that will be used if an established
1053       * connection to the server is lost.
1054       */
1055      public static final ResultCode SERVER_DOWN =
1056           new ResultCode(INFO_RC_SERVER_DOWN.get(), SERVER_DOWN_INT_VALUE);
1057    
1058    
1059    
1060      /**
1061       * The integer value (82) for the "LOCAL_ERROR" result code.
1062       */
1063      public static final int LOCAL_ERROR_INT_VALUE = 82;
1064    
1065    
1066    
1067      /**
1068       * The client-side result code (82) that will be used if a generic client-side
1069       * error occurs during processing.
1070       */
1071      public static final ResultCode LOCAL_ERROR =
1072           new ResultCode(INFO_RC_LOCAL_ERROR.get(), LOCAL_ERROR_INT_VALUE);
1073    
1074    
1075    
1076      /**
1077       * The integer value (83) for the "ENCODING_ERROR" result code.
1078       */
1079      public static final int ENCODING_ERROR_INT_VALUE = 83;
1080    
1081    
1082    
1083      /**
1084       * The client-side result code (83) that will be used if an error occurs while
1085       * encoding a request.
1086       */
1087      public static final ResultCode ENCODING_ERROR =
1088           new ResultCode(INFO_RC_ENCODING_ERROR.get(), ENCODING_ERROR_INT_VALUE);
1089    
1090    
1091    
1092      /**
1093       * The integer value (84) for the "DECODING_ERROR" result code.
1094       */
1095      public static final int DECODING_ERROR_INT_VALUE = 84;
1096    
1097    
1098    
1099      /**
1100       * The client-side result code (84) that will be used if an error occurs while
1101       * decoding a response.
1102       */
1103      public static final ResultCode DECODING_ERROR =
1104           new ResultCode(INFO_RC_DECODING_ERROR.get(), DECODING_ERROR_INT_VALUE);
1105    
1106    
1107    
1108      /**
1109       * The integer value (85) for the "TIMEOUT" result code.
1110       */
1111      public static final int TIMEOUT_INT_VALUE = 85;
1112    
1113    
1114    
1115      /**
1116       * The client-side result code (85) that will be used if a client timeout
1117       * occurs while waiting for a response from the server.
1118       */
1119      public static final ResultCode TIMEOUT =
1120           new ResultCode(INFO_RC_TIMEOUT.get(), TIMEOUT_INT_VALUE);
1121    
1122    
1123    
1124      /**
1125       * The integer value (86) for the "AUTH_UNKNOWN" result code.
1126       */
1127      public static final int AUTH_UNKNOWN_INT_VALUE = 86;
1128    
1129    
1130    
1131      /**
1132       * The client-side result code (86) that will be used if the client attempts
1133       * to use an unknown authentication type.
1134       */
1135      public static final ResultCode AUTH_UNKNOWN =
1136           new ResultCode(INFO_RC_AUTH_UNKNOWN.get(), AUTH_UNKNOWN_INT_VALUE);
1137    
1138    
1139    
1140      /**
1141       * The integer value (87) for the "FILTER_ERROR" result code.
1142       */
1143      public static final int FILTER_ERROR_INT_VALUE = 87;
1144    
1145    
1146    
1147      /**
1148       * The client-side result code (87) that will be used if an error occurs while
1149       * attempting to encode a search filter.
1150       */
1151      public static final ResultCode FILTER_ERROR =
1152           new ResultCode(INFO_RC_FILTER_ERROR.get(), FILTER_ERROR_INT_VALUE);
1153    
1154    
1155    
1156      /**
1157       * The integer value (88) for the "USER_CANCELED" result code.
1158       */
1159      public static final int USER_CANCELED_INT_VALUE = 88;
1160    
1161    
1162    
1163      /**
1164       * The client-side result code (88) that will be used if the end user canceled
1165       * the operation in progress.
1166       */
1167      public static final ResultCode USER_CANCELED =
1168           new ResultCode(INFO_RC_USER_CANCELED.get(), USER_CANCELED_INT_VALUE);
1169    
1170    
1171    
1172      /**
1173       * The integer value (89) for the "PARAM_ERROR" result code.
1174       */
1175      public static final int PARAM_ERROR_INT_VALUE = 89;
1176    
1177    
1178    
1179      /**
1180       * The client-side result code (89) that will be used if there is a problem
1181       * with the parameters provided for a request.
1182       */
1183      public static final ResultCode PARAM_ERROR =
1184           new ResultCode(INFO_RC_PARAM_ERROR.get(), PARAM_ERROR_INT_VALUE);
1185    
1186    
1187    
1188      /**
1189       * The integer value (90) for the "NO_MEMORY" result code.
1190       */
1191      public static final int NO_MEMORY_INT_VALUE = 90;
1192    
1193    
1194    
1195      /**
1196       * The client-side result code (90) that will be used if the client does not
1197       * have sufficient memory to perform the requested operation.
1198       */
1199      public static final ResultCode NO_MEMORY =
1200           new ResultCode(INFO_RC_NO_MEMORY.get(), NO_MEMORY_INT_VALUE);
1201    
1202    
1203    
1204      /**
1205       * The integer value (91) for the "CONNECT_ERROR" result code.
1206       */
1207      public static final int CONNECT_ERROR_INT_VALUE = 91;
1208    
1209    
1210    
1211      /**
1212       * The client-side result code (91) that will be used if an error occurs while
1213       * attempting to connect to a target server.
1214       */
1215      public static final ResultCode CONNECT_ERROR =
1216           new ResultCode(INFO_RC_CONNECT_ERROR.get(), CONNECT_ERROR_INT_VALUE);
1217    
1218    
1219    
1220      /**
1221       * The integer value (92) for the "NOT_SUPPORTED" result code.
1222       */
1223      public static final int NOT_SUPPORTED_INT_VALUE = 92;
1224    
1225    
1226    
1227      /**
1228       * The client-side result code (92) that will be used if the requested
1229       * operation is not supported.
1230       */
1231      public static final ResultCode NOT_SUPPORTED =
1232           new ResultCode(INFO_RC_NOT_SUPPORTED.get(), NOT_SUPPORTED_INT_VALUE);
1233    
1234    
1235    
1236      /**
1237       * The integer value (93) for the "CONTROL_NOT_FOUND" result code.
1238       */
1239      public static final int CONTROL_NOT_FOUND_INT_VALUE = 93;
1240    
1241    
1242    
1243      /**
1244       * The client-side result code (93) that will be used if the response from the
1245       * server did not include an expected control.
1246       */
1247      public static final ResultCode CONTROL_NOT_FOUND =
1248           new ResultCode(INFO_RC_CONTROL_NOT_FOUND.get(),
1249                          CONTROL_NOT_FOUND_INT_VALUE);
1250    
1251    
1252    
1253      /**
1254       * The integer value (94) for the "NO_RESULTS_RETURNED" result code.
1255       */
1256      public static final int NO_RESULTS_RETURNED_INT_VALUE = 94;
1257    
1258    
1259    
1260      /**
1261       * The client-side result code (94) that will be used if the server did not
1262       * send any results.
1263       */
1264      public static final ResultCode NO_RESULTS_RETURNED =
1265           new ResultCode(INFO_RC_NO_RESULTS_RETURNED.get(),
1266                          NO_RESULTS_RETURNED_INT_VALUE);
1267    
1268    
1269    
1270      /**
1271       * The integer value (95) for the "MORE_RESULTS_TO_RETURN" result code.
1272       */
1273      public static final int MORE_RESULTS_TO_RETURN_INT_VALUE = 95;
1274    
1275    
1276    
1277      /**
1278       * The client-side result code (95) that will be used if there are still more
1279       * results to return.
1280       */
1281      public static final ResultCode MORE_RESULTS_TO_RETURN =
1282           new ResultCode(INFO_RC_MORE_RESULTS_TO_RETURN.get(),
1283                          MORE_RESULTS_TO_RETURN_INT_VALUE);
1284    
1285    
1286    
1287      /**
1288       * The integer value (96) for the "CLIENT_LOOP" result code.
1289       */
1290      public static final int CLIENT_LOOP_INT_VALUE = 96;
1291    
1292    
1293    
1294      /**
1295       * The client-side result code (96) that will be used if the client detects a
1296       * loop while attempting to follow referrals.
1297       */
1298      public static final ResultCode CLIENT_LOOP =
1299           new ResultCode(INFO_RC_CLIENT_LOOP.get(), CLIENT_LOOP_INT_VALUE);
1300    
1301    
1302    
1303      /**
1304       * The integer value (97) for the "REFERRAL_LIMIT_EXCEEDED" result code.
1305       */
1306      public static final int REFERRAL_LIMIT_EXCEEDED_INT_VALUE = 97;
1307    
1308    
1309    
1310      /**
1311       * The client-side result code (97) that will be used if the client
1312       * encountered too many referrals in the course of processing an operation.
1313       */
1314      public static final ResultCode REFERRAL_LIMIT_EXCEEDED =
1315           new ResultCode(INFO_RC_REFERRAL_LIMIT_EXCEEDED.get(),
1316                          REFERRAL_LIMIT_EXCEEDED_INT_VALUE);
1317    
1318    
1319    
1320      /**
1321       * The integer value (118) for the "CANCELED" result code.
1322       */
1323      public static final int CANCELED_INT_VALUE = 118;
1324    
1325    
1326    
1327      /**
1328       * The result code (118) that will be used if the operation was canceled.
1329       */
1330      public static final ResultCode CANCELED =
1331           new ResultCode(INFO_RC_CANCELED.get(), CANCELED_INT_VALUE);
1332    
1333    
1334    
1335      /**
1336       * The integer value (119) for the "NO_SUCH_OPERATION" result code.
1337       */
1338      public static final int NO_SUCH_OPERATION_INT_VALUE = 119;
1339    
1340    
1341    
1342      /**
1343       * The result code (119) that will be used if the client attempts to cancel an
1344       * operation that the client doesn't exist in the server.
1345       */
1346      public static final ResultCode NO_SUCH_OPERATION =
1347           new ResultCode(INFO_RC_NO_SUCH_OPERATION.get(),
1348                          NO_SUCH_OPERATION_INT_VALUE);
1349    
1350    
1351    
1352      /**
1353       * The integer value (120) for the "TOO_LATE" result code.
1354       */
1355      public static final int TOO_LATE_INT_VALUE = 120;
1356    
1357    
1358    
1359      /**
1360       * The result code (120) that will be used if the client attempts to cancel an
1361       * operation too late in the processing for that operation.
1362       */
1363      public static final ResultCode TOO_LATE =
1364           new ResultCode(INFO_RC_TOO_LATE.get(), TOO_LATE_INT_VALUE);
1365    
1366    
1367    
1368      /**
1369       * The integer value (121) for the "CANNOT_CANCEL" result code.
1370       */
1371      public static final int CANNOT_CANCEL_INT_VALUE = 121;
1372    
1373    
1374    
1375      /**
1376       * The result code (121) that will be used if the client attempts to cancel an
1377       * operation that cannot be canceled.
1378       */
1379      public static final ResultCode CANNOT_CANCEL =
1380           new ResultCode(INFO_RC_CANNOT_CANCEL.get(), CANNOT_CANCEL_INT_VALUE);
1381    
1382    
1383    
1384      /**
1385       * The integer value (122) for the "ASSERTION_FAILED" result code.
1386       */
1387      public static final int ASSERTION_FAILED_INT_VALUE = 122;
1388    
1389    
1390    
1391      /**
1392       * The result code (122) that will be used if the requested operation included
1393       * the LDAP assertion control but the assertion did not match the target
1394       * entry.
1395       */
1396      public static final ResultCode ASSERTION_FAILED =
1397           new ResultCode(INFO_RC_ASSERTION_FAILED.get(),
1398                          ASSERTION_FAILED_INT_VALUE);
1399    
1400    
1401    
1402      /**
1403       * The integer value (123) for the "AUTHORIZATION_DENIED" result code.
1404       */
1405      public static final int AUTHORIZATION_DENIED_INT_VALUE = 123;
1406    
1407    
1408    
1409      /**
1410       * The result code (123) that will be used if the client is denied the ability
1411       * to use the proxied authorization control.
1412       */
1413      public static final ResultCode AUTHORIZATION_DENIED =
1414           new ResultCode(INFO_RC_AUTHORIZATION_DENIED.get(),
1415                          AUTHORIZATION_DENIED_INT_VALUE);
1416    
1417    
1418    
1419      /**
1420       * The integer value (4096) for the "E_SYNC_REFRESH_REQUIRED" result code.
1421       */
1422      public static final int E_SYNC_REFRESH_REQUIRED_INT_VALUE = 4096;
1423    
1424    
1425    
1426      /**
1427       * The result code (4096) that will be used if a client using the content
1428       * synchronization request control requests an incremental update but the
1429       * server is unable to honor that request and requires the client to request
1430       * an initial content.
1431       */
1432      public static final ResultCode E_SYNC_REFRESH_REQUIRED =
1433           new ResultCode(INFO_RC_E_SYNC_REFRESH_REQUIRED.get(),
1434                          E_SYNC_REFRESH_REQUIRED_INT_VALUE);
1435    
1436    
1437    
1438      /**
1439       * The integer value (16654) for the "NO_OPERATION" result code.
1440       */
1441      public static final int NO_OPERATION_INT_VALUE = 16654;
1442    
1443    
1444    
1445      /**
1446       * The result code (16654) for operations that completed successfully but no
1447       * changes were made to the server because the LDAP no-op control was included
1448       * in the request.
1449       */
1450      public static final ResultCode NO_OPERATION =
1451           new ResultCode(INFO_RC_NO_OPERATION.get(), NO_OPERATION_INT_VALUE);
1452    
1453    
1454    
1455      /**
1456       * The integer value (30221001) for the "INTERACTIVE_TRANSACTION_ABORTED"
1457       * result code.
1458       */
1459      public static final int INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE = 30221001;
1460    
1461    
1462    
1463      /**
1464       * The result code (30221001) for use if an interactive transaction has been
1465       * aborted, either due to an explicit request from a client or by the server
1466       * without a client request.
1467       */
1468      public static final ResultCode INTERACTIVE_TRANSACTION_ABORTED =
1469           new ResultCode(INFO_RC_INTERACTIVE_TRANSACTION_ABORTED.get(),
1470                          INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE);
1471    
1472    
1473    
1474      /**
1475       * The integer value (30221002) for the "DATABASE_LOCK_CONFLICT" result code.
1476       */
1477      public static final int DATABASE_LOCK_CONFLICT_INT_VALUE = 30221002;
1478    
1479    
1480    
1481      /**
1482       * The result code (30221002) for use if an operation fails because of a
1483       * database lock conflict (e.g., a deadlock or lock timeout).
1484       */
1485      public static final ResultCode DATABASE_LOCK_CONFLICT =
1486           new ResultCode(INFO_RC_DATABASE_LOCK_CONFLICT.get(),
1487                          DATABASE_LOCK_CONFLICT_INT_VALUE);
1488    
1489    
1490    
1491      /**
1492       * The set of result code objects created with undefined int result code
1493       * values.
1494       */
1495      private static final HashMap<Integer,ResultCode> UNDEFINED_RESULT_CODES =
1496           new HashMap<Integer,ResultCode>();
1497    
1498    
1499    
1500      /**
1501       * The serial version UID for this serializable class.
1502       */
1503      private static final long serialVersionUID = 7609311304252378100L;
1504    
1505    
1506    
1507      // The integer value for this result code.
1508      private final int intValue;
1509    
1510      // The name for this result code.
1511      private final String name;
1512    
1513      // The string representation for this result code.
1514      private final String stringRepresentation;
1515    
1516    
1517    
1518      /**
1519       * Creates a new result code with the specified integer value.
1520       *
1521       * @param  intValue  The integer value for this result code.
1522       */
1523      private ResultCode(final int intValue)
1524      {
1525        this.intValue = intValue;
1526    
1527        name                 = String.valueOf(intValue);
1528        stringRepresentation = name;
1529      }
1530    
1531    
1532    
1533      /**
1534       * Creates a new result code with the specified name and integer value.
1535       *
1536       * @param  name      The name for this result code.
1537       * @param  intValue  The integer value for this result code.
1538       */
1539      private ResultCode(final String name, final int intValue)
1540      {
1541        this.name     = name;
1542        this.intValue = intValue;
1543    
1544        stringRepresentation = intValue + " (" + name + ')';
1545      }
1546    
1547    
1548    
1549      /**
1550       * Retrieves the name for this result code.
1551       *
1552       * @return  The name for this result code.
1553       */
1554      public String getName()
1555      {
1556        return name;
1557      }
1558    
1559    
1560    
1561      /**
1562       * Retrieves the integer value for this result code.
1563       *
1564       * @return  The integer value for this result code.
1565       */
1566      public int intValue()
1567      {
1568        return intValue;
1569      }
1570    
1571    
1572    
1573      /**
1574       * Retrieves the result code with the specified integer value.  If the
1575       * provided integer value does not correspond to a predefined
1576       * {@code ResultCode} object, then a new {@code ResultCode} object will be
1577       * created and returned.  Any new result codes created will also be cached
1578       * and returned for any subsequent requests with that integer value so the
1579       * same object will always be returned for a given integer value.
1580       *
1581       * @param  intValue  The integer value for which to retrieve the corresponding
1582       *                   result code.
1583       *
1584       * @return  The result code with the specified integer value, or a new result
1585       *          code
1586       */
1587      public static ResultCode valueOf(final int intValue)
1588      {
1589        return valueOf(intValue, null);
1590      }
1591    
1592    
1593    
1594      /**
1595       * Retrieves the result code with the specified integer value.  If the
1596       * provided integer value does not correspond to a predefined
1597       * {@code ResultCode} object, then a new {@code ResultCode} object will be
1598       * created and returned.  Any new result codes created will also be cached
1599       * and returned for any subsequent requests with that integer value so the
1600       * same object will always be returned for a given integer value.
1601       *
1602       * @param  intValue  The integer value for which to retrieve the corresponding
1603       *                   result code.
1604       * @param  name      The user-friendly name to use for the result code if no
1605       *                   result code has been previously accessed with the same
1606       *                   integer value.  It may be {@code null} if this is not
1607       *                   known or a string representation of the integer value
1608       *                   should be used.
1609       *
1610       * @return  The result code with the specified integer value, or a new result
1611       *          code
1612       */
1613      public static ResultCode valueOf(final int intValue, final String name)
1614      {
1615        switch (intValue)
1616        {
1617          case SUCCESS_INT_VALUE:
1618            return SUCCESS;
1619          case OPERATIONS_ERROR_INT_VALUE:
1620            return OPERATIONS_ERROR;
1621          case PROTOCOL_ERROR_INT_VALUE:
1622            return PROTOCOL_ERROR;
1623          case TIME_LIMIT_EXCEEDED_INT_VALUE:
1624            return TIME_LIMIT_EXCEEDED;
1625          case SIZE_LIMIT_EXCEEDED_INT_VALUE:
1626            return SIZE_LIMIT_EXCEEDED;
1627          case COMPARE_FALSE_INT_VALUE:
1628            return COMPARE_FALSE;
1629          case COMPARE_TRUE_INT_VALUE:
1630            return COMPARE_TRUE;
1631          case AUTH_METHOD_NOT_SUPPORTED_INT_VALUE:
1632            return AUTH_METHOD_NOT_SUPPORTED;
1633          case STRONG_AUTH_REQUIRED_INT_VALUE:
1634            return STRONG_AUTH_REQUIRED;
1635          case REFERRAL_INT_VALUE:
1636            return REFERRAL;
1637          case ADMIN_LIMIT_EXCEEDED_INT_VALUE:
1638            return ADMIN_LIMIT_EXCEEDED;
1639          case UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE:
1640            return UNAVAILABLE_CRITICAL_EXTENSION;
1641          case CONFIDENTIALITY_REQUIRED_INT_VALUE:
1642            return CONFIDENTIALITY_REQUIRED;
1643          case SASL_BIND_IN_PROGRESS_INT_VALUE:
1644            return SASL_BIND_IN_PROGRESS;
1645          case NO_SUCH_ATTRIBUTE_INT_VALUE:
1646            return NO_SUCH_ATTRIBUTE;
1647          case UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE:
1648            return UNDEFINED_ATTRIBUTE_TYPE;
1649          case INAPPROPRIATE_MATCHING_INT_VALUE:
1650            return INAPPROPRIATE_MATCHING;
1651          case CONSTRAINT_VIOLATION_INT_VALUE:
1652            return CONSTRAINT_VIOLATION;
1653          case ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE:
1654            return ATTRIBUTE_OR_VALUE_EXISTS;
1655          case INVALID_ATTRIBUTE_SYNTAX_INT_VALUE:
1656            return INVALID_ATTRIBUTE_SYNTAX;
1657          case NO_SUCH_OBJECT_INT_VALUE:
1658            return NO_SUCH_OBJECT;
1659          case ALIAS_PROBLEM_INT_VALUE:
1660            return ALIAS_PROBLEM;
1661          case INVALID_DN_SYNTAX_INT_VALUE:
1662            return INVALID_DN_SYNTAX;
1663          case ALIAS_DEREFERENCING_PROBLEM_INT_VALUE:
1664            return ALIAS_DEREFERENCING_PROBLEM;
1665          case INAPPROPRIATE_AUTHENTICATION_INT_VALUE:
1666            return INAPPROPRIATE_AUTHENTICATION;
1667          case INVALID_CREDENTIALS_INT_VALUE:
1668            return INVALID_CREDENTIALS;
1669          case INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE:
1670            return INSUFFICIENT_ACCESS_RIGHTS;
1671          case BUSY_INT_VALUE:
1672            return BUSY;
1673          case UNAVAILABLE_INT_VALUE:
1674            return UNAVAILABLE;
1675          case UNWILLING_TO_PERFORM_INT_VALUE:
1676            return UNWILLING_TO_PERFORM;
1677          case LOOP_DETECT_INT_VALUE:
1678            return LOOP_DETECT;
1679          case SORT_CONTROL_MISSING_INT_VALUE:
1680            return SORT_CONTROL_MISSING;
1681          case OFFSET_RANGE_ERROR_INT_VALUE:
1682            return OFFSET_RANGE_ERROR;
1683          case NAMING_VIOLATION_INT_VALUE:
1684            return NAMING_VIOLATION;
1685          case OBJECT_CLASS_VIOLATION_INT_VALUE:
1686            return OBJECT_CLASS_VIOLATION;
1687          case NOT_ALLOWED_ON_NONLEAF_INT_VALUE:
1688            return NOT_ALLOWED_ON_NONLEAF;
1689          case NOT_ALLOWED_ON_RDN_INT_VALUE:
1690            return NOT_ALLOWED_ON_RDN;
1691          case ENTRY_ALREADY_EXISTS_INT_VALUE:
1692            return ENTRY_ALREADY_EXISTS;
1693          case OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE:
1694            return OBJECT_CLASS_MODS_PROHIBITED;
1695          case AFFECTS_MULTIPLE_DSAS_INT_VALUE:
1696            return AFFECTS_MULTIPLE_DSAS;
1697          case VIRTUAL_LIST_VIEW_ERROR_INT_VALUE:
1698            return VIRTUAL_LIST_VIEW_ERROR;
1699          case OTHER_INT_VALUE:
1700            return OTHER;
1701          case SERVER_DOWN_INT_VALUE:
1702            return SERVER_DOWN;
1703          case LOCAL_ERROR_INT_VALUE:
1704            return LOCAL_ERROR;
1705          case ENCODING_ERROR_INT_VALUE:
1706            return ENCODING_ERROR;
1707          case DECODING_ERROR_INT_VALUE:
1708            return DECODING_ERROR;
1709          case TIMEOUT_INT_VALUE:
1710            return TIMEOUT;
1711          case AUTH_UNKNOWN_INT_VALUE:
1712            return AUTH_UNKNOWN;
1713          case FILTER_ERROR_INT_VALUE:
1714            return FILTER_ERROR;
1715          case USER_CANCELED_INT_VALUE:
1716            return USER_CANCELED;
1717          case PARAM_ERROR_INT_VALUE:
1718            return PARAM_ERROR;
1719          case NO_MEMORY_INT_VALUE:
1720            return NO_MEMORY;
1721          case CONNECT_ERROR_INT_VALUE:
1722            return CONNECT_ERROR;
1723          case NOT_SUPPORTED_INT_VALUE:
1724            return NOT_SUPPORTED;
1725          case CONTROL_NOT_FOUND_INT_VALUE:
1726            return CONTROL_NOT_FOUND;
1727          case NO_RESULTS_RETURNED_INT_VALUE:
1728            return NO_RESULTS_RETURNED;
1729          case MORE_RESULTS_TO_RETURN_INT_VALUE:
1730            return MORE_RESULTS_TO_RETURN;
1731          case CLIENT_LOOP_INT_VALUE:
1732            return CLIENT_LOOP;
1733          case REFERRAL_LIMIT_EXCEEDED_INT_VALUE:
1734            return REFERRAL_LIMIT_EXCEEDED;
1735          case CANCELED_INT_VALUE:
1736            return CANCELED;
1737          case NO_SUCH_OPERATION_INT_VALUE:
1738            return NO_SUCH_OPERATION;
1739          case TOO_LATE_INT_VALUE:
1740            return TOO_LATE;
1741          case CANNOT_CANCEL_INT_VALUE:
1742            return CANNOT_CANCEL;
1743          case ASSERTION_FAILED_INT_VALUE:
1744            return ASSERTION_FAILED;
1745          case AUTHORIZATION_DENIED_INT_VALUE:
1746            return AUTHORIZATION_DENIED;
1747          case E_SYNC_REFRESH_REQUIRED_INT_VALUE:
1748            return E_SYNC_REFRESH_REQUIRED;
1749          case NO_OPERATION_INT_VALUE:
1750            return NO_OPERATION;
1751          case INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE:
1752            return INTERACTIVE_TRANSACTION_ABORTED;
1753          case DATABASE_LOCK_CONFLICT_INT_VALUE:
1754            return DATABASE_LOCK_CONFLICT;
1755        }
1756    
1757        synchronized (UNDEFINED_RESULT_CODES)
1758        {
1759          ResultCode rc = UNDEFINED_RESULT_CODES.get(intValue);
1760          if (rc == null)
1761          {
1762            if (name == null)
1763            {
1764              rc = new ResultCode(intValue);
1765            }
1766            else
1767            {
1768              rc = new ResultCode(name, intValue);
1769            }
1770    
1771            UNDEFINED_RESULT_CODES.put(intValue, rc);
1772          }
1773    
1774          return rc;
1775        }
1776      }
1777    
1778    
1779    
1780      /**
1781       * Retrieves an array of all result codes defined in the LDAP SDK.  This will
1782       * not include dynamically-generated values.
1783       *
1784       * @return  An array of all result codes defined in the LDAP SDK.
1785       */
1786      public static ResultCode[] values()
1787      {
1788        return new ResultCode[]
1789        {
1790          SUCCESS,
1791          OPERATIONS_ERROR,
1792          PROTOCOL_ERROR,
1793          TIME_LIMIT_EXCEEDED,
1794          SIZE_LIMIT_EXCEEDED,
1795          COMPARE_FALSE,
1796          COMPARE_TRUE,
1797          AUTH_METHOD_NOT_SUPPORTED,
1798          STRONG_AUTH_REQUIRED,
1799          REFERRAL,
1800          ADMIN_LIMIT_EXCEEDED,
1801          UNAVAILABLE_CRITICAL_EXTENSION,
1802          CONFIDENTIALITY_REQUIRED,
1803          SASL_BIND_IN_PROGRESS,
1804          NO_SUCH_ATTRIBUTE,
1805          UNDEFINED_ATTRIBUTE_TYPE,
1806          INAPPROPRIATE_MATCHING,
1807          CONSTRAINT_VIOLATION,
1808          ATTRIBUTE_OR_VALUE_EXISTS,
1809          INVALID_ATTRIBUTE_SYNTAX,
1810          NO_SUCH_OBJECT,
1811          ALIAS_PROBLEM,
1812          INVALID_DN_SYNTAX,
1813          ALIAS_DEREFERENCING_PROBLEM,
1814          INAPPROPRIATE_AUTHENTICATION,
1815          INVALID_CREDENTIALS,
1816          INSUFFICIENT_ACCESS_RIGHTS,
1817          BUSY,
1818          UNAVAILABLE,
1819          UNWILLING_TO_PERFORM,
1820          LOOP_DETECT,
1821          SORT_CONTROL_MISSING,
1822          OFFSET_RANGE_ERROR,
1823          NAMING_VIOLATION,
1824          OBJECT_CLASS_VIOLATION,
1825          NOT_ALLOWED_ON_NONLEAF,
1826          NOT_ALLOWED_ON_RDN,
1827          ENTRY_ALREADY_EXISTS,
1828          OBJECT_CLASS_MODS_PROHIBITED,
1829          AFFECTS_MULTIPLE_DSAS,
1830          VIRTUAL_LIST_VIEW_ERROR,
1831          OTHER,
1832          SERVER_DOWN,
1833          LOCAL_ERROR,
1834          ENCODING_ERROR,
1835          DECODING_ERROR,
1836          TIMEOUT,
1837          AUTH_UNKNOWN,
1838          FILTER_ERROR,
1839          USER_CANCELED,
1840          PARAM_ERROR,
1841          NO_MEMORY,
1842          CONNECT_ERROR,
1843          NOT_SUPPORTED,
1844          CONTROL_NOT_FOUND,
1845          NO_RESULTS_RETURNED,
1846          MORE_RESULTS_TO_RETURN,
1847          CLIENT_LOOP,
1848          REFERRAL_LIMIT_EXCEEDED,
1849          CANCELED,
1850          NO_SUCH_OPERATION,
1851          TOO_LATE,
1852          CANNOT_CANCEL,
1853          ASSERTION_FAILED,
1854          AUTHORIZATION_DENIED,
1855          E_SYNC_REFRESH_REQUIRED,
1856          NO_OPERATION,
1857          INTERACTIVE_TRANSACTION_ABORTED,
1858          DATABASE_LOCK_CONFLICT
1859        };
1860      }
1861    
1862    
1863    
1864      /**
1865       * Indicates whether this result code is one that should be used for
1866       * client-side errors rather than returned by the server.
1867       *
1868       * @return  {@code true} if this result code is a client-side result code, or
1869       *          {@code false} if it is one that may be returned by the server.
1870       */
1871      public boolean isClientSideResultCode()
1872      {
1873        return isClientSideResultCode(this);
1874      }
1875    
1876    
1877    
1878      /**
1879       * Indicates whether the provided result code is one that should be used for
1880       * client-side errors rather than returned by the server.
1881       *
1882       * @param  resultCode  The result code for which to make the determination.
1883       *
1884       * @return  {@code true} if the provided result code is a client-side result
1885       *          code, or {@code false} if it is one that may be returned by the
1886       *          server.
1887       */
1888      public static boolean isClientSideResultCode(final ResultCode resultCode)
1889      {
1890        switch (resultCode.intValue())
1891        {
1892          case SERVER_DOWN_INT_VALUE:
1893          case LOCAL_ERROR_INT_VALUE:
1894          case ENCODING_ERROR_INT_VALUE:
1895          case DECODING_ERROR_INT_VALUE:
1896          case TIMEOUT_INT_VALUE:
1897          case AUTH_UNKNOWN_INT_VALUE:
1898          case FILTER_ERROR_INT_VALUE:
1899          case USER_CANCELED_INT_VALUE:
1900          case PARAM_ERROR_INT_VALUE:
1901          case NO_MEMORY_INT_VALUE:
1902          case CONNECT_ERROR_INT_VALUE:
1903          case NOT_SUPPORTED_INT_VALUE:
1904          case CONTROL_NOT_FOUND_INT_VALUE:
1905          case NO_RESULTS_RETURNED_INT_VALUE:
1906          case MORE_RESULTS_TO_RETURN_INT_VALUE:
1907          case CLIENT_LOOP_INT_VALUE:
1908          case REFERRAL_LIMIT_EXCEEDED_INT_VALUE:
1909            return true;
1910          default:
1911            return false;
1912        }
1913      }
1914    
1915    
1916    
1917      /**
1918       * Indicates whether the connection on which this result code was received is
1919       * likely still usable.  Note that this is a best guess, and it may or may not
1920       * be correct.  It will attempt to be conservative so that a connection is
1921       * more likely to be classified as unusable when it may still be valid than to
1922       * be classified as usable when that is no longer the case.
1923       *
1924       * @return  {@code true} if it is likely that the connection on which this
1925       *          result code was received is still usable, or {@code false} if it
1926       *          may no longer be valid.
1927       */
1928      public boolean isConnectionUsable()
1929      {
1930        return isConnectionUsable(this);
1931      }
1932    
1933    
1934    
1935      /**
1936       * Indicates whether the connection on which the provided result code was
1937       * received is likely still usable.  Note that this is a best guess based on
1938       * the provided result code, and it may or may not be correct.  It will
1939       * attempt to be conservative so that a connection is more likely to be
1940       * classified as unusable when it may still be valid than to be classified
1941       * as usable when that is no longer the case.
1942       *
1943       * @param  resultCode  The result code for which to make the determination.
1944       *
1945       * @return  {@code true} if it is likely that the connection on which the
1946       *          provided result code was received is still usable, or
1947       *          {@code false} if it may no longer be valid.
1948       */
1949      public static boolean isConnectionUsable(final ResultCode resultCode)
1950      {
1951        switch (resultCode.intValue())
1952        {
1953          case OPERATIONS_ERROR_INT_VALUE:
1954          case PROTOCOL_ERROR_INT_VALUE:
1955          case BUSY_INT_VALUE:
1956          case UNAVAILABLE_INT_VALUE:
1957          case UNWILLING_TO_PERFORM_INT_VALUE:
1958          case OTHER_INT_VALUE:
1959          case SERVER_DOWN_INT_VALUE:
1960          case LOCAL_ERROR_INT_VALUE:
1961          case ENCODING_ERROR_INT_VALUE:
1962          case DECODING_ERROR_INT_VALUE:
1963          case TIMEOUT_INT_VALUE:
1964          case NO_MEMORY_INT_VALUE:
1965          case CONNECT_ERROR_INT_VALUE:
1966            return false;
1967          default:
1968            return true;
1969        }
1970      }
1971    
1972    
1973    
1974      /**
1975       * The hash code for this result code.
1976       *
1977       * @return  The hash code for this result code.
1978       */
1979      @Override()
1980      public int hashCode()
1981      {
1982        return intValue;
1983      }
1984    
1985    
1986    
1987      /**
1988       * Indicates whether the provided object is equal to this result code.
1989       *
1990       * @param  o  The object for which to make the determination.
1991       *
1992       * @return  {@code true} if the provided object is a result code that is equal
1993       *          to this result code, or {@code false} if not.
1994       */
1995      @Override()
1996      public boolean equals(final Object o)
1997      {
1998        if (o == null)
1999        {
2000          return false;
2001        }
2002        else if (o == this)
2003        {
2004          return true;
2005        }
2006        else if (o instanceof ResultCode)
2007        {
2008          return (intValue == ((ResultCode) o).intValue);
2009        }
2010        else
2011        {
2012          return false;
2013        }
2014      }
2015    
2016    
2017    
2018      /**
2019       * Retrieves a string representation of this result code.
2020       *
2021       * @return  A string representation of this result code.
2022       */
2023      @Override()
2024      public String toString()
2025      {
2026        return stringRepresentation;
2027      }
2028    }