当前位置: 首页>>代码示例>>Java>>正文


Java Indexer.delete方法代码示例

本文整理汇总了Java中com.liferay.portal.kernel.search.Indexer.delete方法的典型用法代码示例。如果您正苦于以下问题:Java Indexer.delete方法的具体用法?Java Indexer.delete怎么用?Java Indexer.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.liferay.portal.kernel.search.Indexer的用法示例。


在下文中一共展示了Indexer.delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: delete

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
public void delete(Data value) throws SearchException {
	Object uid = value.get(Field.UID);

	if (uid == null) {
		return;
	}

	String className = value.getEntryClassName();
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(className);

	indexer.delete(value.getCompanyId(), uid.toString());
}
 
开发者ID:jorgediaz-lr,项目名称:index-checker,代码行数:13,代码来源:IndexSearchHelper.java

示例2: deleteApplication

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
public Application deleteApplication(Application application) throws SystemException {
	_log.debug("deleteApplication: " + application.getApplicationId());
       // Indexer
       Indexer indexer = IndexerRegistryUtil.getIndexer(Application.class);
       try {
		indexer.delete(application);
	} catch (SearchException e) {
		e.printStackTrace();
	}
	applicationPersistence.remove(application);	
       return application;
}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:13,代码来源:ApplicationLocalServiceImpl.java

示例3: deleteOldApplication

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
public void deleteOldApplication(long oldApplicationId, long newApplicationId) throws SystemException, PortalException {
		_log.debug("deleteOldApplication(long " + oldApplicationId +", long " + newApplicationId + ")");
		Application oldApplication = applicationPersistence.fetchByPrimaryKey(oldApplicationId);
		Application newApplication = applicationPersistence.fetchByPrimaryKey(newApplicationId);
		
//		applicationPersistence.clearCategories(applicationId);
//		applicationPersistence.clearLanguages(applicationId);
//		applicationPersistence.clearRegions(applicationId);
		
		List<MultiMedia> multiMedias = multiMediaPersistence.findByapp(oldApplicationId);
		for (MultiMedia multiMedia: multiMedias) {
			MultiMediaLocalServiceUtil.deleteMultiMedia(multiMedia);
		}
		
		List<Link> links = linkPersistence.findByapp(oldApplicationId);
		for (Link link: links) {
			linkPersistence.remove(link);
		}
		
		List<Application_Entitlement> applicationEntitlements = application_EntitlementPersistence.findByca(10154, oldApplicationId);
		for (Application_Entitlement applicationEntitlement: applicationEntitlements) {
			application_EntitlementPersistence.remove(applicationEntitlement);
		}
		
		String relatedApplicationId = oldApplication.getRelatedApplicationId();
		
		newApplication.setRelatedApplicationId(relatedApplicationId);
        applicationPersistence.update(newApplication, true);
		
		if (relatedApplicationId.length() > 0) {
			String [] relatedApplicationIds = relatedApplicationId.split(";");
			long [] relatedApplicationIdsLong = new long[relatedApplicationIds.length];

			for (int i = 0; i<relatedApplicationIds.length; i++) {
				relatedApplicationIdsLong[i] = Long.parseLong(relatedApplicationIds[i]);
				Application app = applicationLocalService.getApplication(Long.parseLong(relatedApplicationIds[i]));
				String oldRelatedApplicationString = app.getRelatedApplicationId();
				String newRelatedApplicationString = replaceRelatedIds(oldRelatedApplicationString, String.valueOf(oldApplicationId));
				if (newRelatedApplicationString.length() > 0) {
					newRelatedApplicationString = newRelatedApplicationString + ";" + String.valueOf(newApplicationId);
				} else {
					newRelatedApplicationString = String.valueOf(newApplicationId);
				}
				app.setRelatedApplicationId(newRelatedApplicationString);
		        applicationPersistence.update(app, true);
		        
		        long new_AppId = 0;
		        new_AppId = app.getNewVersionId();
		        if (new_AppId > 0) {
		        	Application newApp = applicationLocalService.getApplication(new_AppId);
					String newAppOldRelatedApplicationString = newApp.getRelatedApplicationId();
					String newAppNewRelatedApplicationString = replaceRelatedIds(newAppOldRelatedApplicationString, String.valueOf(oldApplicationId));
					if (newAppNewRelatedApplicationString.length() > 0) {
						newAppNewRelatedApplicationString = newAppNewRelatedApplicationString + ";" + String.valueOf(newApplicationId);
					} else {
						newAppNewRelatedApplicationString = String.valueOf(newApplicationId);
					}
					newApp.setRelatedApplicationId(newAppNewRelatedApplicationString);
			        applicationPersistence.update(newApp, true);		        	
		        }
			}
		}
        // Indexer
        Indexer indexer = IndexerRegistryUtil.getIndexer(Application.class);
        indexer.delete(oldApplication);
		applicationPersistence.remove(oldApplication);   
	}
 
