List of usage examples for javax.persistence.criteria Path getModel
Bindable<X> getModel();
From source file:com.dbs.sdwt.jpa.ByExampleUtil.java
public <E> Predicate byExampleOnEmbeddable(Path<E> embeddablePath, E embeddableValue, SearchParameters sp, CriteriaBuilder builder) {// ww w . j a va2 s . c o m if (embeddableValue == null) { return null; } Class<E> type = embeddablePath.getModel().getBindableJavaType(); ManagedType<E> mt = em.getMetamodel().embeddable(type); // note: calling .managedType() does not work return jpaUtil.andPredicate(builder, byExample(mt, embeddablePath, embeddableValue, sp, builder)); }
From source file:org.querybyexample.jpa.ByExampleUtil.java
public <E> Predicate byExampleOnEmbeddable(Path<E> embeddablePath, E embeddableValue, SearchParameters sp, CriteriaBuilder builder) {/*w ww . jav a2s. co m*/ if (embeddableValue == null) { return null; } Class<E> type = embeddablePath.getModel().getBindableJavaType(); ManagedType<E> mt = em.getMetamodel().embeddable(type); // note: calling .managedType() does not work return JpaUtil.andPredicate(builder, byExample(mt, embeddablePath, embeddableValue, sp, builder)); }