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


Java Transactional类代码示例

本文整理汇总了Java中com.liferay.portal.kernel.transaction.Transactional的典型用法代码示例。如果您正苦于以下问题:Java Transactional类的具体用法?Java Transactional怎么用?Java Transactional使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Transactional类属于com.liferay.portal.kernel.transaction包,在下文中一共展示了Transactional类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addDossierProcess

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
/** 
 * Add dossier process
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Create new
 * @param
 * @return: new dossier process
 */
@Indexable(type = IndexableType.REINDEX)	
@Transactional
public DossierProcess addDossierProcess(
		ServiceContext serviceContext) throws SystemException, PortalException {
	long id = counterLocalService.increment();
	DossierProcess dossierProcess = dossierProcessPersistence.create(id);
	Date now = new Date();
	
	dossierProcess.setUserId(serviceContext.getUserId());
	dossierProcess.setGroupId(serviceContext.getScopeGroupId());		
	dossierProcess.setCompanyId(serviceContext.getCompanyId());
	dossierProcess.setCreateDate(serviceContext.getCreateDate(now));
	
	dossierProcessPersistence.update(dossierProcess);

	if (_log.isInfoEnabled()) {
		_log.info("Create new dossier process " + id);
	}
	
	if (serviceContext.isAddGroupPermissions() || serviceContext.isAddGuestPermissions()) {
		addDossierProcessResources(dossierProcess, serviceContext.isAddGroupPermissions(), serviceContext.isAddGuestPermissions(), serviceContext);
	}
	else {
		addDossierProcessResources(dossierProcess, serviceContext.getGroupPermissions(), serviceContext.getGuestPermissions(), serviceContext);
	}
	return getDossierProcess(id);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:40,代码来源:DossierProcessLocalServiceImpl.java

示例2: addCreateFile

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
/** 
 * Thêm vết hồ sơ được tạo ra tại các bước trong quy trình xử lý
 * 
 * Version: OEP 2.0
 *  
 * History: 
 *   DATE        AUTHOR      DESCRIPTION 
 *  ------------------------------------------------- 
 *  21-September-2015  trungdk    Tạo mới
 * @param dossierProcessId nằm trong quy trình nào
 * @param dossierStepId nằm tại bước xử lý nào
 * @param stepDate thời gian bắt đầu của bước
 * @param docFileId file hồ sơ được tạo ra bởi form xử lý
 * @return: vết hồ sơ của quy trình mới được tạo
 */
@Indexable(type = IndexableType.REINDEX)	
@Transactional
public CreateFile addCreateFile(
		long processOrderId,
		long dossierStepId,
		Date stepDate,
		long docFileId,
		ServiceContext serviceContext) throws SystemException, PortalException {
	validate();
	long id = counterLocalService.increment();
	CreateFile createFile = createFilePersistence.create(id);
	Date now = new Date();
	
	createFile.setUserId(serviceContext.getUserId());
	createFile.setGroupId(serviceContext.getScopeGroupId());
	createFile.setCompanyId(serviceContext.getCompanyId());
	createFile.setCreateDate(serviceContext.getCreateDate(now));
	createFile.setProcessOrderId(processOrderId);
	createFile.setDossierStepId(dossierStepId);
	createFile.setCreateDate(stepDate);
	createFile.setDocFileId(docFileId);
	
	createFilePersistence.update(createFile);

	if (_log.isInfoEnabled()) {
		_log.info("Create new create file " + id);
	}
	
	if (serviceContext.isAddGroupPermissions() || serviceContext.isAddGuestPermissions()) {
		addCreateFileResources(createFile, serviceContext.isAddGroupPermissions(), serviceContext.isAddGuestPermissions(), serviceContext);
	}
	else {
		addCreateFileResources(createFile, serviceContext.getGroupPermissions(), serviceContext.getGuestPermissions(), serviceContext);
	}
	return getCreateFile(id);
}
 
开发者ID:openegovplatform,项目名称:OEPv2,代码行数:52,代码来源:CreateFileLocalServiceImpl.java

示例3: getActionableDynamicQuery

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public ActionableDynamicQuery getActionableDynamicQuery();
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:3,代码来源:jasperLocalService.java

示例4: getIndexableActionableDynamicQuery

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:3,代码来源:jasperLocalService.java

示例5: getPersistedModel

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public PersistedModel getPersistedModel(Serializable primaryKeyObj)
	throws PortalException;
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:5,代码来源:jasperLocalService.java

示例6: fetchjasper

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public jasper fetchjasper(long jasperId);
 
开发者ID:VietOpenCPS,项目名称:opencps-v2,代码行数:3,代码来源:jasperLocalService.java

示例7: fetchRegion

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Region fetchRegion(long regionId);
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:3,代码来源:RegionLocalService.java

示例8: fetchCountry

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Country fetchCountry(long countryId);
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:3,代码来源:CountryLocalService.java

示例9: fetchFoo

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public Foo fetchFoo(long fooId);
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:3,代码来源:FooLocalService.java

示例10: getExportActionableDynamicQuery

import com.liferay.portal.kernel.transaction.Transactional; //导入依赖的package包/类
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public ExportActionableDynamicQuery getExportActionableDynamicQuery(
	PortletDataContext portletDataContext);
 
开发者ID:liferay,项目名称:liferay-blade-samples,代码行数:4,代码来源:FooLocalService.java


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