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;
|
}
|