
    
package performa.orm.types;

import java.util.*;
import oneit.utils.*;
import oneit.utils.transform.*;



/**
 * This class was generated using constGen.bat.
 * DO NOT MODIFY THIS CODE.
 * Edit the associated .xml file, and regenerate this file
 * constGen (directory) (file minus extension)
 * e.g. constGen C:\...\sql FieldType
 */

public class OccupationLevel extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_OccupationLevel = new OccupationLevelFactory();
    
    public static final OccupationLevel LEVEL_1 = new OccupationLevel ("LEVEL_1", "LEVEL_1", "Level 1", false);
    
    public static final OccupationLevel LEVEL_2 = new OccupationLevel ("LEVEL_2", "LEVEL_2", "Level 2", false);
    
    public static final OccupationLevel LEVEL_3 = new OccupationLevel ("LEVEL_3", "LEVEL_3", "Level 3", false);
    
    public static final OccupationLevel LEVEL_4 = new OccupationLevel ("LEVEL_4", "LEVEL_4", "Level 4", false);

    private static final OccupationLevel[] allOccupationLevels =
        new OccupationLevel[] { LEVEL_1,LEVEL_2,LEVEL_3,LEVEL_4};


    private static OccupationLevel[] getAllOccupationLevels ()
    {
        return allOccupationLevels;
    }

    private OccupationLevel (String name, String value, String description, boolean disabled)
    {
        super (name, value, description, disabled);
    }
    
    public static final Comparator COMPARE_BY_POSITION = new CompareEnumByPosition (allOccupationLevels);



    static
    {
        defineAdditionalData ();
    }

    public boolean isEqual (OccupationLevel other)
    {
    return this.name.equals (other.name);
    }

    public Enumeration getAllInstances ()
    {
        return OccupationLevel.getAll ();
    }


    private Object readResolve() throws java.io.ObjectStreamException
    {
        return OccupationLevel.forName (this.name);
    }


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_OccupationLevel;
    }

    public static OccupationLevel forName (String name)
    {
        if (name == null) { return null; }

        OccupationLevel[] all = getAllOccupationLevels();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


    public static OccupationLevel forValue (String value)
    {
        if (value == null) { return null; }

        OccupationLevel[] all = getAllOccupationLevels();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllOccupationLevels (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllOccupationLevels());
    }
    
    
    public static OccupationLevel[] getOccupationLevelArray ()
    {
        return (OccupationLevel[])getAllOccupationLevels().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


    static class OccupationLevelFactory implements EnumeratedFactory
    {
        public AbstractEnumerated getForName (String name)
        {
            return OccupationLevel.forName (name);
        }

        public AbstractEnumerated getForValue (String name)
        {
            return OccupationLevel.forValue (name);
        }

        public Enumeration getAll ()
        {
            return OccupationLevel.getAll ();
        }
    }


    public Map getAdditionalAttributes ()
    {
        Map attribs = new HashMap ();

        
        return attribs;
    }
    
    public static class OccupationLevelPipeLineFactory<From, Me extends OccupationLevel> extends AbstractEnumerated.EnumPipeLine<From, Me>
    {
        public <Prev> OccupationLevelPipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public OccupationLevelPipeLineFactory (From seed)
        {
            super(seed);
        }

        public OccupationLevelPipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            
            return super.to(name);
        }
        
    }
}

