
    
package performa.orm.types;

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



/**
 * 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 ClientSortOption extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_ClientSortOption = new ClientSortOptionFactory();
    
    public static final ClientSortOption ALPHA_A_Z = new ClientSortOption ("ALPHA_A_Z", "ALPHA_A_Z", "Alphabetical (A-Z)", false);
    
    public static final ClientSortOption ALPHA_Z_A = new ClientSortOption ("ALPHA_Z_A", "ALPHA_Z_A", "Alphabetical (Z-A)", false);
    
    public static final ClientSortOption OPEN_JOBS = new ClientSortOption ("OPEN_JOBS", "OPEN_JOBS", "Open Jobs", false);
    
    public static final ClientSortOption FILLED_JOBS = new ClientSortOption ("FILLED_JOBS", "FILLED_JOBS", "Filled Jobs", false);

    private static final ClientSortOption[] allClientSortOptions =
        new ClientSortOption[] { ALPHA_A_Z,ALPHA_Z_A,OPEN_JOBS,FILLED_JOBS};


    private static ClientSortOption[] getAllClientSortOptions ()
    {
        return allClientSortOptions;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_ClientSortOption;
    }

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

        ClientSortOption[] all = getAllClientSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        ClientSortOption[] all = getAllClientSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllClientSortOptions (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllClientSortOptions());
    }
    
    
    public static ClientSortOption[] getClientSortOptionArray ()
    {
        return (ClientSortOption[])getAllClientSortOptions().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

