org.ujac.util
Class UjacTypeHelper

java.lang.Object
  extended by org.ujac.util.UjacTypeHelper
All Implemented Interfaces:
UjacTypes

public class UjacTypeHelper
extends Object
implements UjacTypes

Name: UjacTypes
Description: Provides helper methods for string to type conversion and back.

Author:
lauerc

Field Summary
 
Fields inherited from interface org.ujac.util.UjacTypes
TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_NAME_BOOLEAN, TYPE_NAME_DATE, TYPE_NAME_DOUBLE, TYPE_NAME_FLOAT, TYPE_NAME_INT, TYPE_NAME_LONG, TYPE_NAME_OBJECT, TYPE_NAME_SHORT, TYPE_NAME_STRING, TYPE_NAME_TABLE, TYPE_NAME_TIME, TYPE_NAME_TIMESTAMP, TYPE_OBJECT, TYPE_SHORT, TYPE_STRING, TYPE_TABLE, TYPE_TIME, TYPE_TIMESTAMP
 
Constructor Summary
UjacTypeHelper()
           
 
Method Summary
static int getTypeId(String name)
          Gets the type ID from the given String.
static int[] getTypeIds()
          Gets an array of all type IDs.
static String getTypeName(int id)
          Gets the type name from the given ID.
static String[] getTypeNames()
          Gets an array of all type names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UjacTypeHelper

public UjacTypeHelper()
Method Detail

getTypeId

public static final int getTypeId(String name)
Gets the type ID from the given String.

Parameters:
name - The name of the type to determine.
Returns:
The according type ID or -1 in case the type name is unknown.

getTypeName

public static final String getTypeName(int id)
Gets the type name from the given ID.

Parameters:
id - The ID of the type to get the name for.
Returns:
The according type name or null in case the type ID is unknown.

getTypeNames

public static final String[] getTypeNames()
Gets an array of all type names.

Returns:
An array with all type names.

getTypeIds

public static final int[] getTypeIds()
Gets an array of all type IDs.

Returns:
An array of all type IDs.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.