當前位置: 首頁>>代碼示例>>Java>>正文


Java Propagation.SUPPORTS屬性代碼示例

本文整理匯總了Java中org.springframework.transaction.annotation.Propagation.SUPPORTS屬性的典型用法代碼示例。如果您正苦於以下問題:Java Propagation.SUPPORTS屬性的具體用法?Java Propagation.SUPPORTS怎麽用?Java Propagation.SUPPORTS使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在org.springframework.transaction.annotation.Propagation的用法示例。


在下文中一共展示了Propagation.SUPPORTS屬性的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addSystemCarModel

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public DataCarModel addSystemCarModel(DataCarModel systemCarModel) {
	Integer parentId = systemCarModel.getParentId();
	// 獲取汽車車係
	DataCarCars systemCars = carsService.getSystemCarsById(parentId);
	systemCarModel.setParentId(parentId);
	systemCarModel.setInitial(systemCars.getInitial());
	systemCarModel.setDepth(4);
	// 添加數據
	systemCarModel = carModelDao.insert(systemCarModel);
	// 增加了汽車車型,就需要添加汽車車型的配置信息(基礎信息,basic等詳細信息暫無)
	DataCarAttribute systemCarAttr = new DataCarAttribute();
	systemCarAttr.setId(systemCarModel.getId());
	carAttrServcie.addSystemCarAttr(systemCarAttr);
	return systemCarModel;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:17,代碼來源:DataCarModelServiceImpl.java

示例2: updateSystemCarAttr

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean updateSystemCarAttr(DataCarAttribute DataCarAttribute) {
	// 對圖片的長度進行判斷
	String facadeImage = DataCarAttribute.getFacadeImage();
	String centralImage = DataCarAttribute.getCentralImage();
	String seatImage = DataCarAttribute.getSeatImage();
	String detailImage = DataCarAttribute.getDetailImage();
	if (facadeImage!=null && !"".equals(facadeImage)){
		DataCarAttribute.setFacadeImageCount(facadeImage.split(",").length);
	}
	if (centralImage!=null && !"".equals(centralImage)){
		DataCarAttribute.setCentralImageCount(centralImage.split(",").length);
	}
	if (seatImage!=null && !"".equals(seatImage)){
		DataCarAttribute.setSeatImageCount(seatImage.split(",").length);
	}
	if (detailImage!=null && !"".equals(detailImage)){
		DataCarAttribute.setDetailImageCount(detailImage.split(",").length);
	}
	return carAttributeDao.update(DataCarAttribute) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:22,代碼來源:DataCarAttributeServiceImpl.java

示例3: updateSystemCarModel

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean updateSystemCarModel(DataCarModel systemCarModel) {
	systemCarModel.setDepth(4);
	// 因為車型的配置信息,由車型信息下發,所以更改車型信息時,同時更改車型的配置信息(隻更改基礎信息)
	// 先判斷是否存在配置信息,如果不存在,則不修改
	Integer carModelId = systemCarModel.getId();
	boolean isExist = carAttrServcie.idIsExist(String.valueOf(carModelId));
	if (isExist) {
		DataCarAttribute systemCarAttr = carModelToAttr(systemCarModel);
		systemCarAttr.setId(carModelId);
		carAttrServcie.updateSystemCarAttr(systemCarAttr);
	}
	return carModelDao.update(systemCarModel) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:15,代碼來源:DataCarModelServiceImpl.java

示例4: deleteSystemCarModel

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean deleteSystemCarModel(String id) {
	// 當刪除汽車車型數據時,同事刪除車型的配置信息
	carAttrServcie.deleteSystemCarAttr(id);
	return carModelDao.delete(id) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:7,代碼來源:DataCarModelServiceImpl.java

示例5: addSystemCars

@Override
@Transactional(propagation=Propagation.SUPPORTS,readOnly=false)
public DataCarCars addSystemCars(DataCarCars carsEntity) {
	Integer parentId = carsEntity.getParentId();
	// 獲取父汽車子公司
	DataCarSubBrand carSubBrandEntity = carSubBrandService.getCarSubBrandById(parentId);
	carsEntity.setParentId(parentId);
	carsEntity.setInitial(carSubBrandEntity.getInitial());
	carsEntity.setDepth(3);
	// 添加數據
	carsEntity = carsDao.insert(carsEntity);
	return carsEntity;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:13,代碼來源:DataCarCarsServiceImpl.java

示例6: addSystemCarBrand

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public DataCarBrand addSystemCarBrand(DataCarBrand systemCarBrand) {
	systemCarBrand.setParentId(0);
	systemCarBrand.setStatus(PublicEnum.NORMAL.value());
	systemCarBrand.setDepth(1);
	// 添加數據
	systemCarBrand = carBrandDao.insert(systemCarBrand);
	return systemCarBrand;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:10,代碼來源:DataCarBrandServiceImpl.java

示例7: udpateSystemCarBrand

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean udpateSystemCarBrand(DataCarBrand systemCarBrand) {
	systemCarBrand.setParentId(0);
	systemCarBrand.setDepth(1);
	return carBrandDao.update(systemCarBrand) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:7,代碼來源:DataCarBrandServiceImpl.java

示例8: addSystemCarSubBrand

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public DataCarSubBrand addSystemCarSubBrand(DataCarSubBrand carSubBrandEntity) {
	Integer parentId = carSubBrandEntity.getParentId();
	// 獲取父品牌
	DataCarBrand carBrandEntity = carBrandService.getSystemCarBrandById(parentId);
	carSubBrandEntity.setParentId(parentId);
	carSubBrandEntity.setInitial(carBrandEntity.getInitial());
	carSubBrandEntity.setDepth(2);
	carSubBrandEntity.setStatus(PublicEnum.NORMAL.value());
	// 添加數據
	carSubBrandEntity = carSubBrandDao.insert(carSubBrandEntity);
	return carSubBrandEntity;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:14,代碼來源:DataCarSubBrandServiceImpl.java

示例9: updateSystemCars

@Override
@Transactional(propagation=Propagation.SUPPORTS,readOnly=false)
public boolean updateSystemCars(DataCarCars carsEntity) {
	carsEntity.setDepth(3);
	return carsDao.update(carsEntity) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:6,代碼來源:DataCarCarsServiceImpl.java

示例10: deleteSystemCarAttr

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean deleteSystemCarAttr(String id) {
	return carAttributeDao.delete(id) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:5,代碼來源:DataCarAttributeServiceImpl.java

示例11: updateSystemCarSubBrand

@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean updateSystemCarSubBrand(DataCarSubBrand carSubBrandEntity) {
	carSubBrandEntity.setDepth(2);
	return carSubBrandDao.update(carSubBrandEntity) > 0;
}
 
開發者ID:babymm,項目名稱:mumu,代碼行數:6,代碼來源:DataCarSubBrandServiceImpl.java

示例12: enumerateItems

@Override
@Transactional(propagation = Propagation.SUPPORTS)
public List<ItemId> enumerateItems(String whereClause, String[] names, Object[] values)
{
	return dao.enumerateItemKeys(whereClause, names, values);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:6,代碼來源:ItemServiceImpl.java

示例13: getItemIdKeys

@Override
@Transactional(propagation = Propagation.SUPPORTS)
public List<ItemIdKey> getItemIdKeys(List<Long> ids)
{
	return dao.getItemIdKeys(ids);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:6,代碼來源:ItemServiceImpl.java

示例14: getItemIdKey

@Override
@Transactional(propagation = Propagation.SUPPORTS)
public ItemIdKey getItemIdKey(Long id)
{
	return dao.getItemIdKey(id);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:6,代碼來源:ItemServiceImpl.java

示例15: operateAll

@Override
@Transactional(propagation = Propagation.SUPPORTS)
public void operateAll(ItemOperationFilter filter)
{
	operateAllPrivate(filter, null);
}
 
開發者ID:equella,項目名稱:Equella,代碼行數:6,代碼來源:ItemServiceImpl.java


注:本文中的org.springframework.transaction.annotation.Propagation.SUPPORTS屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。