1 19 20 package org.netbeans.lib.ddl.impl; 21 22 import java.util.*; 23 import org.netbeans.lib.ddl.*; 24 import org.netbeans.lib.ddl.impl.*; 25 26 31 32 public class CreateIndex extends ColumnListCommand { 33 34 private String tablename; 35 36 37 private String unique; 38 39 static final long serialVersionUID =1899024699690380782L; 40 public String getIndexName() 41 { 42 return tablename; 43 } 44 45 public void setIndexName(String tname) 46 { 47 tablename = tname; 48 } 49 50 public String getIndexType() 51 { 52 return unique; 53 } 54 55 public void setIndexType(String idx_type) 56 { 57 unique = idx_type; 58 } 59 60 public TableColumn specifyColumn(String name) 61 throws ClassNotFoundException , IllegalAccessException , InstantiationException 62 { 63 return specifyColumn(TableColumn.COLUMN, name, Specification.CREATE_INDEX); 64 } 65 66 public Map getCommandProperties() throws DDLException { 67 Map args = super.getCommandProperties(); 68 args.put("index.name", quote(tablename)); args.put("index.unique", unique); 71 return args; 72 } 73 } 74 | Popular Tags |