use of com.dq.easy.cloud.module.common.generator.code.java.desc.anno.DqJavaAnnotationParamDesc in project dq-easy-cloud by dq-open-cloud.
the class DqJavaClassContentDesc method getFieldsAnnotationsByResultSet.
/**
* <p>
* 根据dataSource构建属性注解列表
* </p>
*
* @param databaseDataSources
* @return
* @author daiqi 创建时间 2018年3月26日 上午10:18:57
* @throws SQLException
*/
private List<DqJavaAnnotationDesc> getFieldsAnnotationsByResultSet(ResultSet resultSet) throws SQLException {
// 设置属性注解
List<DqJavaAnnotationDesc> annotationDescs = new ArrayList<>();
// 设置列注解描述
DqJavaAnnotationDesc columnAnnotationDesc = new DqJavaAnnotationDesc();
columnAnnotationDesc.setFullClassType(Column.class.getName());
columnAnnotationDesc.setSimpleClassType(Column.class.getSimpleName());
columnAnnotationDesc.setName(Column.class.getSimpleName());
// 获取column参数描述列表
List<DqJavaAnnotationParamDesc> columnAnnotationParamDescs = new ArrayList<>();
columnAnnotationParamDescs.add(new DqJavaAnnotationParamDesc("name", resultSet.getString(DqColumnLabel.COLUMN_NAME)));
columnAnnotationDesc.setParams(columnAnnotationParamDescs);
annotationDescs.add(columnAnnotationDesc);
return annotationDescs;
}
use of com.dq.easy.cloud.module.common.generator.code.java.desc.anno.DqJavaAnnotationParamDesc in project dq-easy-cloud by dq-open-cloud.
the class DqGenerateJavaDAOImplBO method getAnnotations.
@Override
protected List<DqJavaAnnotationDesc> getAnnotations() {
List<DqJavaAnnotationDesc> annotationDescs = new ArrayList<>();
DqJavaAnnotationDesc repositoryAnnotation = new DqJavaAnnotationDesc();
repositoryAnnotation.setName(Repository.class.getSimpleName());
repositoryAnnotation.setSimpleClassType(Repository.class.getSimpleName());
repositoryAnnotation.setFullClassType(Repository.class.getName());
List<DqJavaAnnotationParamDesc> repositoryAnnotationParamDescs = new ArrayList<>();
String value = DqStringUtils.uncapitalize(generateJavaBaseDTO.getClassBodyName() + DqClassNameEndWith.DAO_INF);
repositoryAnnotationParamDescs.add(new DqJavaAnnotationParamDesc("value", value));
repositoryAnnotation.setParams(repositoryAnnotationParamDescs);
annotationDescs.add(repositoryAnnotation);
return annotationDescs;
}
use of com.dq.easy.cloud.module.common.generator.code.java.desc.anno.DqJavaAnnotationParamDesc in project dq-easy-cloud by dq-open-cloud.
the class DqGenerateJavaDOBO method getAnnotations.
@Override
protected List<DqJavaAnnotationDesc> getAnnotations() {
if (DqBaseUtils.isNull(dataBaseConfig)) {
return null;
}
List<DqJavaAnnotationDesc> annotations = new ArrayList<>();
DqJavaAnnotationDesc tableAnnotationDesc = new DqJavaAnnotationDesc();
tableAnnotationDesc.setName(Table.class.getSimpleName());
tableAnnotationDesc.setSimpleClassType(Table.class.getSimpleName());
tableAnnotationDesc.setFullClassType(Table.class.getName());
// 设置类注解参数---begin
List<DqJavaAnnotationParamDesc> tableAnnotationParamDescs = new ArrayList<>();
DqJavaAnnotationParamDesc tableAnnotationParamDesc = new DqJavaAnnotationParamDesc();
tableAnnotationParamDesc.setName("name");
tableAnnotationParamDesc.setValue(dataBaseConfig.getTableName());
tableAnnotationParamDescs.add(tableAnnotationParamDesc);
tableAnnotationDesc.setParams(tableAnnotationParamDescs);
// 设置类注解参数---end
annotations.add(tableAnnotationDesc);
DqJavaAnnotationDesc entityAnnotationDesc = new DqJavaAnnotationDesc();
entityAnnotationDesc.setName(Entity.class.getSimpleName());
entityAnnotationDesc.setSimpleClassType(Entity.class.getSimpleName());
entityAnnotationDesc.setFullClassType(Entity.class.getName());
annotations.add(entityAnnotationDesc);
return annotations;
}
use of com.dq.easy.cloud.module.common.generator.code.java.desc.anno.DqJavaAnnotationParamDesc in project dq-easy-cloud by dq-open-cloud.
the class DqGenerateJavaLogicImplBO method getAnnotations.
@Override
protected List<DqJavaAnnotationDesc> getAnnotations() {
List<DqJavaAnnotationDesc> annotationDescs = new ArrayList<>();
DqJavaAnnotationDesc serviceAnnotation = new DqJavaAnnotationDesc();
serviceAnnotation.setName(Component.class.getSimpleName());
serviceAnnotation.setSimpleClassType(Component.class.getSimpleName());
serviceAnnotation.setFullClassType(Component.class.getName());
List<DqJavaAnnotationParamDesc> serviceAnnotationParamDescs = new ArrayList<>();
String value = DqStringUtils.uncapitalize(generateJavaBaseDTO.getClassBodyName() + DqClassNameEndWith.SERVICE_INF);
serviceAnnotationParamDescs.add(new DqJavaAnnotationParamDesc("value", value));
serviceAnnotation.setParams(serviceAnnotationParamDescs);
annotationDescs.add(serviceAnnotation);
return annotationDescs;
}
use of com.dq.easy.cloud.module.common.generator.code.java.desc.anno.DqJavaAnnotationParamDesc in project dq-easy-cloud by dq-open-cloud.
the class DqGenerateJavaServiceImplBO method getAnnotations.
@Override
protected List<DqJavaAnnotationDesc> getAnnotations() {
List<DqJavaAnnotationDesc> annotationDescs = new ArrayList<>();
DqJavaAnnotationDesc serviceAnnotation = new DqJavaAnnotationDesc();
serviceAnnotation.setName(Service.class.getSimpleName());
serviceAnnotation.setSimpleClassType(Service.class.getSimpleName());
serviceAnnotation.setFullClassType(Service.class.getName());
List<DqJavaAnnotationParamDesc> serviceAnnotationParamDescs = new ArrayList<>();
String value = DqStringUtils.uncapitalize(generateJavaBaseDTO.getClassBodyName() + DqClassNameEndWith.DAO_INF);
serviceAnnotationParamDescs.add(new DqJavaAnnotationParamDesc("value", value));
serviceAnnotation.setParams(serviceAnnotationParamDescs);
annotationDescs.add(serviceAnnotation);
return annotationDescs;
}
Aggregations