List of usage examples for javax.persistence TupleElement getJavaType
Class<? extends X> getJavaType();
From source file:com.evanzeimet.queryinfo.jpa.result.AbstractTupleToPojoQueryInfoResultConverter.java
protected MethodHandle getMethodHandleForElement(TupleElement<?> element) throws QueryInfoException { String elementAlias = element.getAlias(); String memberName = attributeUtils.convertAttributeNameToMemberName(elementAlias); Class<?> elementJavaType = element.getJavaType(); MethodHandle result = findFieldSetterHandle(memberName, elementJavaType); if (result == null) { result = findFieldPutHandle(memberName, elementJavaType); }/*from w w w. j a v a 2s . c o m*/ if (result == null) { String message = String.format("Could not find accessible setter or field for attribute [%s]", elementAlias); throw new QueryInfoException(message); } return result; }