mostdao

package com.inspur.pmv5.dao.api.momgt;

import java.util.List;
import java.util.Map;

import com.inspur.pmv5.pojo.momgt.KeyValueVO;
import com.inspur.pmv5.pojo.momgt.MOAttribute;
import com.inspur.pmv5.pojo.momgt.MOEntity;
import com.inspur.pmv5.pojo.momgt.MOType;
import com.inspur.pmv5.pojo.momgt.Othersys;
import com.inspur.pmv5.pojo.momgt.OthersysAttribute;

/**
* Most接口
*
* @author user
*
*/
public interface MOSTDao {
/**
* 查询可用的othersys
*
* @param othersysId OthersysID信息
* @return List<Othersys>
*/
public List<Othersys> getEnableOthersys(String othersysId);

/**
* 根据othersysId在MDL_OTHERSYSMODELMAPPING查询数据
*
* @param othersysId OthersysID信息
* @return List<Othersys>
*/
public List<Othersys> getOthersysModel(String othersysId);

/**
* 根据模型Id查询属性
*
* @param moTypeId MOST的ID信息
* @param isRelation 是关系还是模型
* @return List<OthersysAttribute>
*/
public List<OthersysAttribute> getPMAttribute(String moTypeId, String isRelation);

/**
* 查询记录是否存在
*
* @param othersysId
* OthersysID
* @param isRelation
* 是关系还是模型
* @param otherMotypeCode MOST名称信息
* @return 记录条数
*/
public List<Othersys> checkOthersysExist(String othersysId,
String otherMotypeCode, String isRelation);

/**
* 根据code查询Othersys
*
* @param othersysId
* OthersysID
* @param otherMotypeCode
* 模型CODE
* @return 封装好的Othersys信息
*/
public List<Othersys> getOthersysByCode(String othersysId,
String otherMotypeCode);

/**
* 对Othersys进行修改
*
* @param othersys
* 封装好的MOST模型信息
* @return 修改成功条数
*/
public int updateOthersys(Othersys othersys);

/**
* 对OthersysAttribute进行修改
*
* @param attr
* 属性信息
* @return 修改成功条数
*/
public int updateOthersysAttr(OthersysAttribute attr);

/**
* 修改MOST对应的主键
*
* @param othersys
* 封装好的MOST模型信息
* @return 修改成功条数
*/
public int updateOthersysKeyAttributeId(Othersys othersys);

/**
* 添加一个Othersys
*
* @param othersys
* 封装好的MOST模型信息
* @return 添加成功条数
*/
public int addOthersys(Othersys othersys);

/**
* 判断OthersysAttribute是否存在
*
* @param othersysId
* Othersys的ID信息
* @param otherMotypeId
* 外部模型ID
* @param othersysAttributeId
* 属性ID
* @return 存在的Attribute的集合
*/
public List<OthersysAttribute> checkOthersysAttributeExist(
String othersysId, String otherMotypeId, String othersysAttributeName);

/**
* 添加OthersysAttribute
*
* @param attr
* 封装好的属性信息
* @return 添加成功条数
*/
public int addOthersysAttr(OthersysAttribute attr);

/**
* 判断关系是否存在
*
* @param otherMotypeId MOST的ID信息
* @param othersysAttributeId 源ID
* @param othersysLabelName 目标ID
* @param othersysId Othersys的ID信息
* @return 存在的relation的集合
*/
public List<OthersysAttribute> checkOthersysAttrRelationExist(
String otherMotypeId, String othersysAttributeId,
String othersysLabelName,
String othersysId);

/**
* 新增Relation
*
* @param oa
* 待新增的Relation
* @return int 修改成功的条数
*/
public int addRelation(OthersysAttribute oa);

/**
* 修改Relation
*
* @param oa
* 待修改的Relation
* @return int 修改成功条数
*/
public int updateOthersysAttrRelation(OthersysAttribute oa);

/**
* 根据域id查询模型映射对象
*
* @param domainId
* 模糊查询的字符串
* @return List<Othersys>
*/
public List<Othersys> getOthersysByDomainId(String domainId);

/**
* 根据mostModelId查询属性
*
* @param mostModelId
* most的模型ID
* @return List<OthersysAttribute>
*/
public List<OthersysAttribute> getMostAttributeByModelId(String mostModelId);

/**
* 根据modelName 和 domainId进行模糊查询
*
* @param domainId
* 域Id
* @param name
* moTypeName
* @return 封装好的Othersys信息
*/
public List<Othersys> getOthersysByDomainIdFuzzy(String domainId,
String name);

/**
* 对某些Attribute的Enable属性
*
* @param othersysId
* OthersysID
* @param otherMotypeId
* 模型表的ID
* @param attrIds
* 属性ID的集合
* @return 更新的记录数
*/
public int setAttributeEnableToZero(String othersysId,
String otherMotypeId, List<String> attrIds);

/**
* 修改某些Relation的Enable
*
* @param pathList
* 属性的source和target集合
* @param moTypeId
* 上级的motypeId
* @param othersysId
* Othersys的ID信息
* @return 修改的记录数
*/
public int setRelationEnableToZero(List<String> pathList, String moTypeId,
String othersysId);

/**
* 将某些Othersys的Enable置为0
*
* @param othersysId Othersys的ID信息
* @param othersysIds
* motypeId的集合
* @return 修改的条数
*/
public int setOthersysEnableToZero(String othersysId,
List<String> othersysIds);

/**
* 根据MOSTID将属性Enable置空
*
* @param othersysId
* othersysID信息
* @param othersysIds
* 封装好的MOSTID
* @return 返回修改成功条数
*/
public int setOthersysEnableToZeroByMoTypeId(String othersysId,
List<String> othersysIds);

/**
* 根据ID删除modleMapping
*
* @param mappingId
* 主键
* @return 删除成功条数
*/
public int deleteOthersysModelMapping(String mappingId);

/**
* 更新一条OthersysMapping信息
*
* @param othersys
* 封装好的mapping信息
* @return 修改成功条数
*/
public int updateOthersysMapping(Othersys othersys);

/**
* 新增一条OthersysModelMapping记录
*
* @param othersys
* 封装好的mapping信息
* @return 插入成功条数
*/
public int addOthersysModelMapping(Othersys othersys);

/**
* 新增一条MOST属性Mapping信息
*
* @param oa
* 封装好的Mapping信息
* @return 插入成功条数
*/
public int addOthersysAttrMapping(OthersysAttribute oa);

/**
* 根据主键删除一条AttributeMapping
*
* @param attrMappingId
* 主键信息
* @return 删除条数
*/
public int deleteOthersysAttrMapping(String attrMappingId);

/**
* 修改AttributeMapping
*
* @param oa
* 封装好的AttributeMapping信息
* @return 修改条数
*/
public int updateAttrMapping(OthersysAttribute oa);

/**
* 修改删除mapping的modelEnable属性
*
*
*/
public void changeDeleteModelEnable();

/**
* 修改mapping的modelEnable属性
*
*
*/
public void changeModelEnable();

/**
* 修改删除mapping的AttributeEnable属性
*
*
*/
public void updateDeleteAttrEnable();

/**
* 修改删除mapping的AttributeEnable属性
*
*
*/
public void updateAttrEnable();

/**
* 根据CIName获取othersys对象
*
* @param ciName 名称信息
* @return Othersys
*/
public List<Othersys> getMOSTMOTypeByCIName(String ciName);

/**
* 获得所有Enable属性为1的Othersys
*
* @param othersysId Othersys的ID信息
*
* @return 封装好的Othersys集合
*/
public List<Othersys> getAllEnableModel(String othersysId);

/**
* 根据most模型id获取属性
* @param othersysMOTypeId
* @return List<OthersysAttribute>
*/
public List<OthersysAttribute> getMOSTAttributeByMostMOTypeId(String othersysMOTypeId);

/**
* 获得Model的Mapping信息
*
* @param otherModelId
* 需要的otherModelId信息
* @return 封装好的ModelMapping信息
*/
public List<Othersys> getOthersysModelMappings(String otherModelId);

/**
* 根据传入的MOST的属性ID和本地的属性ID获得属性Mapping信息
*
* @param attrIds
* 本地属性ID
* @param otherAttrIds
* MOST属性ID
* @return Mapping集合
*/
public List<OthersysAttribute> getAttrMapping(List<String> attrIds,
List<String> otherAttrIds);

/**
* 获得OthersysAttribute的所有AttributeId
*
* @param otherModelId
* MOST模型ID
* @param othersysId
* OthersysID
* @return 获得的ID的集合
*/
public List<String> getAttrByModelId(String otherModelId, String othersysId);

/**
* 根据主键值判断该表中是否有数据
*
* @param tableName
* 表名
* @param columnName
* 列名
* @param value
* 列值
* @return 数量
*/
public int getMOCount(String tableName, String columnName, String value);

/**
* 根据属性ID获得属性名称
*
* @param attrID
* 属性ID
* @return 属性名称
*/
public String getMOAttrName(String attrID);

/**
* 根据MOST属性ID获得属性名称
*
* @param mostAttrID
* MOST属性ID
* @return MOST属性名称
*/
public String getMOSTAttrName(String mostAttrID);

/**
* 修改实体数据
*
* @param sql
* 拼装好的sql语句
*/
public void updateEntity(String sql);

/**
* 新增实体数据
*
* @param sql
* 拼装好的sql语句
*/
public void addEntity(String sql);

/**
* 查询基础属性是否存在
*
* @param othersysId
* othersysId信息
* @param otherModelId
* MOST模型ID
* @param basicAttrName
* 该属性名称
*
* @return 属性集合信息
*/
public List<OthersysAttribute> checkBasicAttributeExist(String othersysId,
String otherModelId, String basicAttrName);

/**
* 修改MOST的同步时间
*
* @param othersys
* 封装好的Where条件
* @return 修改条数
*/
public int changeOthersysUpdateDate(Othersys othersys);

/**
* 获得所有Enable为1的Relation
* @param othersyId othersysID信息
* @return Relation的集合
*/
public List<Othersys> getAllEnableRelation(String othersyId);

/**
* 更新MOST模型同步时间
* @param otherModelId 模型唯一标识
*/
public void updateMOSTSynDate (String otherModelId);

/**
* 更新MOST模型同步时间
* @param ciName 参数网元
*/
public void updateMOSTSynDateByCiName (String ciName);

/**
* 获得关系的mapping信息
* @param otherModelId MOST的ID信息
* @return 关系的Mapping信息的集合
*/
public List<Othersys> getRelationMappings(String otherModelId);

/**
* 判断实体表中是否有数据
* @param objId 主键
* @param tableName 表名
* @param keyAttrColumnName 主键ColumnName
* @return 是否存在
*/
public boolean checkEntityExist(String objId, String tableName, String keyAttrColumnName);

/**
* 添加或者更新MOST的信息
* @param moEntity 实体信息数据
*
*/
public void addOrUpdateMOSTEntity(MOEntity moEntity) throws Exception;

/**
* 更新实体关系信息
* @param objId 实体ID
* @param tableName 表名
* @param columnName 列名
* @param columnValue 列值
*/
public void updateEntityRelation(String objId, String tableName,
String columnName, String columnValue);

/**
* 检查两个模型是否已经映射过
* @param pmModelId 模型ID信息
* @param mostCIName MOST的名称信息
* @return 是否映射过
*/
public boolean checkMappingExist(String pmModelId, String mostCIName);

/**
* 查询
* @param pmModelId 模型ID信息
* @param mostCIName 名称信息
* @return String
*/
public String getIDColumnNameByMOSTMOType(String mostCIName, String pmModelId);

/**
* 根据ciid查询objid
* @param tableName 表名
* @param ciID ciID信息
* @param columnName TODO 列名
* @return String
*/
public String getObjIdByCIID(String tableName, String ciID, String columnName);

/**
* 查询实体中有无该记录
* @param tableName 表名
* @param columnName 列名
* @param primaryValue 值
* @return 数据
*/
public List<com.inspur.pmv5.pojo.momgt.MOEntity> getMOEntityByMOSTId(
String tableName, String columnName, String primaryValue);

/**
* 查询基础属性的ID
* @param motypeId 模型ID
* @return ID集合
*/
public List<String> getBasicAttributeId (String motypeId);

/**
* 查询普通属性的columnname
* @param attributeId 属性ID
* @return 属性名称
*/
public String getSimpleMOAttrName(String attributeId);

/**
* 查询源模型实例化的属性
* @param moTypeId
* @return List<MOAttribute>
*/
public List<MOAttribute> getMetaModelAttribute(String moTypeId);

/**
* 根据ciname查询Othersys(不包含mapping信息)
* @param ciName 名称信息
* @return 返回不含Mapping的Othersys
*/
public Othersys getOthersysByCIName(String ciName);

/**
*
* @param modelId
* @return
*/
public List<MOType> getPMParamModel(String modelId);

/**
*
* @param modelId
* @return
*/
// public List<Othersys> getMOSTParamModel(String modelId);

/**
* 检查属性是否已存在
* @param oa 属性信息
* @return 存在个数
*/
public int checkOthersysAttrHasOne(OthersysAttribute oa);
/**
* 根据模型Id获取该模型属性与MOST属性的映射关系列表
* @param modelId
* @return 映射关系列表
*/
public List<Othersys> getAllOthersysModelAttrMapping(String modelId);
/**
* 删除该模型下所有的属性映射关系
* @param modelId 模型Id
*/
public int deleteAllOthersModelAttrMapping(String modelId);


/**
* 需要根据mapping id 删除原有的映射属性
* @param mappingId
* @return
*/
public int deleteMappingAttributesByMappingId(String mappingId);
/**
* 插入该模型的所有映射关系
* @param otherSysList 模型属性映射关系
*/
public boolean addAllOthersModelAttrMapping(List<Othersys> otherSysList);

/**
*
* @return
*/
public List<Othersys> getMOSTParamModel();

/**
*
* @param modelId
* @return
*/
public List<OthersysAttribute> getParamAttrByMOTypeId(String modelId);

/**
* 获取映射的模型
* @param modelId
* @return
*/
public List<Othersys> getMappedModel(String modelId);

/**
* 根据modelId查询属性
* @param otherModelId
* @return
*/
public List<OthersysAttribute> getMOSTParamAttribute(String otherModelId);

/**
* 如果othersys有most模型id和most属性id的话,就返回内部系统模型id和属性id
* 反之,如果othersys有内部系统模型id和属性id,则返回most模型id和
* most属性id
* @param othersys othersys
* @return othersys othersys
*/
public Othersys getModelAndAttributeByMOST(Othersys othersys);
/**
* 根据othersysMotypeId返回most该模型的indexKeyAttributeId的list,
* 对应Othersys的othersAttributeId属性
* @param othersysMotypeId othersysMotypeId
* @return List<Othersys>
*/
public List<Othersys> getIndexKeyAttributeIdList(String othersysMotypeId);
/**
* 根据模型idMOid获取objid或根据模型idobjid获取moid
* @param othersysMotypeId
* @param moId
* @param objId
* @return Map<String,String> key为:modelId,moId,objId
*/
public List<Map<String,String>> getMOSTModelEnityIdByModelIdObjId(String othersysMotypeId,
String moId,String objId);

/**
* 根据小网元模型ID获取大网元模型ID
* @param lowerNEModelId 小网元模型ID
* @return 大网元模型ID
*/
public String getUpperNEModelIdByLowerNEModelId(String lowerNEModelId);

public void deleteModelAttrMappingByOtherAttrId(String otherAttrId);

/**
* 新增模型映射
* @param othersys
*/
public void addModelMappingByModelIdAndOtherModelId(Othersys othersys);
/**
* 更新属性映射关系
* @param othersys
* @return int int
*/
public int updateOtherModelAttrMapping(OthersysAttribute othersys);

public int addOtherModelAttrMapping(OthersysAttribute othersys);
public int updateModelMappingById(Othersys othersys);

public int deleteModelAttrMappingByAttrMappingId(String mappingId);
/**
* 根据otherAttributeId获取相关的映射信息
* @param otherAttributeId
* @return
*/
public List<Map<String,String>> validateAttrMappingByOtherAttrId(String otherAttributeId);

/**
* 查看有无映射上的instanceselect类型的字段
* @param ciName
* @return
*/
public List<OthersysAttribute> getMappedInstanceSelectAttribute(String ciName);

public Othersys getMappingOthersysByCIName(String ciName);

public String getColumnNameByOthersysAttributeId(String attrId, String ciName);

public List<String> getDistinctedValue(String tableName, String columnName);

public void updateToObjId(String tableName, String columnName, String oldValue, String objId);

public List<Map<String,String>> getPrimaryKeyAttributeMapping(String otherMOTypeId);

public List<com.inspur.pmv5.pojo.momgt.MOEntity> getMOEntityByPrimaryKey(String tableName, List<KeyValueVO> keyValueList);

public String getRelationColumnByOthersysAttributeName(String otherMOTypeCode, String otherAttributeCode);

public String getLabelNameRelatedTabelName(String otherMOTypeCode, String otherAttributeCode);

public String getLabelName(String otherMOTypeCode, String otherAttriubteCode);

public boolean isExistN2NRelation(String objAId, String objBId, String tableName);

public void insertN2NRelation(String objAId, String objBId, String tableName);

public void updateCurSyncDate(String ciName, Long systemTime);

public void updateCurTotalPage(String ciName, int totalPage);

public void updateCurPage(String ciName, int currentPage);

public void updateTwoDate(String ciName, Long totalMaxDate);

public void updateCurPageAndTotalPageToNull(String ciName);

public Othersys getOthersysMappingByPMModelId(String modelId);

public List<Othersys> getAllOthersysParamMappingFor12n(String ciName);

public List<OthersysAttribute> getAllOthersysAttrParamMappingFor12n(String ciName);

}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值