Java

C code posted by jsdude
created at 22 Feb 19:51, updated at 26 Jun 13:57

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
                    if (prefixo.equalsIgnoreCase("int_")) {
                        parametros.put(nomePar, new Integer(param));
                    } else if (prefixo.equalsIgnoreCase("dbl_")) {
                        parametros.put(nomePar, new Double(param));
                    } else if (prefixo.equalsIgnoreCase("tsp_")) {
                        String dataStr = param.substring(2,4) + "/" + param.substring(0,2) + "/" + param.substring(4,8);
                        parametros.put(nomePar, new Date(dataStr));
                    } else if (prefixo.equalsIgnoreCase("boo_")) {
                        if (param.equalsIgnoreCase("1")) {
                            parametros.put(nomePar, new Boolean(true));
                        }
                        else {
                            parametros.put(nomePar, new Boolean(false));
                        }
                    } else if (prefixo.equalsIgnoreCase("str_")) {
                        parametros.put(nomePar, new String(param));
                    } else {
                        parametros.put(nomeParExt, new String(param));
                    }
1.12 KB in 7 ms with coderay