blob: 5307641947743c92634da5c3a5c7c03f595e4f0e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package ch.asynk;
import java.util.List;
public abstract class AbstractDAOOperations<TObject, TIdentity, TMapper extends AbstractMapper<TObject, TIdentity>> extends AbstractDAO<TObject, TMapper>
{
public int insert(final TObject obj)
{
return execInt(m -> m.insert(obj), true);
}
public int update(final TObject obj)
{
return execInt(m -> m.update(obj), true);
}
public int delete(final TObject obj)
{
return execInt(m -> m.delete(obj), true);
}
public int count()
{
return execInt(m -> m.count());
}
public List<TObject> select()
{
return execObjects(m -> m.select());
}
public TObject selectOne(final TIdentity id)
{
return execObject(m -> m.selectOne(id));
}
}
|