本文整理匯總了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;
}
示例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;
}
示例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;
}
示例4: deleteSystemCarModel
@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean deleteSystemCarModel(String id) {
// 當刪除汽車車型數據時,同事刪除車型的配置信息
carAttrServcie.deleteSystemCarAttr(id);
return carModelDao.delete(id) > 0;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: updateSystemCars
@Override
@Transactional(propagation=Propagation.SUPPORTS,readOnly=false)
public boolean updateSystemCars(DataCarCars carsEntity) {
carsEntity.setDepth(3);
return carsDao.update(carsEntity) > 0;
}
示例10: deleteSystemCarAttr
@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean deleteSystemCarAttr(String id) {
return carAttributeDao.delete(id) > 0;
}
示例11: updateSystemCarSubBrand
@Override
@Transactional(propagation = Propagation.SUPPORTS, readOnly = false)
public boolean updateSystemCarSubBrand(DataCarSubBrand carSubBrandEntity) {
carSubBrandEntity.setDepth(2);
return carSubBrandDao.update(carSubBrandEntity) > 0;
}
示例12: enumerateItems
@Override
@Transactional(propagation = Propagation.SUPPORTS)
public List<ItemId> enumerateItems(String whereClause, String[] names, Object[] values)
{
return dao.enumerateItemKeys(whereClause, names, values);
}
示例13: getItemIdKeys
@Override
@Transactional(propagation = Propagation.SUPPORTS)
public List<ItemIdKey> getItemIdKeys(List<Long> ids)
{
return dao.getItemIdKeys(ids);
}
示例14: getItemIdKey
@Override
@Transactional(propagation = Propagation.SUPPORTS)
public ItemIdKey getItemIdKey(Long id)
{
return dao.getItemIdKey(id);
}
示例15: operateAll
@Override
@Transactional(propagation = Propagation.SUPPORTS)
public void operateAll(ItemOperationFilter filter)
{
operateAllPrivate(filter, null);
}