KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jresearch > gossip > dao > drivers > Queries


1 /*
2  * $Id: Queries.java,v 1.3 2005/06/07 12:32:24 bel70 Exp $
3  *
4  * ***** BEGIN LICENSE BLOCK *****
5  * The contents of this file are subject to the Mozilla Public License
6  * Version 1.1 (the "License"); you may not use this file except in
7  * compliance with the License. You may obtain a copy of the License
8  * at http://www.mozilla.org/MPL/
9  *
10  * Software distributed under the License is distributed on an "AS IS"
11  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
12  * the License for the specific language governing rights and
13  * limitations under the License.
14  *
15  * The Original Code is JGossip forum code.
16  *
17  * The Initial Developer of the Original Code is the JResearch, Org.
18  * Portions created by the Initial Developer are Copyright (C) 2004
19  * the Initial Developer. All Rights Reserved.
20  *
21  * Contributor(s):
22  * Alexey Pavlov <alexnet@users.sourceforge.net>
23  *
24  * ***** END LICENSE BLOCK ***** */

25 package org.jresearch.gossip.dao.drivers;
26
27 /**
28  * Queries
29  *
30  * @author <a HREF="alexnet@sourceforge.net">A. Pavlov</a>
31  * @version $version$ 21.03.2004
32  */

33 public abstract class Queries {
34
35     /**
36      * @return
37      */

38     public String JavaDoc getSql_AND() {
39         return AND;
40     }
41
42     /**
43      * @return
44      */

45     public String JavaDoc getSql_AND_USER_NAME() {
46         return AND_USER_NAME;
47     }
48
49     /**
50      * @return
51      */

52     public String JavaDoc getSql_END_1() {
53         return END_1;
54     }
55
56     /**
57      * @return
58      */

59     public String JavaDoc getSql_END_2() {
60         return END_2;
61     }
62
63     /**
64      * @return
65      */

66     public String JavaDoc getSql_LIKE() {
67         return LIKE;
68     }
69
70     /**
71      * @return
72      */

73     public String JavaDoc getSql_DATE_FORMAT() {
74         return MYSQL_DATE_FORMAT;
75     }
76
77     /**
78      * @return
79      */

80     public String JavaDoc getSql_DATETIME_FORMAT() {
81         return MYSQL_DATETIME_FORMAT;
82     }
83
84     /**
85      * @return
86      */

87     public String JavaDoc getSql_OR() {
88         return OR;
89     }
90
91     public ForumQueries getForumQueries() {
92         return this.forumQueries;
93     }
94
95     public UserQueries getUserQueries() {
96         return this.userQueries;
97     }
98
99     /**
100      * @return
101      */

102     public abstract String JavaDoc getSql_NOW();
103
104     protected ForumQueries forumQueries;
105
106     protected UserQueries userQueries;
107
108     private static final String JavaDoc AND = " AND ";
109
110     private static final String JavaDoc AND_USER_NAME = "' AND user_name = '";
111
112     private static final String JavaDoc END_1 = "')";
113
114     private static final String JavaDoc END_2 = "'";
115
116     private static final String JavaDoc LIKE = " LIKE ";
117
118     private static final String JavaDoc MYSQL_DATE_FORMAT = "yyyy-MM-dd";
119
120     private static final String JavaDoc MYSQL_DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
121
122     private static final String JavaDoc OR = " OR ";
123 }
124
Popular Tags