View Javadoc

1   /**
2    * Generated by Mod4j at Mon Oct 20 22:16:44 CEST 2008
3    */
4   package org.company.thesandbox.data.spring.dao;
5   
6   import java.util.List;
7   
8   import org.company.thesandbox.domain.Product;
9   
10  /**
11   * ProductDaoBaseData Access Object (DAO). Responsible for accessing database.
12   * 
13   * @author Mod4j generated
14   * 
15   */
16  public interface ProductDaoBase {
17  
18      /**
19       * Retrieves a Product by its ID from the database.
20       * 
21       * @param id
22       *            id of the Product to retrieve.
23       * @return Product retrieved or null when no Product was found.
24       */
25      Product retrieve(long id);
26  
27      /**
28       * Adds a new Product to the database
29       * 
30       * @param object
31       *            the Product to add to the database.
32       * @return the stored Product.
33       */
34      Product add(Product object);
35  
36      /**
37       * Stores/Updates the Product in the database. Inclusive all its posts.
38       * 
39       * @param object
40       *            the Product to store/update
41       * @return
42       */
43      Product update(Product object);
44  
45      /**
46       * Deletes a Product from the database.
47       * 
48       * @param object
49       *            the Product to delete
50       */
51      void delete(Product object);
52  
53      /**
54       * Selects all Products from the database.
55       * 
56       * @return a List of all Product objects.
57       */
58      List<Product> listAllProducts();
59  }