Skip to content

Package: Type

Type

Coverage

1: /**
2: * Copyright (C) 2020 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: MAPPED_SUPERCLASS,
40:
41: BASIC,
42: }
43:
44: /**
45: * Return the persistence type.
46: *
47: * @return persistence type
48: */
49: PersistenceType getPersistenceType();
50:
51: /**
52: * Return the represented Java type.
53: *
54: * @return Java type
55: */
56: Class<X> getJavaType();
57: }