File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\table\ColumnResolver.java.html

1 /*
2 * Copyright 2004-2011 H2 Group. Multiple-Licensed under the H2 License,
3 * Version 1.0, and under the Eclipse Public License, Version 1.0
4 * (http://h2database.com/html/license.html).
5 * Initial Developer: H2 Group
6 */
7 package org.h2.table;
8
9 import org.h2.command.dml.Select;
10 import org.h2.expression.Expression;
11 import org.h2.expression.ExpressionColumn;
12 import org.h2.value.Value;
13
14 /**
15 * A column resolver is list of column (for example, a table) that can map a
16 * column name to an actual column.
17 */
18 public interface ColumnResolver {
19
20 /**
21 * Get the table alias.
22 *
23 * @return the table alias
24 */
25 String getTableAlias();
26
27 /**
28 * Get the column list.
29 *
30 * @return the column list
31 */
32 Column[] getColumns();
33
34 /**
35 * Get the list of system columns, if any.
36 *
37 * @return the system columns or null
38 */
39 Column[] getSystemColumns();
40
41 /**
42 * Get the row id pseudo column, if there is one.
43 *
44 * @return the row id column or null
45 */
46 Column getRowIdColumn();
47
48 /**
49 * Get the schema name.
50 *
51 * @return the schema name
52 */
53 String getSchemaName();
54
55 /**
56 * Get the value for the given column.
57 *
58 * @param column the column
59 * @return the value
60 */
61 Value getValue(Column column);
62
63 /**
64 * Get the table filter.
65 *
66 * @return the table filter
67 */
68 TableFilter getTableFilter();
69
70 /**
71 * Get the select statement.
72 *
73 * @return the select statement
74 */
75 Select getSelect();
76
77 /**
78 * Get the expression that represents this column.
79 *
80 * @param expressionColumn the expression column
81 * @param column the column
82 * @return the optimized expression
83 */
84 Expression optimize(ExpressionColumn expressionColumn, Column column);
85
86 }
87