67,513
社区成员
发帖
与我相关
我的任务
分享
@Service("countryService")
public class CountryServiceImpl extends BaseService<Country> implements CountryService {
@Autowired
private RegionService regionService;
@Autowired
private AreaService areaService;
/**
* @param regionService the regionService to set
*/
public void setRegionService(RegionService regionService) {
this.regionService = regionService;
}
/**
* @param areaService the areaService to set
*/
public void setAreaService(AreaService areaService) {
this.areaService = areaService;
}
@Service("regionService")
public class RegionServiceImpl extends BaseService<Region> implements RegionService {
@Autowired
private CountryService countryService;
/**
* @param countryService the countryService to set
*/
public void setCountryService(CountryService countryService) {
this.countryService = countryService;
}
@Controller
public class CountryAction extends CommonAction {
/** serialVersionUID. */
private static final long serialVersionUID = 557943713629501919L;
private Country country;
private CountryService countryService;
/**
* @param countryService the countryService to set
*/
@Autowired
public void setCountryService(CountryService countryService) {
this.countryService = countryService;
}
}
@Controller
public class RegionAction extends CommonAction {
/** serialVersionUID. */
private static final long serialVersionUID = 557943713629501919L;
private Region region;
private Country country;
private RegionService regionService;
/* private CountryProvideImpl countryProvideImpl; */
/**
* @param regionService the regionService to set
*/
@Autowired
public void setRegionService(RegionService regionService) {
this.regionService = regionService;
}
}
/*
* Copyright (c) 2012-2032 Accounting Center of China Aviation(ACCA).
* All Rights Reserved.
*/
package cn.com.acca.cmrm.master.app.service;
import cn.com.acca.ajaf.core.exception.BusinessException;
import cn.com.acca.ajaf.core.service.IBaseService;
import cn.com.acca.cmrm.master.app.entity.Province;
/**
* 省份Service接口层.
*
* @version cmrm-web v1.0
* @author Wu Yang, 2013-5-27
*/
public interface ProvinceService extends IBaseService<Province> {
/**
* 判断省份代码是否存在,存在为true,不存在为false.
* @param provinceCode 省份代码.
* @return true or false.
* @throws BusinessException BusinessException.
*/
boolean isExisted(String provinceCode) throws BusinessException;
/**
* 按照地理地区代码查询,是否存在省份信息.
* @param regionId 地理地区Id.
* @return List.
* @throws Exception Exception.
*/
boolean isExisteProvinceByRegion(String regionId) throws Exception;
/**
* 添加单条数据.
* @param province .
* @param regionCode .
* @return boolean.
* @throws Exception .
*/
boolean saveProvince(Province province, String regionCode) throws BusinessException;
/**
* 编辑单条数据.
* @param province .
* @param regionCode .
* @throws Exception .
*/
void updateProvince(Province province, String regionCode) throws BusinessException;
/**
* 删除单条数据.
* @param clazz .
* @param provinceId .
* @return boolean.
* @throws Exception .
*/
boolean deleteProvince(Class<Province> clazz, String provinceId) throws BusinessException;
}
实现类:
@Service("provinceService")
public class ProvinceServiceImpl extends BaseService<Province> implements ProvinceService {
private RegionService regionService;
/**
* @param regionService the regionService to set
*/
@Autowired
public void setRegionService(RegionService regionService) {
this.regionService = regionService;
}
//其他实现方法
}