1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| public static List getNewWebProducts(int productCategory) throws WebException{
List webProductsList = null;
List newWebProductsList = null;
try{
webProductsList = CacheServices.getAllProducts(productCategory);
WebLog.print(" Taille de la liste webProductsList : " + webProductsList.size());
for(int i = 0; i< webProductsList.size();i++){
WebLog.print(" Produit : " + webProductsList.get(i));
if( ((WebProductIntf) webProductsList.get(i)).isNewProduct())
newWebProductsList.add(webProductsList.get(i));
}
}
catch(WebException e){
}
return newWebProductsList;
} |