public int compare ( Object objA , Object objB ) { String idAStr = _table . getColumn ( ( String ) objA ) . getProperty ( "id" ) ; String idBStr = _table . getColumn ( ( String ) objB ) . getProperty ( "id" ) ; int idA ; int idB ; try { idA = Integer . parseInt ( idAStr ) ; } catch ( Exception ex ) { return 1 ; } try { idB = Integer . parseInt ( idBStr ) ; } catch ( Exception ex ) { return - 1 ; } return idA < idB ? - 1 : ( idA > idB ? 1 : 0 ) ; }
Compares two columns given by their names .