package com.onaro.util.jfc.wizard; import com.onaro.commons.types.AbstractType; public class PropertyType extends AbstractType { private static final long serialVersionUID = 1L; public final static PropertyType STRING = new PropertyType(0, "STRING"); //$NON-NLS-1$ public final static PropertyType INTEGER = new PropertyType(1, "INTEGER"); //$NON-NLS-1$ public final static PropertyType FLOAT = new PropertyType(2, "FLOAT"); //$NON-NLS-1$ public final static PropertyType BOOLEAN = new PropertyType(3, "BOOLEAN"); //$NON-NLS-1$ public final static PropertyType ENUM = new PropertyType(4, "ENUM"); //$NON-NLS-1$ /** * Creates a PropertyTypeType instance. The enum design pattern * is enforced by preventing other classes from instanciating * PropertyTypeType objects. * * @param typeId identifies this type * @param name a description of this type */ private PropertyType(int typeId, String name) { super(PropertyType.class, typeId, name); } /** * Gets the object type object with the specified id. * * @param typeId the type's id * @return the requested type object or null if it doesn't exist */ public static PropertyType getById(int typeId) { return AbstractType.getById(PropertyType.class, typeId); } /** * Gets the object type object with the specified name. * * @param name the type's name * @return the requested type object or null if it doesn't exist */ public static PropertyType getByName(String name) { return AbstractType.getByName(PropertyType.class, name); } }