private EntityType locateNearestSubclassEntity(MappedSuperclassType mappedSuperclassType, EntityType entityTypeTop) { EntityType entityTypeNearestDeclaringType = entityTypeTop; IdentifiableType superType = entityTypeNearestDeclaringType.getSupertype(); while ( superType != mappedSuperclassType ) { if ( superType == null ) { throw new IllegalStateException( String.format( "Cannot determine nearest EntityType extending mapped superclass [%s] starting from [%s]; a supertype of [%s] is null", mappedSuperclassType.getJavaType().getName(), entityTypeTop.getJavaType().getName(), entityTypeTop.getJavaType().getName() ) ); } if ( superType.getPersistenceType() == Type.PersistenceType.ENTITY ) { entityTypeNearestDeclaringType = (EntityType) superType; } superType = superType.getSupertype(); } return entityTypeNearestDeclaringType; } }
if (idEntity.getSupertype() != null) IdentifiableType<?> jpaObject = idEntity.getSupertype(); String className = Type.getInternalName(entity.getJavaType()); List<String> newSubclasses = new ArrayList<>(subclassNames);
@Override public boolean isBag(EntityType<?> ownerType, String attributeName) { CollectionPersister persister = null; IdentifiableType<?> type = ownerType; String typeName = getTypeName(ownerType); StringBuilder sb = new StringBuilder(typeName.length() + attributeName.length() + 1); while (persister == null && type != null) { sb.setLength(0); sb.append(getTypeName(type)); sb.append('.'); sb.append(attributeName); persister = collectionPersisters.get(sb.toString()); type = type.getSupertype(); } return persister != null && !persister.hasIndex() && !persister.isInverse() && !(getAttribute(ownerType, attributeName) instanceof SetAttribute<?, ?>); }
while (identifiableType.getSupertype() instanceof IdentifiableType<?>) { try { identifiableType = identifiableType.getSupertype(); return Collections.<SingularAttribute<?, ?>>singleton(identifiableType.getId(identifiableType.getIdType().getJavaType())); } catch (NullPointerException e2) {
while (identifiableType.getSupertype() instanceof IdentifiableType<?>) { try { identifiableType = identifiableType.getSupertype(); return Collections.<SingularAttribute<?, ?>>singleton(identifiableType.getId(identifiableType.getIdType().getJavaType())); } catch (NullPointerException e2) {