List of usage examples for com.liferay.portal.kernel.search Indexer delete
@Bufferable public void delete(T object) throws SearchException;
From source file:at.meduni.liferay.portlet.bbmrieric.service.impl.D2BiobankLocalServiceImpl.java
License:Open Source License
/** * //from w w w.j a v a 2 s.c o m * @param biobankId * @param serviceContext * @return */ public D2Biobank deleteD2Biobank(long biobankId, ServiceContext serviceContext) { try { D2Biobank d2biobank = getD2Biobank(biobankId); resourceLocalService.deleteResource(serviceContext.getCompanyId(), D2Biobank.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, biobankId); AssetEntry assetEntry = assetEntryLocalService.fetchEntry(D2Biobank.class.getName(), biobankId); assetLinkLocalService.deleteLinks(assetEntry.getEntryId()); assetEntryLocalService.deleteEntry(assetEntry); Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(D2Biobank.class); indexer.delete(d2biobank); d2biobank = deleteD2Biobank(d2biobank); return d2biobank; } catch (Exception e) { System.out.println("[" + date_format_apache_error.format(new Date()) + "] [error] [BBMRIERICDatabase-portlet::at.meduni.liferay.portlet.bbmrieric.service.impl.D2BiobankLocalServiceImpl::deleteD2Biobank] Error deleteing D2Biobank " + biobankId + "."); e.printStackTrace(); } return null; }
From source file:br.com.seatecnologia.banner.service.base.BannerLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the banner with the primary key from the database. Also notifies the appropriate model listeners. * * @param bannerId the primary key of the banner * @throws PortalException if a banner with the primary key could not be found * @throws SystemException if a system exception occurred *//*from w w w . j a va2s. c o m*/ public void deleteBanner(long bannerId) throws PortalException, SystemException { Banner banner = bannerPersistence.remove(bannerId); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(banner); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:br.com.seatecnologia.banner.service.base.BannerLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the banner from the database. Also notifies the appropriate model listeners. * * @param banner the banner//from ww w. ja v a 2s. c om * @throws SystemException if a system exception occurred */ public void deleteBanner(Banner banner) throws SystemException { bannerPersistence.remove(banner); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(banner); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:br.com.seatecnologia.cldf.enquetenoticia.service.base.EnqueteNoticiaLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the enquete noticia with the primary key from the database. Also notifies the appropriate model listeners. * * @param enqueteNoticiaId the primary key of the enquete noticia * @throws PortalException if a enquete noticia with the primary key could not be found * @throws SystemException if a system exception occurred *//*from w w w . j a va 2 s.c o m*/ public void deleteEnqueteNoticia(long enqueteNoticiaId) throws PortalException, SystemException { EnqueteNoticia enqueteNoticia = enqueteNoticiaPersistence.remove(enqueteNoticiaId); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(enqueteNoticia); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:br.com.seatecnologia.cldf.enquetenoticia.service.base.EnqueteNoticiaLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the enquete noticia from the database. Also notifies the appropriate model listeners. * * @param enqueteNoticia the enquete noticia * @throws SystemException if a system exception occurred *//* w ww . j ava2s .co m*/ public void deleteEnqueteNoticia(EnqueteNoticia enqueteNoticia) throws SystemException { enqueteNoticiaPersistence.remove(enqueteNoticia); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(enqueteNoticia); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:com.fl.uploadfile.service.base.UploadFileLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the upload file with the primary key from the database. Also notifies the appropriate model listeners. * * @param fileUploadId the primary key of the upload file * @throws PortalException if a upload file with the primary key could not be found * @throws SystemException if a system exception occurred *//*from w w w .j ava 2s. c o m*/ public void deleteUploadFile(long fileUploadId) throws PortalException, SystemException { UploadFile uploadFile = uploadFilePersistence.remove(fileUploadId); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(uploadFile); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:com.fl.uploadfile.service.base.UploadFileLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the upload file from the database. Also notifies the appropriate model listeners. * * @param uploadFile the upload file/* ww w .ja v a 2 s. c o m*/ * @throws SystemException if a system exception occurred */ public void deleteUploadFile(UploadFile uploadFile) throws SystemException { uploadFilePersistence.remove(uploadFile); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(uploadFile); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:com.huihoo.social.service.base.SocialcontentLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the socialcontent with the primary key from the database. Also notifies the appropriate model listeners. * * @param id the primary key of the socialcontent * @throws PortalException if a socialcontent with the primary key could not be found * @throws SystemException if a system exception occurred *//* w ww. j av a 2 s .com*/ public void deleteSocialcontent(long id) throws PortalException, SystemException { Socialcontent socialcontent = socialcontentPersistence.remove(id); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(socialcontent); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:com.huihoo.social.service.base.SocialcontentLocalServiceBaseImpl.java
License:Open Source License
/** * Deletes the socialcontent from the database. Also notifies the appropriate model listeners. * * @param socialcontent the socialcontent * @throws SystemException if a system exception occurred *///from w ww . jav a 2s . co m public void deleteSocialcontent(Socialcontent socialcontent) throws SystemException { socialcontentPersistence.remove(socialcontent); Indexer indexer = IndexerRegistryUtil.getIndexer(getModelClassName()); if (indexer != null) { try { indexer.delete(socialcontent); } catch (SearchException se) { if (_log.isWarnEnabled()) { _log.warn(se, se); } } } }
From source file:com.idetronic.subur.service.impl.SuburItemLocalServiceImpl.java
License:Open Source License
public void deleteItem(SuburItem suburItem) throws SystemException, PortalException { resourceLocalService.deleteResource(suburItem.getCompanyId(), SuburItem.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, suburItem.getItemId()); List<ItemItemType> itemTypes = ItemItemTypeLocalServiceUtil.getByItemId(suburItem.getItemId()); for (ItemItemType iType : itemTypes) { itemItemTypePersistence.remove(iType); ItemTypeLocalServiceUtil.decrementCounter(iType.getItemTypeId()); }//from ww w. j a v a 2 s .c o m AuthorLocalServiceUtil.deleteItem(suburItem.getItemId()); // Asset assetEntryLocalService.deleteEntry(SuburItem.class.getName(), suburItem.getItemId()); suburItemPersistence.remove(suburItem); // Indexer Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(SuburItem.class); indexer.delete(suburItem); }