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.command.ddl;
07:
08: import java.sql.SQLException;
09:
10: import org.h2.engine.Session;
11: import org.h2.schema.Schema;
12:
13: /**
14: * This class represents a non-transaction statement that involves a schema.
15: */
16: public abstract class SchemaCommand extends DefineCommand {
17:
18: private final Schema schema;
19:
20: /**
21: * Create a new command.
22: *
23: * @param session the session
24: * @param schema the schema
25: */
26: public SchemaCommand(Session session, Schema schema) {
27: super (session);
28: this .schema = schema;
29: }
30:
31: /**
32: * Get the schema
33: *
34: * @return the schema
35: */
36: protected Schema getSchema() throws SQLException {
37: return schema;
38: }
39:
40: }
|