01: /*
02: * Copyright 2007 Roy van der Kuil (roy@vanderkuil.nl) and Stefan Rotman (stefan@rotman.net)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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: package nl.improved.sqlclient;
17:
18: import java.util.List;
19:
20: public class TabCompletionInfo {
21: public enum MatchType {
22: SQL_KEYWORD, TABLE_NAMES, COLUMN_NAMES, FILE_NAMES, UNKNOWN
23: }
24:
25: private MatchType type;
26: private List<String> possibleMatches;
27: private String start;
28:
29: public TabCompletionInfo(MatchType type,
30: List<String> possibleMatches) {
31: this (type, possibleMatches, "");
32: }
33:
34: public TabCompletionInfo(MatchType type,
35: List<String> possibleMatches, String start) {
36: this .type = type;
37: this .possibleMatches = possibleMatches;
38: this .start = start;
39: }
40:
41: public MatchType getMatchType() {
42: return type;
43: }
44:
45: public List<String> getPossibleMatches() {
46: return possibleMatches;
47: }
48:
49: public String getStart() {
50: return start;
51: }
52:
53: }
|