Package: IRIIdentifierImpl
IRIIdentifierImpl
name | instruction | branch | complexity | line | method | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IRIIdentifierImpl(ManagedType, Field, boolean) |
|
|
|
|
|
||||||||||||||||||||
accept(IdentifierVisitor) |
|
|
|
|
|
||||||||||||||||||||
getBindableJavaType() |
|
|
|
|
|
||||||||||||||||||||
getBindableType() |
|
|
|
|
|
||||||||||||||||||||
getDeclaringType() |
|
|
|
|
|
||||||||||||||||||||
getFetchType() |
|
|
|
|
|
||||||||||||||||||||
getJavaField() |
|
|
|
|
|
||||||||||||||||||||
getJavaType() |
|
|
|
|
|
||||||||||||||||||||
getName() |
|
|
|
|
|
||||||||||||||||||||
includeExplicit() |
|
|
|
|
|
||||||||||||||||||||
isCollection() |
|
|
|
|
|
||||||||||||||||||||
isGenerated() |
|
|
|
|
|
||||||||||||||||||||
isInferred() |
|
|
|
|
|
Coverage
1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.jopa.model.metamodel;
19:
20: import cz.cvut.kbss.jopa.model.annotations.FetchType;
21:
22: import java.lang.reflect.Field;
23:
24: public class IRIIdentifierImpl<T> implements IRIIdentifier {
25:
26: private final ManagedType<T> declaringType;
27: private final Field javaField;
28:
29: private final boolean generated;
30:
31: public IRIIdentifierImpl(ManagedType<T> declaringType, final Field javaField, final boolean generated) {
32: this.declaringType = declaringType;
33: this.javaField = javaField;
34: this.generated = generated;
35: }
36:
37: @Override
38: public ManagedType<T> getDeclaringType() {
39: return declaringType;
40: }
41:
42: @Override
43: public Class<?> getJavaType() {
44: return javaField.getType();
45: }
46:
47: @Override
48: public Field getJavaField() {
49: return javaField;
50: }
51:
52: @Override
53: public FetchType getFetchType() {
54: return FetchType.EAGER;
55: }
56:
57: @Override
58: public boolean isInferred() {
59: return false;
60: }
61:
62: @Override
63: public boolean includeExplicit() {
64: return true;
65: }
66:
67: @Override
68: public String getName() {
69: return javaField.getName();
70: }
71:
72: @Override
73: public boolean isCollection() {
74: return false;
75: }
76:
77: @Override
78: public void accept(IdentifierVisitor i) {
79: i.visit(this);
80: }
81:
82: @Override
83: public boolean isGenerated() {
84: return generated;
85: }
86:
87: @Override
88: public BindableType getBindableType() {
89: return BindableType.SINGULAR_ATTRIBUTE;
90: }
91:
92: @Override
93: public Class<?> getBindableJavaType() {
94: return getJavaType();
95: }
96: }