
    
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 JobSortOption extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_JobSortOption = new JobSortOptionFactory();
    
    public static final JobSortOption NEWEST = new JobSortOption ("NEWEST", "NEWEST", "Newest", false);
    
    public static final JobSortOption CLOSING_SOON = new JobSortOption ("CLOSING_SOON", "CLOSING_SOON", "Closing Soon", false);
    
    public static final JobSortOption OLDEST = new JobSortOption ("OLDEST", "OLDEST", "Oldest", false);
    
    public static final JobSortOption ALPHA_A_Z = new JobSortOption ("ALPHA_A_Z", "ALPHA_A_Z", "A-Z", false);
    
    public static final JobSortOption ALPHA_Z_A = new JobSortOption ("ALPHA_Z_A", "ALPHA_Z_A", "Z-A", false);

    private static final JobSortOption[] allJobSortOptions =
        new JobSortOption[] { NEWEST,CLOSING_SOON,OLDEST,ALPHA_A_Z,ALPHA_Z_A};


    private static JobSortOption[] getAllJobSortOptions ()
    {
        return allJobSortOptions;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_JobSortOption;
    }

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

        JobSortOption[] all = getAllJobSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        JobSortOption[] all = getAllJobSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllJobSortOptions (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllJobSortOptions());
    }
    
    
    public static JobSortOption[] getJobSortOptionArray ()
    {
        return (JobSortOption[])getAllJobSortOptions().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

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

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

