17
17
import org .hibernate .graph .spi .AttributeNodeImplementor ;
18
18
import org .hibernate .graph .spi .SubGraphImplementor ;
19
19
import org .hibernate .internal .util .collections .CollectionHelper ;
20
- import org .hibernate .metamodel .model .domain .spi .AttributeImplementor ;
21
- import org .hibernate .metamodel .model .domain .spi .ManagedTypeImplementor ;
22
- import org .hibernate .metamodel .model .domain .spi .SimpleTypeImplementor ;
20
+ import org .hibernate .metamodel .model .domain .spi .PersistentAttributeDescriptor ;
21
+ import org .hibernate .metamodel .model .domain .spi .ManagedTypeDescriptor ;
22
+ import org .hibernate .metamodel .model .domain .spi .SimpleTypeDescriptor ;
23
23
24
24
import org .jboss .logging .Logger ;
25
25
31
31
public class AttributeNodeImpl <J >
32
32
extends AbstractGraphNode <J >
33
33
implements AttributeNodeImplementor <J > {
34
- private final AttributeImplementor <?, J > attribute ;
34
+ private final PersistentAttributeDescriptor <?, J > attribute ;
35
35
36
36
private Map <Class <? extends J >, SubGraphImplementor <? extends J >> subGraphMap ;
37
37
private Map <Class <? extends J >, SubGraphImplementor <? extends J >> keySubGraphMap ;
38
38
39
39
@ SuppressWarnings ("WeakerAccess" )
40
40
public <X > AttributeNodeImpl (
41
41
boolean mutable ,
42
- AttributeImplementor <X , J > attribute ,
42
+ PersistentAttributeDescriptor <X , J > attribute ,
43
43
SessionFactoryImplementor sessionFactory ) {
44
44
this ( mutable , attribute , null , null , sessionFactory );
45
45
}
@@ -49,7 +49,7 @@ public <X> AttributeNodeImpl(
49
49
*/
50
50
private AttributeNodeImpl (
51
51
boolean mutable ,
52
- AttributeImplementor <?, J > attribute ,
52
+ PersistentAttributeDescriptor <?, J > attribute ,
53
53
Map <Class <? extends J >, SubGraphImplementor <? extends J >> subGraphMap ,
54
54
Map <Class <? extends J >, SubGraphImplementor <? extends J >> keySubGraphMap ,
55
55
SessionFactoryImplementor sessionFactory ) {
@@ -65,7 +65,7 @@ public String getAttributeName() {
65
65
}
66
66
67
67
@ Override
68
- public AttributeImplementor <?, J > getAttributeDescriptor () {
68
+ public PersistentAttributeDescriptor <?, J > getAttributeDescriptor () {
69
69
return attribute ;
70
70
}
71
71
@@ -102,11 +102,11 @@ public <S extends J> SubGraphImplementor<S> makeSubGraph(Class<S> subtype) {
102
102
}
103
103
104
104
@ Override
105
- public <S extends J > SubGraphImplementor <S > makeSubGraph (ManagedTypeImplementor <S > subtype ) {
105
+ public <S extends J > SubGraphImplementor <S > makeSubGraph (ManagedTypeDescriptor <S > subtype ) {
106
106
return internalMakeSubgraph ( subtype );
107
107
}
108
108
109
- private <S extends J > SubGraphImplementor <S > internalMakeSubgraph (ManagedTypeImplementor <S > type ) {
109
+ private <S extends J > SubGraphImplementor <S > internalMakeSubgraph (ManagedTypeDescriptor <S > type ) {
110
110
assert type != null ;
111
111
112
112
log .debugf ( "Making sub-graph : ( (%s) %s )" , type .getName (), getAttributeName () );
@@ -118,11 +118,11 @@ private <S extends J> SubGraphImplementor<S> internalMakeSubgraph(ManagedTypeImp
118
118
}
119
119
120
120
@ SuppressWarnings ("unchecked" )
121
- private <T extends J > ManagedTypeImplementor <T > valueGraphTypeAsManaged () {
122
- final SimpleTypeImplementor <J > valueGraphType = (SimpleTypeImplementor ) getAttributeDescriptor ().getValueGraphType ();
121
+ private <T extends J > ManagedTypeDescriptor <T > valueGraphTypeAsManaged () {
122
+ final SimpleTypeDescriptor <J > valueGraphType = (SimpleTypeDescriptor ) getAttributeDescriptor ().getValueGraphType ();
123
123
124
- if ( valueGraphType instanceof ManagedTypeImplementor ) {
125
- return (ManagedTypeImplementor ) valueGraphType ;
124
+ if ( valueGraphType instanceof ManagedTypeDescriptor ) {
125
+ return (ManagedTypeDescriptor ) valueGraphType ;
126
126
}
127
127
128
128
throw new CannotContainSubGraphException (
@@ -141,7 +141,7 @@ private <T extends J> ManagedTypeImplementor<T> valueGraphTypeAsManaged() {
141
141
private <S extends J > SubGraphImplementor <S > internalMakeSubgraph (Class <S > subType ) {
142
142
verifyMutability ();
143
143
144
- final ManagedTypeImplementor <S > managedType = valueGraphTypeAsManaged ();
144
+ final ManagedTypeDescriptor <S > managedType = valueGraphTypeAsManaged ();
145
145
146
146
if ( subType == null ) {
147
147
subType = managedType .getJavaType ();
@@ -183,11 +183,11 @@ public <S extends J> SubGraphImplementor<S> makeKeySubGraph(Class<S> subtype) {
183
183
}
184
184
185
185
@ Override
186
- public <S extends J > SubGraphImplementor <S > makeKeySubGraph (ManagedTypeImplementor <S > subtype ) {
186
+ public <S extends J > SubGraphImplementor <S > makeKeySubGraph (ManagedTypeDescriptor <S > subtype ) {
187
187
return internalMakeKeySubgraph ( subtype );
188
188
}
189
189
190
- private <S extends J > SubGraphImplementor <S > internalMakeKeySubgraph (ManagedTypeImplementor <S > type ) {
190
+ private <S extends J > SubGraphImplementor <S > internalMakeKeySubgraph (ManagedTypeDescriptor <S > type ) {
191
191
192
192
log .debugf ( "Making key sub-graph : ( (%s) %s )" , type .getName (), getAttributeName () );
193
193
@@ -201,9 +201,9 @@ private <S extends J> SubGraphImplementor<S> internalMakeKeySubgraph(ManagedType
201
201
private <S extends J > SubGraphImplementor <S > internalMakeKeySubgraph (Class <S > type ) {
202
202
verifyMutability ();
203
203
204
- final ManagedTypeImplementor <S > managedType = keyGraphTypeAsManaged ();
204
+ final ManagedTypeDescriptor <S > managedType = keyGraphTypeAsManaged ();
205
205
206
- final ManagedTypeImplementor <S > subType ;
206
+ final ManagedTypeDescriptor <S > subType ;
207
207
208
208
if ( type == null ) {
209
209
subType = managedType ;
@@ -232,11 +232,11 @@ protected <S extends J> void internalAddKeySubGraph(Class<S> subType, SubGraph<S
232
232
}
233
233
234
234
@ SuppressWarnings ("unchecked" )
235
- private <T extends J > ManagedTypeImplementor <T > keyGraphTypeAsManaged () {
236
- final SimpleTypeImplementor <J > keyGraphType = (SimpleTypeImplementor ) getAttributeDescriptor ().getKeyGraphType ();
235
+ private <T extends J > ManagedTypeDescriptor <T > keyGraphTypeAsManaged () {
236
+ final SimpleTypeDescriptor <J > keyGraphType = (SimpleTypeDescriptor ) getAttributeDescriptor ().getKeyGraphType ();
237
237
238
- if ( keyGraphType instanceof ManagedTypeImplementor ) {
239
- return (ManagedTypeImplementor ) keyGraphType ;
238
+ if ( keyGraphType instanceof ManagedTypeDescriptor ) {
239
+ return (ManagedTypeDescriptor ) keyGraphType ;
240
240
}
241
241
242
242
throw new CannotContainSubGraphException (
0 commit comments