01: /*
02: * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
03: * (http://h2database.com/html/license.html).
04: * Initial Developer: H2 Group
05: */
06: package org.h2.table;
07:
08: import org.h2.command.dml.Select;
09: import org.h2.value.Value;
10:
11: /**
12: * The single column resolver is like a table with exactly one row.
13: * It is used to parse a simple one-column check constraint.
14: */
15: public class SingleColumnResolver implements ColumnResolver {
16:
17: private final Column column;
18: private Value value;
19:
20: SingleColumnResolver(Column column) {
21: this .column = column;
22: }
23:
24: public String getTableAlias() {
25: return null;
26: }
27:
28: public void setValue(Value value) {
29: this .value = value;
30: }
31:
32: public Value getValue(Column column) {
33: return value;
34: }
35:
36: public Column[] getColumns() {
37: return new Column[] { column };
38: }
39:
40: public String getSchemaName() {
41: return null;
42: }
43:
44: public TableFilter getTableFilter() {
45: return null;
46: }
47:
48: public Select getSelect() {
49: return null;
50: }
51:
52: public Column[] getSystemColumns() {
53: return null;
54: }
55:
56: }
|