class CollectionDao extends HibernateDao<Collection, String> {

   public List<Long> getProductIds (final String collection_uuid, User user)
   {
      if (collection_uuid == null)
      {
         return Collections.emptyList ();
      }

      List<Long> result = new ArrayList<> ();
      Iterator<Product> it = read (collection_uuid).getProducts ().iterator ();
      while (it.hasNext ())
      {
         Product product = it.next ();
         if (product != null)
         {
            result.add (product.getId ());
         }
      }
      return result;
   }

}