001    package org.omg.Security;
002    /**
003     * Generated from IDL enum "DelegationMode".
004     *
005     * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007
006     * @version generated at Sep 22, 2012 10:57:14 AM
007     */
008    
009    public final class DelegationMode
010            implements org.omg.CORBA.portable.IDLEntity
011    {
012            private int value = -1;
013            public static final int _SecDelModeNoDelegation = 0;
014            public static final DelegationMode SecDelModeNoDelegation = new DelegationMode(_SecDelModeNoDelegation);
015            public static final int _SecDelModeSimpleDelegation = 1;
016            public static final DelegationMode SecDelModeSimpleDelegation = new DelegationMode(_SecDelModeSimpleDelegation);
017            public static final int _SecDelModeCompositeDelegation = 2;
018            public static final DelegationMode SecDelModeCompositeDelegation = new DelegationMode(_SecDelModeCompositeDelegation);
019            public int value()
020            {
021                    return value;
022            }
023            public static DelegationMode from_int(int value)
024            {
025                    switch (value) {
026                            case _SecDelModeNoDelegation: return SecDelModeNoDelegation;
027                            case _SecDelModeSimpleDelegation: return SecDelModeSimpleDelegation;
028                            case _SecDelModeCompositeDelegation: return SecDelModeCompositeDelegation;
029                            default: throw new org.omg.CORBA.BAD_PARAM();
030                    }
031            }
032            public String toString()
033            {
034                    switch (value) {
035                            case _SecDelModeNoDelegation: return "SecDelModeNoDelegation";
036                            case _SecDelModeSimpleDelegation: return "SecDelModeSimpleDelegation";
037                            case _SecDelModeCompositeDelegation: return "SecDelModeCompositeDelegation";
038                            default: throw new org.omg.CORBA.BAD_PARAM();
039                    }
040            }
041            protected DelegationMode(int i)
042            {
043                    value = i;
044            }
045            java.lang.Object readResolve()
046            throws java.io.ObjectStreamException
047            {
048                    return from_int(value());
049            }
050    }