private static void validateTypesCompatible(List<TargetType> possibleTargets, Class<?> targetType, Class<?> targetElementType, boolean subtypesAllowed, boolean singular, MetamodelBuildingContext context, ExpressionLocation expressionLocation, String location) { final Class<?> expressionType = targetType; if (!possibleTargets.isEmpty()) { boolean error = true; for (TargetType t : possibleTargets) { if (isCompatible(t, targetType, targetElementType, subtypesAllowed, singular)) { error = false; break; } } if (error) { if (targetType.isPrimitive()) { targetType = ReflectionUtils.getObjectClassOfPrimitve(targetType); } else { targetType = ReflectionUtils.getPrimitiveClassOfWrapper(targetType); } if (targetType != null) { for (TargetType t : possibleTargets) { if (isCompatible(t, targetType, targetElementType, subtypesAllowed, singular)) { error = false; break; } } } } if (error) { context.addError(typeCompatibilityError(possibleTargets, expressionType, targetElementType, expressionLocation, location)); } } }
final Class<?> primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(idClass); if (primitiveIdClass != null) { return Collections.singletonList(entityType.getId(primitiveIdClass).getName());
final Class<?> primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(idClass); if (primitiveIdClass != null) { return Collections.singletonList(entityType.getId(primitiveIdClass).getName());
final Class<?> primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(entityType.getIdType().getJavaType()); if (primitiveIdClass == null) {
final Class<?> primitiveIdClass = ReflectionUtils.getPrimitiveClassOfWrapper(entityType.getIdType().getJavaType()); if (primitiveIdClass == null) {