KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > torque > engine > database > model > SchemaType


1 package org.apache.torque.engine.database.model;
2
3 /*
4  * Copyright 2003,2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import java.util.Iterator;
20 import java.util.List;
21 import java.util.Map;
22
23 import org.apache.commons.lang.enum.Enum;
24
25 /**
26  * Enum for types used in Torque schema.xml files.
27  *
28  * @author <a HREF="mailto:mpoeschl@marmot.at>Martin Poeschl</a>
29  * @version $Id: SchemaType.java,v 1.2 2004/02/22 06:27:19 jmcnally Exp $
30  */

31 public class SchemaType extends Enum
32 {
33     public static final SchemaType BIT = new SchemaType("BIT");
34     public static final SchemaType TINYINT = new SchemaType("TINYINT");
35     public static final SchemaType SMALLINT = new SchemaType("SMALLINT");
36     public static final SchemaType INTEGER = new SchemaType("INTEGER");
37     public static final SchemaType BIGINT = new SchemaType("BIGINT");
38     public static final SchemaType FLOAT = new SchemaType("FLOAT");
39     public static final SchemaType REAL = new SchemaType("REAL");
40     public static final SchemaType NUMERIC = new SchemaType("NUMERIC");
41     public static final SchemaType DECIMAL = new SchemaType("DECIMAL");
42     public static final SchemaType CHAR = new SchemaType("CHAR");
43     public static final SchemaType VARCHAR = new SchemaType("VARCHAR");
44     public static final SchemaType LONGVARCHAR = new SchemaType("LONGVARCHAR");
45     public static final SchemaType DATE = new SchemaType("DATE");
46     public static final SchemaType TIME = new SchemaType("TIME");
47     public static final SchemaType TIMESTAMP = new SchemaType("TIMESTAMP");
48     public static final SchemaType BINARY = new SchemaType("BINARY");
49     public static final SchemaType VARBINARY = new SchemaType("VARBINARY");
50     public static final SchemaType LONGVARBINARY = new SchemaType("LONGVARBINARY");
51     public static final SchemaType NULL = new SchemaType("NULL");
52     public static final SchemaType OTHER = new SchemaType("OTHER");
53     public static final SchemaType JAVA_OBJECT = new SchemaType("JAVA_OBJECT");
54     public static final SchemaType DISTINCT = new SchemaType("DISTINCT");
55     public static final SchemaType STRUCT = new SchemaType("STRUCT");
56     public static final SchemaType ARRAY = new SchemaType("ARRAY");
57     public static final SchemaType BLOB = new SchemaType("BLOB");
58     public static final SchemaType CLOB = new SchemaType("CLOB");
59     public static final SchemaType REF = new SchemaType("REF");
60     public static final SchemaType BOOLEANINT = new SchemaType("BOOLEANINT");
61     public static final SchemaType BOOLEANCHAR = new SchemaType("BOOLEANCHAR");
62     public static final SchemaType DOUBLE = new SchemaType("DOUBLE");
63     
64     private SchemaType(String type)
65     {
66         super(type);
67     }
68  
69     public static SchemaType getEnum(String type)
70     {
71         return (SchemaType) getEnum(SchemaType.class, type);
72     }
73  
74     public static Map getEnumMap()
75     {
76         return getEnumMap(SchemaType.class);
77     }
78  
79     public static List getEnumList()
80     {
81         return getEnumList(SchemaType.class);
82     }
83  
84     public static Iterator iterator()
85     {
86         return iterator(SchemaType.class);
87     }
88
89 }
90
Popular Tags