01: /*
02: * Created on 22/05/2004
03: *
04: * Swing Components - visit http://sf.net/projects/gfd
05: *
06: * Copyright (C) 2004 Igor Regis da Silva Simões
07: *
08: * This program is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public License
10: * as published by the Free Software Foundation; either version 2
11: * of the License, or (at your option) any later version.
12: *
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public License
19: * along with this program; if not, write to the Free Software
20: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21: *
22: */
23: package br.com.gfpshare.db;
24:
25: import java.util.ArrayList;
26: import java.util.Map;
27:
28: /**
29: * @author Igor Regis da Silva Simoes
30: */
31: public class HSQLDBSQLParser extends AbstractSQLParser {
32:
33: /**
34: * Cria uma nova instância de MSAccessDAO
35: */
36: public HSQLDBSQLParser() {
37: //Não fazemos nada
38: }
39:
40: /**
41: * @see br.com.gfpshare.db.AbstractSQLParser#getDeleteSQL(java.lang.String, java.util.Map, java.util.ArrayList, java.lang.Object[])
42: */
43: @Override
44: public ParsedPreparedStatement getDeleteSQL(String tableName,
45: Map data, ArrayList<String> columnsName,
46: ArrayList<SQLCondition> condicoesExtras,
47: ArrayList<String> pkNames) {
48: return parse(super .getDeleteSQL(tableName, data, columnsName,
49: condicoesExtras, pkNames));
50:
51: }
52:
53: /**
54: * @see br.com.gfpshare.db.SQLParser#getInsertSQL(java.lang.String, java.util.Map, java.util.ArrayList)
55: */
56: @Override
57: public ParsedPreparedStatement getInsertSQL(String tableName,
58: Map data, ArrayList<String> columnsName) {
59: return parse(super .getInsertSQL(tableName, data, columnsName));
60: }
61:
62: /**
63: * @see br.com.gfpshare.db.SQLParser#getSelectSQL(java.lang.String, java.lang.String, java.util.Map, java.util.ArrayList, java.lang.String[], boolean[], java.lang.Object[])
64: */
65: @Override
66: public ParsedPreparedStatement getSelectSQL(
67: String resultadoDesejado, String tableName, Map data,
68: ArrayList<String> columnsName, String[] orderByColumns,
69: boolean[] crescente, ArrayList<SQLCondition> condicoesExtras) {
70: return parse(super .getSelectSQL(resultadoDesejado, tableName,
71: data, columnsName, orderByColumns, crescente,
72: condicoesExtras));
73: }
74:
75: /**
76: * @see br.com.gfpshare.db.SQLParser#getUpdateSQL(java.lang.String, java.util.Map, java.util.ArrayList, java.util.ArrayList)
77: */
78: @Override
79: public ParsedPreparedStatement getUpdateSQL(String tableName,
80: Map data, ArrayList<String> columnsName,
81: ArrayList<String> pkNames) {
82: return parse(super .getUpdateSQL(tableName, data, columnsName,
83: pkNames));
84: }
85:
86: /**
87: * @see br.com.gfpshare.db.SQLParser#parse(java.lang.String)
88: */
89: @Override
90: public ParsedPreparedStatement parse(ParsedPreparedStatement sql) {
91: return super.parse(sql);
92: }
93: }
|