2
* $Header: /home/cvs/jakarta-struts/contrib/artimus/WEB-INF/src/java/org/apache/artimus/keys/sql/Commands.java,v 1.3 2004/03/14 07:15:04 sraeburn Exp $
4
* $Date: 2004/03/14 07:15:04 $
6
* Copyright 2001-2004 The Apache Software Foundation.
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
22
package org.apache.artimus.keys.sql;
26
* SQL command constants for the Articles application.
28
* @version $Revision: 1.3 $ $Date: 2004/03/14 07:15:04 $
30
public final class Commands {
36
* Default starting value for primary keys.
38
public static final String PRIMARY_KEY_INIT = "101";
44
public static final String KEYS_TABLE = "artimus_keys ";
50
public static final String KEYS_CREATE =
51
"(name char(31) NOT NULL PRIMARY KEY," +
52
"marked bit NOT NULL DEFAULT 0," +
53
"next integer NOT NULL DEFAULT 0" +
58
* SQL command to select next key.
60
public static final String KEYS_NEXT = "SELECT next FROM " +
61
KEYS_TABLE + "WHERE name=?";
65
* SQL command to select next key.
67
public static final String KEYS_INC = "UPDATE " +
68
KEYS_TABLE +"SET next=next+1 WHERE name=?";
71
// ---- End Commands ----