View Javadoc

1   /*
2    * joey-gen and its relative products are published under the terms
3    * of the Apache Software License.
4    * 
5    * Created on 2004/08/15 18:32:08
6    */
7   package org.asyrinx.joey.gen.command.rdb;
8   
9   import org.asyrinx.joey.gen.model.Element;
10  import org.asyrinx.joey.gen.model.EnumerationEntry;
11  import org.asyrinx.joey.gen.model.command.Command;
12  import org.asyrinx.joey.gen.model.rdb.Column;
13  import org.asyrinx.joey.gen.model.rdb.Database;
14  import org.asyrinx.joey.gen.model.rdb.Databases;
15  import org.asyrinx.joey.gen.model.rdb.ForeignKey;
16  import org.asyrinx.joey.gen.model.rdb.ForeignKeyEntry;
17  import org.asyrinx.joey.gen.model.rdb.Index;
18  import org.asyrinx.joey.gen.model.rdb.IndexEntry;
19  import org.asyrinx.joey.gen.model.rdb.PrimaryKey;
20  import org.asyrinx.joey.gen.model.rdb.RdbEnumeration;
21  import org.asyrinx.joey.gen.model.rdb.RdbVisitor;
22  import org.asyrinx.joey.gen.model.rdb.Table;
23  import org.asyrinx.joey.gen.model.rdb.Unique;
24  import org.asyrinx.joey.gen.model.rdb.visitor.RdbTopDownVisitor;
25  import org.asyrinx.joey.gen.model.rdb.visitor.RdbVisitorAdapter;
26  
27  /***
28   * @author akima
29   */
30  public class RdbCommand extends Command implements RdbVisitor {
31  
32      /***
33       *  
34       */
35      public RdbCommand() {
36          super();
37      }
38  
39      public void execute(Element element) {
40          new RdbVisitorAdapter(new RdbTopDownVisitor(this)).visit(element);
41      }
42  
43      /*
44       * (non-Javadoc)
45       * 
46       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Column)
47       */
48      public void visit(Column column) {
49          //may be overriden by subclass
50      }
51  
52      /*
53       * (non-Javadoc)
54       * 
55       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Database)
56       */
57      public void visit(Database database) {
58          //may be overriden by subclass
59      }
60  
61      /*
62       * (non-Javadoc)
63       * 
64       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Databases)
65       */
66      public void visit(Databases databases) {
67          //may be overriden by subclass
68      }
69  
70      /*
71       * (non-Javadoc)
72       * 
73       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.EnumerationEntry)
74       */
75      public void visit(EnumerationEntry enumerationEntry) {
76          //may be overriden by subclass
77      }
78  
79      /*
80       * (non-Javadoc)
81       * 
82       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.ForeignKey)
83       */
84      public void visit(ForeignKey foreignKey) {
85          //may be overriden by subclass
86      }
87  
88      /*
89       * (non-Javadoc)
90       * 
91       * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.ForeignKeyEntry)
92       */
93      public void visit(ForeignKeyEntry foreignKeyEntry) {
94          //may be overriden by subclass
95      }
96  
97      /*
98       * (non-Javadoc)
99       * 
100      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Index)
101      */
102     public void visit(Index index) {
103         //may be overriden by subclass
104     }
105 
106     /*
107      * (non-Javadoc)
108      * 
109      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.IndexEntry)
110      */
111     public void visit(IndexEntry indexEntry) {
112         //may be overriden by subclass
113     }
114 
115     /*
116      * (non-Javadoc)
117      * 
118      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.PrimaryKey)
119      */
120     public void visit(PrimaryKey primaryKey) {
121         //may be overriden by subclass
122     }
123 
124     /*
125      * (non-Javadoc)
126      * 
127      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.RdbEnumeration)
128      */
129     public void visit(RdbEnumeration enumeration) {
130         //may be overriden by subclass
131     }
132 
133     /*
134      * (non-Javadoc)
135      * 
136      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Table)
137      */
138     public void visit(Table table) {
139         //may be overriden by subclass
140     }
141 
142     /*
143      * (non-Javadoc)
144      * 
145      * @see org.asyrinx.joey.gen.model.rdb.RdbVisitor#visit(org.asyrinx.joey.gen.model.rdb.Unique)
146      */
147     public void visit(Unique unique) {
148         //may be overriden by subclass
149     }
150 }