本文整理汇总了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);
}