Skip to contentMethod: evict(Class)
1: /**
2: * Copyright (C) 2016 Czech Technical University in Prague
3: *
4: * This program is free software: you can redistribute it and/or modify it under
5: * the terms of the GNU General Public License as published by the Free Software
6: * Foundation, either version 3 of the License, or (at your option) any
7: * later version.
8: *
9: * This program is distributed in the hope that it will be useful, but WITHOUT
10: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11: * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12: * details. You should have received a copy of the GNU General Public License
13: * along with this program. If not, see <http://www.gnu.org/licenses/>.
14: */
15: package cz.cvut.kbss.jopa.sessions.cache;
16:
17: import cz.cvut.kbss.jopa.sessions.CacheManager;
18:
19: import java.net.URI;
20: import java.util.Set;
21:
22: public class DisabledCacheManager implements CacheManager {
23:
24:         @Override
25:         public boolean contains(Class<?> cls, Object primaryKey) {
26:                 return false;
27:         }
28:
29:         @Override
30:         public void clearInferredObjects() {
31:                 // Do nothing
32:         }
33:
34:         @Override
35:         public void setInferredClasses(Set<Class<?>> inferredClasses) {
36:                 // Do nothing
37:         }
38:
39:         @Override
40:         public void close() {
41:                 // Do nothing
42:         }
43:
44:         @Override
45:         public boolean contains(Class<?> cls, Object primaryKey, URI context) {
46:                 return false;
47:         }
48:
49:         @Override
50:         public void evict(Class<?> cls, Object primaryKey, URI context) {
51:                 // Do nothing
52:         }
53:
54:         @Override
55:         public void evict(Class<?> cls) {
56:                 // Do nothing
57:         }
58:
59:         @Override
60:         public void evict(URI contextUri) {
61:                 // Do nothing
62:         }
63:
64:         @Override
65:         public void evictAll() {
66:                 // Do nothing
67:         }
68:
69:         @Override
70:         public void add(Object primaryKey, Object entity, URI context) {
71:                 // Do nothing
72:         }
73:
74:         @Override
75:         public <T> T get(Class<T> cls, Object primaryKey, URI context) {
76:                 return null;
77:         }
78: }