-
Notifications
You must be signed in to change notification settings - Fork 14
/
DataAccessor.java
60 lines (54 loc) · 2.23 KB
/
DataAccessor.java
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* JOPA
* Copyright (C) 2024 Czech Technical University in Prague
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package cz.cvut.kbss.jopa.test.environment;
import cz.cvut.kbss.jopa.model.EntityManager;
import java.util.Collection;
public interface DataAccessor {
/**
* Persists the specified test data directly into the storage.
* <p>
* Data are persisted using a vendor-specific storage access object unwrapped from the specified entity manager.
*
* @param data Data to persist
* @param em Means of getting vendor-specific storage access
* @throws Exception If storage access error occurs
*/
void persistTestData(Collection<Quad> data, EntityManager em) throws Exception;
/**
* Verifies that the specified data are present in the storage.
* <p>
* Data presence is verified using a vendor-specific storage access object unwrapped from the specified entity
* manager.
*
* @param data Data to verify
* @param em Means of getting vendor-specific storage access
* @throws Exception If storage access error occurs
*/
void verifyDataPresent(Collection<Quad> data, EntityManager em) throws Exception;
/**
* Verifies that the specified data are not present in the storage.
* <p>
* Data presence is verified using a vendor-specific storage access object unwrapped from the specified entity
* manager.
*
* @param data Data to verify
* @param em Means of getting vendor-specific storage access
* @throws Exception If storage access error occurs
*/
void verifyDataNotPresent(Collection<Quad> data, EntityManager em) throws Exception;
}