protected void initActionableDynamicQuery(ActionableDynamicQuery actionableDynamicQuery) {
    actionableDynamicQuery.setBaseLocalService(
        com.liferay.message.boards.kernel.service.MBDiscussionLocalServiceUtil.getService());
    actionableDynamicQuery.setClassLoader(getClassLoader());
    actionableDynamicQuery.setModelClass(MBDiscussion.class);

    actionableDynamicQuery.setPrimaryKeyPropertyName("discussionId");
  }
  @Override
  public ActionableDynamicQuery getActionableDynamicQuery() {
    ActionableDynamicQuery actionableDynamicQuery = new DefaultActionableDynamicQuery();

    actionableDynamicQuery.setBaseLocalService(
        com.liferay.message.boards.kernel.service.MBDiscussionLocalServiceUtil.getService());
    actionableDynamicQuery.setClassLoader(getClassLoader());
    actionableDynamicQuery.setModelClass(MBDiscussion.class);

    actionableDynamicQuery.setPrimaryKeyPropertyName("discussionId");

    return actionableDynamicQuery;
  }