File D:\maven-qcr-plugin-testsunitaires\qcr4java\h2-1.3.170-sources\target\site\qc\lecode\schema\SchemaObjectBase.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.schema;
8
9 import org.h2.engine.DbObjectBase;
10
11 /**
12 * The base class for classes implementing SchemaObject.
13 */
14 public abstract class SchemaObjectBase extends DbObjectBase implements SchemaObject {
15
16 private Schema schema;
17
18 /**
19 * Initialize some attributes of this object.
20 *
21 * @param newSchema the schema
22 * @param id the object id
23 * @param name the name
24 * @param traceModule the trace module name
25 */
26 protected void initSchemaObjectBase(Schema newSchema, int id, String name, String traceModule) {
27 initDbObjectBase(newSchema.getDatabase(), id, name, traceModule);
28 this.schema = newSchema;
29 }
30
31 public Schema getSchema() {
32 return schema;
33 }
34
35 public String getSQL() {
36 return schema.getSQL() + "." + super.getSQL();
37 }
38
39 public boolean isHidden() {
40 return false;
41 }
42
43 }
44