
    
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 DraftLocation extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_DraftLocation = new DraftLocationFactory();
    
    public static final DraftLocation DETAILS = new DraftLocation ("DETAILS", "DETAILS", "Details", false);
    
    public static final DraftLocation ASSESSMENT = new DraftLocation ("ASSESSMENT", "ASSESSMENT", "Assessment", false);
    
    public static final DraftLocation CULTURE = new DraftLocation ("CULTURE", "CULTURE", "Culture", false);
    
    public static final DraftLocation REVIEW = new DraftLocation ("REVIEW", "REVIEW", "Review", false);

    private static final DraftLocation[] allDraftLocations =
        new DraftLocation[] { DETAILS,ASSESSMENT,CULTURE,REVIEW};


    private static DraftLocation[] getAllDraftLocations ()
    {
        return allDraftLocations;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_DraftLocation;
    }

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

        DraftLocation[] all = getAllDraftLocations();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        DraftLocation[] all = getAllDraftLocations();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllDraftLocations (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllDraftLocations());
    }
    
    
    public static DraftLocation[] getDraftLocationArray ()
    {
        return (DraftLocation[])getAllDraftLocations().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

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

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

