1
2
3
4
5
6 package com.hack23.cia.service.dao;
7
8 import java.io.Serializable;
9 import java.util.List;
10
11 import com.hack23.cia.model.core.impl.BaseEntity;
12
13 /***
14 * The Interface GenericDAO.
15 *
16 * @param <T> the generic type
17 * @param <ID> the generic type
18 */
19 public abstract interface GenericDAO<T extends BaseEntity, ID extends Serializable> {
20
21 /***
22 * Delete.
23 *
24 * @param entity the entity
25 */
26 void delete(T entity);
27
28 /***
29 * Gets the all.
30 *
31 * @return the all
32 */
33 List<T> getAll();
34
35 /***
36 * Load.
37 *
38 * @param id the id
39 * @return the t
40 */
41 T load(ID id);
42
43 /***
44 * Save.
45 *
46 * @param entity the entity
47 * @return the t
48 */
49 T save(T entity);
50 }