public static void removeColumnFromRefConstraints(BaseTable table, Column column) {
   Iterator iter = table.getConstraints().iterator();
   while (iter.hasNext()) {
     Constraint constraint = (Constraint) iter.next();
     if (constraint instanceof ReferenceConstraint) {
       ReferenceConstraint refConstraint = (ReferenceConstraint) constraint;
       if (refConstraint.getMembers().contains(column)) {
         refConstraint.getMembers().remove(column);
       }
     }
   }
 }
 public Index findIndexByConstraint(ReferenceConstraint constraint) {
   Iterator it = this.elements.iterator();
   while (it.hasNext()) {
     Object elem = it.next();
     if (elem instanceof Index && ((Index) elem).getName().equals(constraint.getName())) {
       return (Index) elem;
     }
   }
   return null;
 }
 /**
  * Checks if the given column is referenced in one of the reference constraints of the given table
  *
  * @param table
  * @param column
  * @return
  */
 public static boolean isReferencedColumn(BaseTable table, Column column) {
   Iterator iter = table.getConstraints().iterator();
   while (iter.hasNext()) {
     Constraint constraint = (Constraint) iter.next();
     if (constraint instanceof ReferenceConstraint) {
       ReferenceConstraint refConstraint = (ReferenceConstraint) constraint;
       if (refConstraint.getMembers().contains(column)) {
         return true;
       }
     }
     if (constraint instanceof SybaseASABaseColumnCheckConstraint) {
       SybaseASABaseColumnCheckConstraint columnCk =
           (SybaseASABaseColumnCheckConstraint) constraint;
       if (columnCk.getColumn() == column) {
         return true;
       }
     }
   }
   return false;
 }