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