Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.60 KB | None | 0 0
  1.         channelSubIdParameter = cb.parameter(String.class, "channelSubscribeId");
  2.         userIdParameter = cb.parameter(Integer.class, "userId");
  3.        
  4.         entByChanAndUser = cb.createQuery(PortletEntityImpl.class);
  5.         final Root<PortletEntityImpl> entityRoot = entByChanAndUser.from(PortletEntityImpl.class);
  6.         entByChanAndUser.select(entityRoot);
  7.         entByChanAndUser.where(cb.and(
  8.                 cb.equal(entityRoot.get(PortletEntityImpl_.channelSubscribeId), channelSubIdParameter),
  9.                 cb.equal(entityRoot.get(PortletEntityImpl_.userId), userIdParameter)
  10.         ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement