Skip to content

Package: Type$PersistenceType

Type$PersistenceType

nameinstructionbranchcomplexitylinemethod
static {...}
M: 0 C: 44
100%
M: 0 C: 0
100%
M: 0 C: 1
100%
M: 0 C: 5
100%
M: 0 C: 1
100%

Coverage

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.model.metamodel;
16:
17: import cz.cvut.kbss.jopa.UnusedJPA;
18:
19: /**
20: * Instances of the type Type represent persistent object or attribute types.
21: *
22: * @param <X> The type of the represented object or attribute
23: */
24: public interface Type<X> {
25: enum PersistenceType {
26: ENTITY,
27:
28: /**
29: * Embeddable classes are logical groupings of state in Java that is "flattened" in RDB. Such mapping seems
30: * useless, or at least of low priority, in ontologies.
31: */
32: @Deprecated
33: @UnusedJPA
34: EMBEDDABLE,
35:
36: /**
37: * Mapped superclasses help building entities with common state definition. They are not entities.
38: */
39: @UnusedJPA
40: MAPPED_SUPERCLASS,
41:
42: BASIC,
43: }
44:
45: /**
46: * Return the persistence type.
47: *
48: * @return persistence type
49: */
50: PersistenceType getPersistenceType();
51:
52: /**
53: * Return the represented Java type.
54: *
55: * @return Java type
56: */
57: Class<X> getJavaType();
58: }