tudresden.ocl.sql
Class TypeManager
java.lang.Object
tudresden.ocl.sql.TypeManager
- public class TypeManager
- extends Object
This class maps a number of commonly used datatypes to something
like standard SQL datatypes. It is used to reduce the number of
possible datatypes used in softwaredesign to a defined Set of
datatypes every implementation of SQLBuilder should know.
- Author:
- Andrea Kling
- See Also:
SQLBuilder
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
myInstance
private static TypeManager myInstance
types
private Hashtable types
l
private List l
INTEGER
public static final String INTEGER
- See Also:
- Constant Field Values
SMALLINT
public static final String SMALLINT
- See Also:
- Constant Field Values
BIT_1
public static final String BIT_1
- See Also:
- Constant Field Values
LONG
public static final String LONG
- See Also:
- Constant Field Values
ID
public static final String ID
- See Also:
- Constant Field Values
CHAR
public static final String CHAR
- See Also:
- Constant Field Values
VARCHAR
public static final String VARCHAR
- See Also:
- Constant Field Values
FLOAT
public static final String FLOAT
- See Also:
- Constant Field Values
DOUBLE
public static final String DOUBLE
- See Also:
- Constant Field Values
DATE
public static final String DATE
- See Also:
- Constant Field Values
TIMESTAMP
public static final String TIMESTAMP
- See Also:
- Constant Field Values
TypeManager
private TypeManager()
getInstance
public static TypeManager getInstance()
getSQLType
public String getSQLType(String type)
- maps the datatype given to one of the datatypes given in the
static fields. If no matching datatype can be found the type is returned
getTypes
public List getTypes()
- returns a list of all defined datatypes. oOly one instance of
every Type is contained, meaning as 'integer' is contained in
the List 'int' is not.
- Returns:
- a List of String
isDefined
public boolean isDefined(String type)
- Returns:
- true if type can be mapped to a standard datatype
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.