
    
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 AppSortOption extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_AppSortOption = new AppSortOptionFactory();
    
    public static final AppSortOption RANK = new AppSortOption ("RANK", "RANK", "Rank", false);
    
    public static final AppSortOption NEWEST = new AppSortOption ("NEWEST", "NEWEST", "Newest", false);
    
    public static final AppSortOption OLDEST = new AppSortOption ("OLDEST", "OLDEST", "Oldest", false);
    
    public static final AppSortOption ALPHA_A_Z = new AppSortOption ("ALPHA_A_Z", "ALPHA_A_Z", "A-Z", false);
    
    public static final AppSortOption ALPHA_Z_A = new AppSortOption ("ALPHA_Z_A", "ALPHA_Z_A", "Z-A", false);

    private static final AppSortOption[] allAppSortOptions =
        new AppSortOption[] { RANK,NEWEST,OLDEST,ALPHA_A_Z,ALPHA_Z_A};


    private static AppSortOption[] getAllAppSortOptions ()
    {
        return allAppSortOptions;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_AppSortOption;
    }

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

        AppSortOption[] all = getAllAppSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        AppSortOption[] all = getAllAppSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllAppSortOptions (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllAppSortOptions());
    }
    
    
    public static AppSortOption[] getAppSortOptionArray ()
    {
        return (AppSortOption[])getAllAppSortOptions().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

