如何在liferay中获取不同的记录

时间:2014-10-21 11:38:25

标签: search liferay liferay-6

我试图获取不同的记录。但没有成功。我尝试了以下代码

  

DynamicQuery   dynamicQry = DynamicQueryFactoryUtil.forClass(Clipping.class);   dynamicQry.add(RestrictionsFactoryUtil.isNotNull( “新京报”));   dynamicQry.setProjection(ProjectionFactoryUtil.distinct(ProjectionFactoryUtil.property( “新京报”)));   列表按=   ClippingLocalServiceUtil.dynamicQuery(dynamicQry);

     

我收到了以下错误

java.lang.ClassCastException: java.lang.String cannot be cast to com.dbservice.model.Clipping
at org.apache.jsp.html.pressClipingReport.view_jsp._jspService(view_jsp.java:924)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

解决方案是什么? 请帮忙

提前致谢

0 个答案:

没有答案