Skip to contentPackage: FieldSpecification
FieldSpecification
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.NonJPA;
18: import cz.cvut.kbss.jopa.model.annotations.FetchType;
19:
20: public interface FieldSpecification<X, E> {
21:
22:         /**
23:          * Return the managed type representing the type in which the attribute was
24:          * declared.
25:          *
26:          * @return declaring type
27:          */
28:         public ManagedType<X> getDeclaringType();
29:
30:         /**
31:          * Return the Java type of the represented attribute.
32:          *
33:          * @return Java type
34:          */
35:         public Class<E> getJavaType();
36:
37:         /**
38:          * Return the java.lang.reflect.Member for the represented attribute.
39:          *
40:          * @return corresponding java.lang.reflect.Member
41:          */
42:         @NonJPA
43:         public java.lang.reflect.Field getJavaField();
44:
45:         /**
46:          * Return the fetch type for this attribute
47:          */
48:         @NonJPA
49:         public FetchType getFetchType();
50:
51:         public boolean isInferred();
52:
53:         public boolean includeExplicit();
54:
55:         public boolean isReadOnly();
56:
57:         /**
58:          * Return the name of the attribute.
59:          *
60:          * @return name
61:          */
62:         String getName();
63: }