lihang
2023-04-25 3fade6d3b27f5666672bb3af610020367f790bda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package com.vci.ubcs.omd.service;
 
import com.vci.ubcs.omd.dto.OmdAttributeDTO;
import com.vci.ubcs.omd.dto.OmdBtmTypeLinkAttributesDTO;
import com.vci.ubcs.omd.entity.OmdAttribute;
import com.vci.ubcs.omd.vo.OmdAttributeVO;
import com.vci.ubcs.starter.exception.VciBaseException;
import org.springblade.core.mp.base.BaseService;
 
import java.util.Collection;
import java.util.List;
 
 
/**
 * Description: 元数据(属性)的服务接口
 *
 * @author LiHang
 * @date 2023/4/3
 */
public interface IOmdAttributeService extends BaseService<OmdAttribute> {
 
    /**
     * 获取元数据详情
     * @param id 主键
     * @return 元数据显示对象
     */
    OmdAttributeVO getAttributeDetail(Long id);
 
    /**
     * 新增或修改
     * @param dto 页面传输对象
     * @return 执行结果
     */
    boolean submit(OmdAttributeDTO dto);
 
    /**
     * 删除
     * @param ids 主键集合
     * @return 执行结果
     */
    boolean removeAttrs(String ids);
 
    /**
     * 查看应用范围
     * @param id 主键
     * @return 查询已应用的业务类型名称
     */
    List<String> applyRange(Long id);
 
    /**
     * 检查属性是否存在
     * @param keyCollections 英文名称集合
     * @return true表示都存在,false表示不存在,不存在的时候会抛出异常
     * @throws VciBaseException 不存在的时候会抛出异常
     */
    boolean checkAttributeExists(Collection<String> keyCollections) throws VciBaseException;
 
    /**
     * 根据英文名称集合批量获取属性对象
     *
     * @param attributeIdCollection 英文名称集合
     * @return 属性对象列表,如果有不存在的不会返回,全部不存在的则返回空列表
     * @throws VciBaseException 参数为空或者查询出错时会抛出错误
     */
    List<OmdAttributeVO> listAttributeByKeyCollection(Collection<String> attributeIdCollection) throws VciBaseException;
 
    /**
     * 判断属性的内容是否符合要求
     * @param id 属性的主键
     * @param attrDataType 属性的类型
     * @param attributeLength 属性的长度
     * @param defaultValue 默认值
     * @return true表示符合要求,不符合要求会抛出异常
     * @throws VciBaseException 不符合要求会抛出异常
     */
    boolean checkAttributePass(String id,String attrDataType, Integer attributeLength, String defaultValue) throws VciBaseException;
 
    /**
     * 校验属性是否符合要求
     *
     * @param attributesDTO 属性数据传输对象
     * @return true 符合 false 不符合
     * @throws VciBaseException 不符合时抛出异常
     */
    boolean checkAttribute(OmdBtmTypeLinkAttributesDTO attributesDTO) throws VciBaseException;
}