
    
    
package performa.orm.types;

import java.util.*;
import oneit.utils.*;
import oneit.utils.transform.*;



/**
 * 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 RoleType extends AbstractEnumerated
{
    
    public static final EnumeratedFactory FACTORY_RoleType = new RoleTypeFactory();
    
    public static final RoleType ADMIN = new RoleType ("ADMIN", "ADMIN", "Admin", false);
    
    public static final RoleType STANDARD = new RoleType ("STANDARD", "STANDARD", "Standard", false);
    
    public static final RoleType OWNER = new RoleType ("OWNER", "OWNER", "Owner", false);
    
    public static final RoleType BILLING = new RoleType ("BILLING", "BILLING", "Billing", false);

    private static final RoleType[] allRoleTypes =
        new RoleType[] { ADMIN,STANDARD,OWNER,BILLING};


    private static RoleType[] getAllRoleTypes ()
    {
        return allRoleTypes;
    }

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



    static
    {
        defineAdditionalData ();
    }

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

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


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


    public EnumeratedFactory getFactory ()
    {
        return FACTORY_RoleType;
    }

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

        RoleType[] all = getAllRoleTypes();
        int enumIndex = AbstractEnumerated.getIndexForName (all, name);

        return all[enumIndex];
    }


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

        RoleType[] all = getAllRoleTypes();
        int enumIndex = AbstractEnumerated.getIndexForValue (getAllRoleTypes (), value);

        return all[enumIndex];
    }


    public static java.util.Enumeration getAll ()
    {
        return AbstractEnumerated.getAll (getAllRoleTypes());
    }
    
    
    public static RoleType[] getRoleTypeArray ()
    {
        return (RoleType[])getAllRoleTypes().clone ();
    }


    public static void defineAdditionalData ()
    {
        
    }


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

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

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


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

        
        return attribs;
    }
    
    public static class RoleTypePipeLineFactory<From, Me extends RoleType> extends AbstractEnumerated.EnumPipeLine<From, Me>
    {
        public <Prev> RoleTypePipeLineFactory (PipeLine<From, Prev> pipeLine, Pipe<Prev, Me> nextPipe)
        {
            super (pipeLine, nextPipe);
        }
        
        public RoleTypePipeLineFactory (From seed)
        {
            super(seed);
        }

        public RoleTypePipeLineFactory (Collection<From> seed)
        {
            super(seed);
        }
        
        public PipeLine<From, ? extends Object> to(String name)
        {
            
            return super.to(name);
        }
        
    }
}

    
