Collections.sort(infoQualifications, new BeanComparator("date"));
Collections.sort(infoQualifications, new Comparator() {  public int compare(Object o1, Object o2) { InfoQualification infoQualification1 = (InfoQualification) o1; InfoQualification infoQualification2 = (InfoQualification) o2; if (infoQualification1.getDate() == null && infoQualification2.getDate() == null) { return 0; } else if (infoQualification1.getDate() == null) { return -1; } else if (infoQualification2.getDate() == null) { return 1; } else { if (infoQualification1.getDate().before(infoQualification2.getDate())) { return -1; } else if (infoQualification1.getDate().after(infoQualification2.getDate())) { return 1; } else if (infoQualification1.getDate().equals(infoQualification2.getDate())) { return 0; } } return 0; } });
    public InfoSiteQualifications run(String user) throws ExcepcaoPersistencia {        final ISuportePersistente sp = PersistenceSupportFactory.getDefaultPersistenceSupport();        final IPessoaPersistente persistentPerson = sp.getIPessoaPersistente();        final IPerson person = persistentPerson.lerPessoaPorUsername(user);        List<IQualification> qualifications = person.getAssociatedQualifications();        List infoQualifications = (List) CollectionUtils.collect(qualifications, new Transformer() {            public Object transform(Object o) {                IQualification qualification = (IQualification) o;                return InfoQualificationWithPersonAndCountry.newInfoFromDomain(qualification);            }        });        Collections.sort(infoQualifications, new BeanComparator("date"));        InfoSiteQualifications infoSiteQualifications = new InfoSiteQualifications();        infoSiteQualifications.setInfoQualifications(infoQualifications);        final InfoPerson infoPerson = InfoPersonWithInfoCountry.newInfoFromDomain(person);        infoSiteQualifications.setInfoPerson(infoPerson);        return infoSiteQualifications;    }