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.Customer;
9   
10  /**
11   * CustomerDaoBaseData Access Object (DAO). Responsible for accessing database.
12   * 
13   * @author Mod4j generated
14   * 
15   */
16  public interface CustomerDaoBase {
17  
18      /**
19       * Retrieves a Customer by its ID from the database.
20       * 
21       * @param id
22       *            id of the Customer to retrieve.
23       * @return Customer retrieved or null when no Customer was found.
24       */
25      Customer retrieve(long id);
26  
27      /**
28       * Adds a new Customer to the database
29       * 
30       * @param object
31       *            the Customer to add to the database.
32       * @return the stored Customer.
33       */
34      Customer add(Customer object);
35  
36      /**
37       * Stores/Updates the Customer in the database. Inclusive all its posts.
38       * 
39       * @param object
40       *            the Customer to store/update
41       * @return
42       */
43      Customer update(Customer object);
44  
45      /**
46       * Deletes a Customer from the database.
47       * 
48       * @param object
49       *            the Customer to delete
50       */
51      void delete(Customer object);
52  
53      /**
54       * Selects all Customers from the database.
55       * 
56       * @return a List of all Customer objects.
57       */
58      List<Customer> listAllCustomers();
59  }