@Override
 public void onBeforeRemove(Role role) throws ModelListenerException {
   try {
     AnnouncementsEntryLocalServiceUtil.deleteEntries(role.getClassNameId(), role.getRoleId());
   } catch (Exception e) {
     throw new ModelListenerException(e);
   }
 }
  public AnnouncementsEntryActionableDynamicQuery() {
    setBaseLocalService(AnnouncementsEntryLocalServiceUtil.getService());

    setClassLoader(PortalClassLoaderUtil.getClassLoader());

    setModelClass(AnnouncementsEntry.class);

    setPrimaryKeyPropertyName("entryId");
  }