1 package com.daffodilwoods.daffodildb.server.sql99.ddl.schemadefinition; 2 3 import com.daffodilwoods.daffodildb.server.serversystem.*; 4 import com.daffodilwoods.daffodildb.server.sql99.ddl.descriptors.*; 5 import com.daffodilwoods.database.resource.*; 6 7 public class tableconstraintdefinition implements tableelement { 8 public constraintcharacteristics _Optconstraintcharacteristics0; 9 public tableconstraint _tableconstraint1; 10 public constraintnamedefinition _Optconstraintnamedefinition2; 11 12 private TableConstraintDescriptor tableConsDes; 13 private TableDescriptor tableDescriptor; 14 15 22 public Object run(Object object) throws DException { 23 tableConsDes = new TableConstraintDescriptor(); 24 setTable(); 25 if (_Optconstraintnamedefinition2 != null) { 26 _Optconstraintnamedefinition2.setTableConstraintName(tableConsDes); 27 } 28 if (_Optconstraintcharacteristics0 != null) { 29 _Optconstraintcharacteristics0.setConstraintCharacterstics(tableConsDes); 30 } 31 _tableconstraint1.setTableConstraintDescriptor(tableConsDes); 32 _tableconstraint1.run(object); 33 tableConsDes.save( (_ServerSession) object); 34 return null; 35 } 36 37 private void setTable() { 38 tableConsDes.tableDescriptor = tableDescriptor; 39 tableConsDes.table_catalog = tableDescriptor.table_catalog; 40 tableConsDes.table_schema = tableDescriptor.table_schema; 41 tableConsDes.table_name = tableDescriptor.table_name; 42 } 43 44 public void setTableDescriptor(_Descriptor tableDes) throws DException { 45 tableDescriptor = (TableDescriptor) tableDes; 46 } 47 48 public TableConstraintDescriptor getTableConstraintDescriptor() throws DException { 49 return tableConsDes; 50 } 51 52 public Object clone() throws CloneNotSupportedException { 53 return this; 54 } 55 56 public String toString() { 57 StringBuffer sb = new StringBuffer (); 58 sb.append(" "); 59 if (_Optconstraintnamedefinition2 != null) { 60 sb.append(_Optconstraintnamedefinition2); 61 } 62 sb.append(" "); 63 sb.append(_tableconstraint1); 64 sb.append(" "); 65 if (_Optconstraintcharacteristics0 != null) { 66 sb.append(_Optconstraintcharacteristics0); 67 } 68 return sb.toString(); 69 } 70 } 71 | Popular Tags |