
    
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 CurrencyType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_CurrencyType = new CurrencyTypeFactory();
    
    public static final CurrencyType AUD = new CurrencyType ("AUD", "AUD", "AUD", false);
    
    public static final CurrencyType NZD = new CurrencyType ("NZD", "NZD", "NZD", false);
    
    public static final CurrencyType EUR = new CurrencyType ("EUR", "EUR", "EUR", false);
    
    public static final CurrencyType GBP = new CurrencyType ("GBP", "GBP", "GBP", false);
    
    public static final CurrencyType USD = new CurrencyType ("USD", "USD", "USD", false);
    
    public static final CurrencyType SGD = new CurrencyType ("SGD", "SGD", "SGD", false);

    private static final CurrencyType[] allCurrencyTypes =
        new CurrencyType[] { AUD,NZD,EUR,GBP,USD,SGD};


    private static CurrencyType[] getAllCurrencyTypes ()
    {
        return allCurrencyTypes;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_CurrencyType;
    }

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

        CurrencyType[] all = getAllCurrencyTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        CurrencyType[] all = getAllCurrencyTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllCurrencyTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllCurrencyTypes());
    }
    
    
    public static CurrencyType[] getCurrencyTypeArray ()
    {
        return (CurrencyType[])getAllCurrencyTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
}

