bonjour, voila ce que j'ai fait pour la methode find de la classe CategoryDAO
public Category find(String id)throws CheckException,FinderException,ObjectNotFoundException{
if(id==null){
throw new CheckException("exception ");
}
if (!_hashmap.containsKey(id)) {
throw new ObjectNotFoundException();}
return (Category) _hashmap.get(id);
}
mais il me lance toujours une exception au moment du test:
no exception message
.....................................ObjectNotFoundException
at ................................(categoryDAO.java:33)
at...................................(categoryDAOtest.java:42)
est ce quelqu'un pourrait me dire d'ou peut venir l'erreur.
merci
TP2
Modérateurs : graffion, jmdouin, agoncal, mlebihan
Pour CategoryDAO, ProductDAO et ItemDAO, utilise les méthodes de la super classe DataAccessObject en castant les types retournés...
Ma méthode find :
Ma méthode find :
Code : Tout sélectionner
public Category find(final String id) throws ObjectNotFoundException, CheckException {
checkId(id);
return (Category) super.select(id);
}