
    
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 UserSortOption extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_UserSortOption = new UserSortOptionFactory();
    
    public static final UserSortOption ALPHA_A_Z = new UserSortOption ("ALPHA_A_Z", "ALPHA_A_Z", "A-Z", false);
    
    public static final UserSortOption ALPHA_Z_A = new UserSortOption ("ALPHA_Z_A", "ALPHA_Z_A", "Z-A", false);

    private static final UserSortOption[] allUserSortOptions =
        new UserSortOption[] { ALPHA_A_Z,ALPHA_Z_A};


    private static UserSortOption[] getAllUserSortOptions ()
    {
        return allUserSortOptions;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_UserSortOption;
    }

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

        UserSortOption[] all = getAllUserSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        UserSortOption[] all = getAllUserSortOptions();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllUserSortOptions (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllUserSortOptions());
    }
    
    
    public static UserSortOption[] getUserSortOptionArray ()
    {
        return (UserSortOption[])getAllUserSortOptions().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

