KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > netui > databinding > datagrid > runtime > sql > DefaultSQLSupportConfig


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

18 package org.apache.beehive.netui.databinding.datagrid.runtime.sql;
19
20 /**
21  *
22  */

23 class DefaultSQLSupportConfig
24     extends SQLSupportConfig {
25
26     private static final String JavaDoc DEFAULT_QUOTE_CHAR = "'";
27     private static final boolean DEFAULT_SUPPORTS_LIKE_ESCAPE_CLAUSE = true;
28
29     private String JavaDoc _quoteChar = DEFAULT_QUOTE_CHAR;
30     private Boolean JavaDoc _supportsLikeEscapeClause = null;
31
32     DefaultSQLSupportConfig() {
33     }
34
35     /**
36      * Setter to provide the character used to quote strings built when constructing
37      * SQL statements. The default quote value is a single quote.
38      *
39      * @param quoteChar the quote character to use; usually a single or double quote
40      */

41     public void setQuoteChar(String JavaDoc quoteChar) {
42         _quoteChar = quoteChar;
43     }
44
45     public String JavaDoc getQuoteChar() {
46         return _quoteChar;
47     }
48
49     public void setSupportsLikeEscapeClause(boolean supportsLikeEscapeClause) {
50         _supportsLikeEscapeClause = new Boolean JavaDoc(supportsLikeEscapeClause);
51     }
52
53     public boolean getSupportsLikeEscapeClause() {
54         return (_supportsLikeEscapeClause != null ? _supportsLikeEscapeClause.booleanValue() : DEFAULT_SUPPORTS_LIKE_ESCAPE_CLAUSE);
55     }
56 }
57
Popular Tags