
    
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 AppView extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_AppView = new AppViewFactory();
    
    public static final AppView LIST = new AppView ("LIST", "LIST", "List", false);
    
    public static final AppView GRID = new AppView ("GRID", "GRID", "Grid", false);
    
    public static final AppView DETAILED_GRID = new AppView ("DETAILED_GRID", "DETAILED_GRID", "Detailed Grid", false);

    private static final AppView[] allAppViews =
        new AppView[] { LIST,GRID,DETAILED_GRID};


    private static AppView[] getAllAppViews ()
    {
        return allAppViews;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_AppView;
    }

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

        AppView[] all = getAllAppViews();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        AppView[] all = getAllAppViews();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllAppViews (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllAppViews());
    }
    
    
    public static AppView[] getAppViewArray ()
    {
        return (AppView[])getAllAppViews().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

