summaryrefslogtreecommitdiff
path: root/src/main/java/design/persistence/PersonalDatabase.java
blob: 70dd37df25d0fc1c8918ffe2455194a52f755c3e (plain) (blame)
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
package design.persistence;

import design.model.Golfer;
import design.persistence.importexport.DataSource;

import java.io.IOException;

public interface PersonalDatabase extends DataSource {

    static PersonalDatabase instance() {
        return JSONPersonalDatabase.instance();
    }

    Golfer[] getGolfers();

    Golfer getGolfer(String name);

    void addGolfer(Golfer golfer) throws IOException;

    void removeGolfer(Golfer golfer) throws IOException;

    void updateGolfer(Golfer golfer) throws IOException;

    @Override
    void importData(Object data) throws IOException;

    @Override
    Object exportData() throws IOException;
}