| | |
| | | |
| | | public class ServiceInfoVO extends BaseData { |
| | | private ClassInfo service; |
| | | private ClassInfo dao; |
| | | //方法列表 |
| | | private List<ServiceMetodInfoVO> metodInfoList; |
| | | private ClassInfo query; |
| | |
| | | public static class Builder { |
| | | private Class entity; |
| | | private String packageName; |
| | | private ClassInfo dao; |
| | | private ClassInfo service; |
| | | private ClassInfo query; |
| | | |
| | |
| | | |
| | | public Builder setPackageName(String packageName) { |
| | | this.packageName = packageName; |
| | | return this; |
| | | } |
| | | |
| | | public Builder setDao(ClassInfo dao) { |
| | | this.dao = dao; |
| | | return this; |
| | | } |
| | | |
| | |
| | | if (packageName == null) { |
| | | throw new Exception("packageName不能为空"); |
| | | } |
| | | if (dao == null) { |
| | | throw new Exception("dao不能为空"); |
| | | } |
| | | if (service == null) { |
| | | throw new Exception("service不能为空"); |
| | | } |
| | |
| | | throw new Exception("尚未找到主键属性"); |
| | | } |
| | | ServiceInfoVO serviceData = new ServiceInfoVO(); |
| | | serviceData.setDao(dao); |
| | | serviceData.setService(service); |
| | | serviceData.setEntity(new ClassInfo(entity.getSimpleName(), entity.getName())); |
| | | serviceData.setPackageName(packageName); |
| | |
| | | |
| | | public void setService(ClassInfo service) { |
| | | this.service = service; |
| | | } |
| | | |
| | | public ClassInfo getDao() { |
| | | return dao; |
| | | } |
| | | |
| | | public void setDao(ClassInfo dao) { |
| | | this.dao = dao; |
| | | } |
| | | |
| | | public List<ServiceMetodInfoVO> getMetodInfoList() { |