1
2
3
4
5
6
7 package org.asyrinx.joey.gen.command.rdb;
8
9 import java.util.Iterator;
10
11 import org.asyrinx.joey.gen.model.rdb.Column;
12 import org.asyrinx.joey.gen.model.rdb.PrimaryKeyEntry;
13 import org.asyrinx.joey.gen.model.rdb.Table;
14
15 /***
16 * @author takeshi
17 */
18 public class PreparePrimaryKey extends RdbCommand {
19
20 public void visit(Table table) {
21 for (Iterator i = table.getColumns().iterator(); i.hasNext();) {
22 final Column column = (Column) i.next();
23 if (column.isPrimaryKey())
24 new PrimaryKeyEntry(table.getPrimaryKey(), column);
25 }
26 }
27 }