
    
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 LocationRadius extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_LocationRadius = new LocationRadiusFactory();
    
    public static final LocationRadius NA = new LocationRadius ("NA", "NA", "N/A", false);
    
    public static final LocationRadius KM5 = new LocationRadius ("KM5", "KM5", "5 kms or 3 mi", false);
    
    public static final LocationRadius KM10 = new LocationRadius ("KM10", "KM10", "10 kms or 5 mi", false);
    
    public static final LocationRadius KM25 = new LocationRadius ("KM25", "KM25", "25 kms or 15 mi", false);
    
    public static final LocationRadius KM50 = new LocationRadius ("KM50", "KM50", "50 kms or 30 mi", false);
    
    public static final LocationRadius KM100 = new LocationRadius ("KM100", "KM100", "100 kms or 60 mi", false);

    private static final LocationRadius[] allLocationRadiuss =
        new LocationRadius[] { NA,KM5,KM10,KM25,KM50,KM100};


    private static LocationRadius[] getAllLocationRadiuss ()
    {
        return allLocationRadiuss;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_LocationRadius;
    }

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

        LocationRadius[] all = getAllLocationRadiuss();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        LocationRadius[] all = getAllLocationRadiuss();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllLocationRadiuss (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllLocationRadiuss());
    }
    
    
    public static LocationRadius[] getLocationRadiusArray ()
    {
        return (LocationRadius[])getAllLocationRadiuss().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

