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/10/26 15:58:51
6    */
7   package org.asyrinx.joey.gen.command.rdb;
8   
9   import org.asyrinx.joey.gen.model.rdb.Column;
10  import org.asyrinx.joey.gen.model.rdb.Index;
11  import org.asyrinx.joey.gen.model.rdb.IndexEntry;
12  import org.asyrinx.joey.gen.model.rdb.Table;
13  
14  /***
15   * @author takeshi
16   */
17  public class PrepareColumnIndex extends RdbCommand {
18  
19      public void visit(Column column) {
20          if (!column.isIndexed())
21              return;
22          final Table table = column.getParent();
23          final Index index = new Index(table);
24          new IndexEntry(index, column.getName());
25          this.log(index, "create INDEX from " + column.getFullName());
26      }
27  
28  }