code: private List<String> getConstraints(CmsSetupDb dbCon, String tablename) throws SQLException {
  
          List<String> constraints = new ArrayList<String>();
          String tableConstraints = readQuery(QUERY_SHOW_CONSTRAINTS);
          Map<String, String> replacer = new HashMap<String, String>();
          replacer.put(REPLACEMENT_TABLENAME, tablename);
          CmsSetupDBWrapper db = null;
          try {
              db = dbCon.executeSqlStatement(tableConstraints, replacer);
              while (db.getResultSet().next()) {
                  String constraint = db.getResultSet().getString(FIELD_CONSTRAINT_ORACLE);
                  if (!constraints.contains(constraint)) {
                      constraints.add(constraint);
                  }
  
              }
          } finally {
              if (db != null) {
                  db.close();
              }
          }
  
          return constraints;
      }
docs: Gets the constraints for a table.<p>
  
  @param dbCon the db connection interface
  @param tablename the table to get the indexes from
  
  @return a list of constraints
  
  @throws SQLException if something goes wrong