View Javadoc

1   /*
2    * ModeShape (http://www.modeshape.org)
3    * See the COPYRIGHT.txt file distributed with this work for information
4    * regarding copyright ownership.  Some portions may be licensed
5    * to Red Hat, Inc. under one or more contributor license agreements.
6    * See the AUTHORS.txt file in the distribution for a full listing of 
7    * individual contributors.
8    *
9    * ModeShape is free software. Unless otherwise indicated, all code in ModeShape
10   * is licensed to you under the terms of the GNU Lesser General Public License as
11   * published by the Free Software Foundation; either version 2.1 of
12   * the License, or (at your option) any later version.
13   * 
14   * ModeShape is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   * Lesser General Public License for more details.
18   *
19   * You should have received a copy of the GNU Lesser General Public
20   * License along with this software; if not, write to the Free
21   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23   */
24  package org.modeshape.sequencer.ddl.dialect.derby;
25  
26  import org.modeshape.graph.property.Name;
27  import org.modeshape.graph.property.basic.BasicName;
28  import org.modeshape.sequencer.ddl.StandardDdlLexicon;
29  
30  /**
31   *
32   */
33  public class DerbyDdlLexicon extends StandardDdlLexicon {
34  
35      public static class Namespace {
36          public static final String URI = "http://www.modeshape.org/ddl/derby/1.0";
37          public static final String PREFIX = "derbyddl";
38      }
39      /*
40       * mixin types
41       * 
42       * SQL-92 Spec
43       * 
44       *      CREATE SCHEMA
45       *      CREATE DOMAIN
46       *      CREATE [ { GLOBAL | LOCAL } TEMPORARY ] TABLE
47       *      CREATE VIEW         
48       *      CREATE ASSERTION 
49       *      CREATE CHARACTER SET 
50       *      CREATE COLLATION 
51       *      CREATE TRANSLATION
52       * ===> CREATE FUNCTION
53       * ===> CREATE INDEX
54       * ===> CREATE PROCEDURE
55       * ===> CREATE ROLE
56       * ===> CREATE SYNONYM
57       * ===> CREATE TRIGGER
58       * 
59       *      ALTER TABLE
60       *
61       * ===> GRANT
62       * ===> LOCK TABLE
63       * ===> RENAME TABLE
64       * ===> RENAME INDEX
65       * ===> SET
66       * ===> DECLARE GLOBAL TEMPORARY TABLE
67       */
68   
69      public static final Name TYPE_CREATE_FUNCTION_STATEMENT     = new BasicName(Namespace.URI, "createFunctionStatement");
70      public static final Name TYPE_CREATE_INDEX_STATEMENT        = new BasicName(Namespace.URI, "createIndexStatement");
71      public static final Name TYPE_CREATE_PROCEDURE_STATEMENT    = new BasicName(Namespace.URI, "createProcedureStatement");
72      public static final Name TYPE_CREATE_ROLE_STATEMENT         = new BasicName(Namespace.URI, "createRoleStatement");
73      public static final Name TYPE_CREATE_SYNONYM_STATEMENT      = new BasicName(Namespace.URI, "createSynonymStatement");
74      public static final Name TYPE_CREATE_TRIGGER_STATEMENT      = new BasicName(Namespace.URI, "createTriggerStatement");
75      public static final Name TYPE_LOCK_TABLE_STATEMENT          = new BasicName(Namespace.URI, "lockTableStatement");
76      public static final Name TYPE_RENAME_TABLE_STATEMENT        = new BasicName(Namespace.URI, "renameTableStatement");
77      public static final Name TYPE_RENAME_INDEX_STATEMENT        = new BasicName(Namespace.URI, "renameIndexStatement");
78      public static final Name TYPE_DECLARE_GLOBAL_TEMPORARY_TABLE_STATEMENT = new BasicName(Namespace.URI, "declareGlobalTemporaryTableStatement");
79  
80      public static final Name TYPE_DROP_FUNCTION_STATEMENT       = new BasicName(Namespace.URI, "dropFunctionStatement");
81      public static final Name TYPE_DROP_INDEX_STATEMENT          = new BasicName(Namespace.URI, "dropIndexStatement");
82      public static final Name TYPE_DROP_PROCEDURE_STATEMENT      = new BasicName(Namespace.URI, "dropProcedureStatement");
83      public static final Name TYPE_DROP_ROLE_STATEMENT           = new BasicName(Namespace.URI, "dropRoleStatement");
84      public static final Name TYPE_DROP_SYNONYM_STATEMENT        = new BasicName(Namespace.URI, "dropSynonymStatement");
85      public static final Name TYPE_DROP_TRIGGER_STATEMENT        = new BasicName(Namespace.URI, "dropTriggerStatement");
86      
87      public static final Name TYPE_FUNCTION_PARAMETER            = new BasicName(Namespace.URI, "functionParameter");
88      public static final Name TYPE_INDEX_COLUMN_REFERENCE        = new BasicName(Namespace.URI, "indexColumnReference");
89      public static final Name TYPE_GRANT_ON_FUNCTION_STATEMENT   = new BasicName(Namespace.URI, "grantOnFunctionStatement");
90      public static final Name TYPE_GRANT_ON_PROCEDURE_STATEMENT  = new BasicName(Namespace.URI, "grantOnProcedureStatement");
91      public static final Name TYPE_GRANT_ROLES_STATEMENT         = new BasicName(Namespace.URI, "grantRolesStatement");
92      
93      public static final Name UNIQUE_INDEX                       = new BasicName(Namespace.URI, "unique");
94      public static final Name ORDER                              = new BasicName(Namespace.URI, "order");
95      public static final Name TABLE_NAME                         = new BasicName(Namespace.URI, "tableName");
96      public static final Name ROLE_NAME                          = new BasicName(Namespace.URI, "roleName");
97      public static final Name GENERATED_COLUMN_SPEC_CLAUSE       = new BasicName(Namespace.URI, "generatedColumnSpecClause");
98      public static final Name IS_TABLE_TYPE                      = new BasicName(Namespace.URI, "isTableType");
99  }