public List<String> populateConstraints(Table tb) {
    List<String> constraints = new ArrayList<>();
    getAlterTableStmtForeignKeyConstraint(tb.getForeignKeyInfo(), constraints);
    getAlterTableStmtUniqueConstraint(tb.getUniqueKeyInfo(), constraints);
    getAlterTableStmtDefaultConstraint(tb.getDefaultConstraint(), tb, constraints);
    getAlterTableStmtCheckConstraint(tb.getCheckConstraint(), constraints);
    getAlterTableStmtNotNullConstraint(tb.getNotNullConstraint(), tb, constraints);
    return constraints;
  }
Add all the constraints for the given table. Will populate the constraints list.

@param tb
ql/src/java/org/apache/hadoop/hive/ql/exec/DDLPlanUtils.java