Example usage for javax.persistence.metamodel PluralAttribute getBindableJavaType

List of usage examples for javax.persistence.metamodel PluralAttribute getBindableJavaType

Introduction

In this page you can find the example usage for javax.persistence.metamodel PluralAttribute getBindableJavaType.

Prototype

Class<T> getBindableJavaType();

Source Link

Document

Return the Java type of the represented object.

Usage

From source file:com.evanzeimet.queryinfo.jpa.field.QueryInfoJPAAttributePathBuilder.java

protected Class<?> getAttributeJoinedType(Attribute<?, ?> attribute) {
    Class<?> result;//from ww  w.  ja v a  2  s.c  om

    if (attribute instanceof PluralAttribute<?, ?, ?>) {
        PluralAttribute<?, ?, ?> pluralAttribute = ((PluralAttribute<?, ?, ?>) attribute);
        result = pluralAttribute.getBindableJavaType();
    } else {
        result = attribute.getJavaType();
    }

    return result;
}