View Javadoc

1   /*
2    * Copyright 2004-2006 the Seasar Foundation and the Others.
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
13   * either express or implied. See the License for the specific language
14   * governing permissions and limitations under the License.
15   */
16  package org.seasar.tuigwaa.model;
17  
18  import org.seasar.tuigwaa.database.DataTable;
19  import org.seasar.tuigwaa.database.function.DaoMethod;
20  import org.seasar.tuigwaa.database.function.criteria.CriteriaFunction;
21  import org.seasar.tuigwaa.model.common.EntityUtils;
22  import org.seasar.tuigwaa.model.core.TgwEntity;
23  import org.seasar.tuigwaa.plugin.TgwPluginUtils;
24  
25  public abstract class AbstractDataService implements DataService {
26  
27  	protected DAOService daoService;
28  
29  	public void setDaoService(DAOService daoService) {
30  		this.daoService = daoService;
31  	}
32  
33  	protected DaoMethod getMethod(TgwEntity entity, String methodName) {
34  		return daoService.getDAO(entity).getMethod(methodName);
35  	}
36  
37  	protected Long bindEntityId(TgwEntity entity, Object bean) {
38  		Long id = EntityUtils.getId(bean);
39  		TgwPluginUtils.bindEntityId(entity, id);
40  		return id;
41  	}
42  
43  	public Object load(TgwEntity entity, Long id) {
44  		return null;
45  	}
46  
47  	public Long saveOrUpdate(TgwEntity entity, Object dto) {
48  		return null;
49  	}
50  
51  	public Long saveOrUpdate(TgwEntity entity, Object dto, String methodName) {
52  		return null;
53  	}
54  
55  	public void update(TgwEntity entity, Long id, String methodName) {
56  	}
57  
58  	public void delete(TgwEntity entity, Long id) {
59  	}
60  
61  	public void deleteAll(TgwEntity entity) {
62  	}
63  
64  	public DataTable list(TgwEntity entity) {
65  		return null;
66  	}
67  
68  	public DataTable search(TgwEntity entity, String methodName, Object dto) {
69  		return null;
70  	}
71  
72  	public DataTable find(TgwEntity entity, String methodName) {
73  		return null;
74  	}
75  
76  	public DataTable find(TgwEntity entity, String methodName,
77  			CriteriaFunction extraCriteria) {
78  		return null;
79  	}
80  
81  	public Object getValue(TgwEntity entity, String methodName) {
82  		return null;
83  	}
84  
85  	public Object getValue(TgwEntity entity, String methodName,
86  			CriteriaFunction extraCriteria) {
87  		return null;
88  	}
89  
90  	public void deleteByFilter(TgwEntity entity, String methodName) {
91  	}
92  
93  	public int rowCount(TgwEntity entity) {
94  		return 0;
95  	}
96  
97  	public int rowCountByFilter(TgwEntity entity, String filterName,
98  			String searchName, Object dto) {
99  		return 0;
100 	}
101 
102 	public int rowCountBySearch(TgwEntity entity, String searchMethodName,
103 			Object dto) {
104 		return 0;
105 	}
106 
107 	public DataTable search(TgwEntity entity, String methodName, Object dto,
108 			CriteriaFunction extraCriteria) {
109 		return null;
110 	}
111 
112 	public DataTable searchByFilter(TgwEntity entity, String searchMethodName,
113 			Object dto, String filterMethodName, CriteriaFunction extraCriteria) {
114 		return null;
115 	}
116 
117 	public DataTable searchByFilter(TgwEntity entity, String searchMethodName,
118 			Object dto, String filterMethodName) {
119 		return null;
120 	}
121 
122 }