summaryrefslogtreecommitdiffstats
path: root/java/MyMyBatis/src/AbstractModel.java
blob: 365472c5386b6c331fe80b6b8c87e2d9950d3657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package ch.asynk;

public interface AbstractModel<TIdentity, TObject>
{
    boolean isUnsaved();

    TObject self();

    AbstractMapper<TIdentity, TObject> getDAO();

    default void save() { getDAO().save(self()); }

    default int delete() { return getDAO().delete(self()); }
}