KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nilostep > xlsql > database > xlConstants


1 /*(Header: NiLOSTEP / xlSQL)
2
3     Copyright (C) 2004 NiLOSTEP Information Sciences, all
4     rights reserved.
5     
6     This program is licensed under the terms of the GNU
7     General Public License.You should have received a copy
8     of the GNU General Public License along with this
9     program;
10 */

11
12 package com.nilostep.xlsql.database;
13
14 /**
15  *
16  * @version $Revision: 1.3 $
17  * @author Jim Caprioli
18  */

19 public class xlConstants {
20
21     public static final int ADD = 0;
22
23     public static final int UPDATE = 1;
24
25     public static final int DELETE = 2;
26
27     public static final String JavaDoc NOARGS = "xlSQL: no such argument(s).";
28
29
30     public static int xlType(int sqlType) {
31         int ret = 0;
32
33         switch (sqlType) {
34             case (-6):
35             case (-5):
36             case (-2):
37             case 2:
38             case 3:
39             case 4:
40             case 5:
41             case 6:
42             case 7:
43             case 8:
44                 ret = 1;
45                 break;
46         
47             case 1:
48             case 12:
49             case 70:
50                 ret = 2;
51                 break;
52         
53             case 91:
54             case 92:
55             case 93:
56                 ret = 3;
57                 break;
58         
59             case -7:
60             case 16:
61                 ret = 4;
62                 break;
63             
64             default:
65                 ret = 0;
66         }
67
68         return ret;
69     }
70 }
Popular Tags