开发者ID:fraunhoferfokus,项目名称:govapps,代码行数:68,代码来源:ApplicationLocalServiceImpl.java

示例4: removeAppMessage

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thông điệp gửi tới người dùng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param appMessage thông điệp sẽ bị xóa
 * @return
 */
public void removeAppMessage(AppMessage appMessage) throws PortalException, SystemException {
	appMessagePersistence.remove(appMessage);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(AppMessage.class);
	indexer.delete(appMessage);
	resourceLocalService.deleteResource(appMessage.getCompanyId(), AppMessage.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, appMessage.getAppMessageId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:AppMessageLocalServiceImpl.java

示例5: removeStatisticByAgency

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thống kê theo ngày
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin thống kê theo ngày
 * @param statisticByAgency thống kê theo ngày được xóa
 * @return
 */
public void removeStatisticByAgency(StatisticByAgency statisticByAgency) throws PortalException, SystemException {
	statisticByAgencyPersistence.remove(statisticByAgency);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(StatisticByAgency.class);
	indexer.delete(statisticByAgency);
	resourceLocalService.deleteResource(statisticByAgency.getCompanyId(), StatisticByAgency.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, statisticByAgency.getStatisticByAgencyId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:StatisticByAgencyLocalServiceImpl.java

示例6: removeStatisticByDay

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thống kê theo ngày
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin thống kê theo ngày
 * @param statisticByDay thống kê theo ngày được xóa
 * @return
 */
public void removeStatisticByDay(StatisticByDay statisticByDay) throws PortalException, SystemException {
	statisticByDayPersistence.remove(statisticByDay);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(StatisticByDay.class);
	indexer.delete(statisticByDay);
	resourceLocalService.deleteResource(statisticByDay.getCompanyId(), StatisticByDay.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, statisticByDay.getStatisticByDayId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:StatisticByDayLocalServiceImpl.java

示例7: removeProfileData

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một dữ liệu đệm
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin dữ liệu đệm
 * @param profileData dữ liệu đệm được xóa
 * @return
 */
public void removeProfileData(ProfileData profileData) throws PortalException, SystemException {
	profileDataPersistence.remove(profileData);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(ProfileData.class);
	indexer.delete(profileData);
	resourceLocalService.deleteResource(profileData.getCompanyId(), ProfileData.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, profileData.getProfileDataId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:ProfileDataLocalServiceImpl.java

示例8: removeDossierProc

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thủ tục hành chính công
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin thủ tục hành chính
 * @param dossierProc Thủ tục hành chính sẽ bị xóa
 * @return
 */
public void removeDossierProc(DossierProc dossierProc) throws PortalException, SystemException {
	dossierProcPersistence.remove(dossierProc);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(DossierProc.class);
	indexer.delete(dossierProc);
	resourceLocalService.deleteResource(dossierProc.getCompanyId(), DossierProc.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, dossierProc.getDossierProcId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:DossierProcLocalServiceImpl.java

示例9: removeStatisticByDomain

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thống kê theo ngày
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin thống kê theo ngày
 * @param statisticByDomain thống kê theo ngày được xóa
 * @return
 */
public void removeStatisticByDomain(StatisticByDomain statisticByDomain) throws PortalException, SystemException {
	statisticByDomainPersistence.remove(statisticByDomain);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(StatisticByDomain.class);
	indexer.delete(statisticByDomain);
	resourceLocalService.deleteResource(statisticByDomain.getCompanyId(), StatisticByDomain.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, statisticByDomain.getStatisticByDomainId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:StatisticByDomainLocalServiceImpl.java

示例10: removeAppRole

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một quyền truy cập ứng dụng được tích hợp trong cổng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param appRole quyền truy cập ứng dụng tích hợp sẽ bị xóa
 * @return
 */
public void removeAppRole(AppRole appRole) throws PortalException, SystemException {
	appRolePersistence.remove(appRole);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(AppRole.class);
	indexer.delete(appRole);
	resourceLocalService.deleteResource(appRole.getCompanyId(), AppRole.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, appRole.getAppRoleId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:AppRoleLocalServiceImpl.java

示例11: removeDossierProc2Process

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một cấu hình thủ tục
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Xóa bỏ thông tin cấu hình thủ tục
 * @param dossierProc2Process cấu hình thủ tục cần xóa
 * @return
 */
public void removeDossierProc2Process(DossierProc2Process dossierProc2Process) throws PortalException, SystemException {
	dossierProc2ProcessPersistence.remove(dossierProc2Process);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(DossierProc2Process.class);
	indexer.delete(dossierProc2Process);
	resourceLocalService.deleteResource(dossierProc2Process.getCompanyId(), DossierProc2Process.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, dossierProc2Process.getDossierProc2ProcessId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:DossierProc2ProcessLocalServiceImpl.java

示例12: removeAppRole2JobPos

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một vai trò truy cập ứng dụng theo vị trí công tác được tích hợp trong cổng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param appRole2JobPos vai trò truy cập ứng dụng theo vị trí công tác sẽ bị xóa
 * @return
 */
public void removeAppRole2JobPos(AppRole2JobPos appRole2JobPos) throws PortalException, SystemException {
	appRole2JobPosPersistence.remove(appRole2JobPos);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(AppRole2JobPos.class);
	indexer.delete(appRole2JobPos);
	resourceLocalService.deleteResource(appRole2JobPos.getCompanyId(), AppRole2JobPos.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, appRole2JobPos.getAppRole2JobPosId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:AppRole2JobPosLocalServiceImpl.java

示例13: removeApplication

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một ứng dụng được tích hợp trong cổng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param application ứng dụng tích hợp sẽ bị xóa
 * @return
 */
public void removeApplication(Application application) throws PortalException, SystemException {
	applicationPersistence.remove(application);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(Application.class);
	indexer.delete(application);
	resourceLocalService.deleteResource(application.getCompanyId(), Application.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, application.getApplicationId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:ApplicationLocalServiceImpl.java

示例14: removeAppRole2Employee

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một vai trò truy cập ứng dụng cho cán bộ được tích hợp trong cổng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param appRole2Employee vai trò truy cập ứng dụng cho cán bộ sẽ bị xóa
 * @return
 */
public void removeAppRole2Employee(AppRole2Employee appRole2Employee) throws PortalException, SystemException {
	appRole2EmployeePersistence.remove(appRole2Employee);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(AppRole2Employee.class);
	indexer.delete(appRole2Employee);
	resourceLocalService.deleteResource(appRole2Employee.getCompanyId(), AppRole2Employee.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, appRole2Employee.getAppRole2EmployeeId());
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:19,代码来源:AppRole2EmployeeLocalServiceImpl.java

示例15: removeUserSync

import com.liferay.portal.kernel.search.Indexer; //导入方法依赖的package包/类
/** 
 * Xóa bỏ thông tin một thông tin đồng bộ người dùng
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param userSync thông tin đồng bộ sẽ bị xóa
 * @return
 */
public void removeUserSync(UserSync userSync) throws PortalException, SystemException {
	userSyncPersistence.remove(userSync);
	Indexer indexer = IndexerRegistryUtil.nullSafeGetIndexer(UserSync.class);
	indexer.delete(userSync);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:18,代码来源:UserSyncLocalServiceImpl.java


注:本文中的com.liferay.portal.kernel.search.Indexer.delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。