public boolean hasPrimaryKey(){
  for (Iterator<Column> it=columns.iterator(); it.hasNext(); ) {
    Column column=(Column)it.next();
    if (column.isPrimaryKey()) {
      return true;
    }
  }
  return false;
}

public boolean hasPrimaryKey ( ) { for ( Iterator < Column > it = columns . iterator ( ) ; it . hasNext ( ) ; ) { Column column = ( Column ) it . next ( ) ; if ( column . isPrimaryKey ( ) ) { return true ; } } return false ; }
determines whether there is at least one primary key column on this table .
