KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > ws > jaxme > sqls > Index


1 /*
2  * Copyright 2003, 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  */

17 package org.apache.ws.jaxme.sqls;
18
19
20 /** <p>Interface of an index declaration.</p>
21  *
22  * @author <a HREF="mailto:joe@ispsoft.de">Jochen Wiedmann</a>
23  */

24 public interface Index extends ColumnSet {
25    public interface Name extends SQLFactory.Ident {
26    }
27
28    /** <p>Sets the index name. Explicit setting of an index name
29     * is not required.</p>
30     */

31    public void setName(Index.Name pName);
32    /** <p>Sets the index name. Explicit setting of an index name
33     * is not required.</p>
34     */

35    public void setName(String JavaDoc pName);
36    /** <p>Returns the index name. Explicit setting of an index name
37     * is not required.</p>
38     */

39    public Index.Name getName();
40    /** <p>Adds a column to the index. The column must have the
41     * same table.</p>
42     */

43    public void addColumn(Column pColumn);
44
45    /** <p>Adds the column with the given name to the index
46     * by invoking {@link #addColumn(Column)}.</p>
47     */

48    public void addColumn(Column.Name pName);
49
50    /** <p>Adds the column with the given name to the index
51     * by invoking {@link #addColumn(Column)}.</p>
52     */

53    public void addColumn(String JavaDoc pName);
54
55    /** <p>Returns whether the index is unique.</p>
56     */

57    public boolean isUnique();
58
59    /** <p>Returns whether the index is a primary key index.</p>
60     */

61    public boolean isPrimaryKey();
62 }
63
Popular Tags