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