private Comparable extractViaPortable(String attributeName, Data data) { try { return PortableExtractor.extractValue(serializationService, data, attributeName); } catch (QueryException e) { throw e; } catch (Exception e) { throw new QueryException(e); } }
@Override public AttributeType getAttributeType(String attributeName) { if (KEY_ATTRIBUTE_NAME.equals(attributeName)) { return ReflectionHelper.getAttributeType(getKey().getClass()); } else if (THIS_ATTRIBUTE_NAME.equals(attributeName)) { return ReflectionHelper.getAttributeType(getValue().getClass()); } boolean isKey = isKey(attributeName); attributeName = getAttributeName(isKey, attributeName); Data data = getOptionalTargetData(isKey); if (data != null && data.isPortable()) { PortableContext portableContext = serializationService.getPortableContext(); return PortableExtractor.getAttributeType(portableContext, data, attributeName); } return ReflectionHelper.getAttributeType(isKey ? getKey() : getValue(), attributeName); }