public
Created

get all RatingsEntry by user and asset type

  • Download Gist
ratingsentries.java
Java
1 2 3 4 5 6 7 8
long classNameId = PortalUtil.getClassNameId(className);
DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(RatingsEntry.class, PortalClassLoaderUtil.getClassLoader());
dynamicQuery.add(RestrictionsFactoryUtil.eq("userId", userId));
dynamicQuery.add(RestrictionsFactoryUtil.eq("classNameId", classNameId));
List<RatingsEntry> ratings = (List<RatingsEntry>)RatingsEntryLocalServiceUtil.dynamicQuery(dynamicQuery);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.