1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.seasar.tuigwaa.model;
17
18 import org.seasar.tuigwaa.database.DataTable;
19 import org.seasar.tuigwaa.database.function.criteria.CriteriaFunction;
20 import org.seasar.tuigwaa.model.core.TgwEntity;
21
22 public interface DataService {
23
24 public static final String DAOTYPE_FILTER = "filter";
25
26 public static final String DAOTYPE_AGGREGATION = "aggregation";
27
28 public static final String DAOTYPE_VALUE = "value";
29
30 public Object load(TgwEntity entity, Long id);
31
32 public Object loadByValue(TgwEntity entity, String attrName, Object value);
33
34 public Long saveOrUpdate(TgwEntity entity, Object dto);
35
36 public Long saveOrUpdate(TgwEntity entity, Object dto, String methodName);
37
38 public void delete(TgwEntity entity, Long id);
39
40 public void deleteByFilter(TgwEntity entity, String methodName);
41
42 public void deleteAll(TgwEntity entity);
43
44 public DataTable list(TgwEntity entity);
45
46 public DataTable search(TgwEntity entity, String methodName, Object dto);
47
48 public DataTable search(TgwEntity entity, String methodName, Object dto,
49 CriteriaFunction extraCriteria);
50
51 public DataTable find(TgwEntity entity, String methodName);
52
53 public DataTable find(TgwEntity entity, String methodName,
54 CriteriaFunction extraCriteria);
55
56 public DataTable searchByFilter(TgwEntity entity, String searchMethodName,
57 Object dto, String filterMethodName);
58
59 public DataTable searchByFilter(TgwEntity entity, String searchMethodName,
60 Object dto, String filterMethodName, CriteriaFunction extraCriteria);
61
62 public int rowCount(TgwEntity entity);
63
64 public int rowCountBySearch(TgwEntity entity, String searchMethodName, Object dto);
65
66 public int rowCountByFilter(TgwEntity entity, String filterName,
67 CriteriaFunction extraCriteria);
68
69 public int rowCountByFilter(TgwEntity entity, String filterName,
70 String searchName, Object dto);
71
72 public Object getValue(TgwEntity entity, String methodName);
73
74 public Object getValue(TgwEntity entity, String methodName,
75 CriteriaFunction extraCriteria);
76 }