1 19 20 package org.netbeans.lib.ddl.impl; 21 22 import java.util.*; 23 import java.sql.*; 24 import org.netbeans.lib.ddl.*; 25 26 29 public class ForeignKeyConstraint extends AbstractTableColumn implements ForeignKeyConstraintDescriptor { 30 31 String tname; 32 33 34 String cname; 35 36 static final long serialVersionUID =9183651896170854492L; 37 38 public String getReferencedTableName() 39 { 40 return tname; 41 } 42 43 44 public void setReferencedTableName(String name) 45 { 46 tname = name; 47 } 48 49 50 public String getReferencedColumnName() 51 { 52 return cname; 53 } 54 55 56 public void setReferencedColumnName(String name) 57 { 58 cname = name; 59 } 60 61 68 public Map getColumnProperties(AbstractCommand cmd) throws DDLException { 69 Map args = super.getColumnProperties(cmd); 70 args.put("fkobject.name", cmd.quote(tname)); args.put("fkcolumn.name", cmd.quote(cname)); 73 return args; 74 } 75 } 76 | Popular Tags |