/
Find Usages
Find Usages
Motivation
We can raise questions such as “How many ACCs are used this given ACC as a based ACC?”, “How many ASCCPs are related with ACCs through ASCCs? or vice versa?”, and so on.
If CC developers can see the relationships (or paths), especially reverse ordered ones (i.e.,
acc_id->basd_acc_id
orasccp_id->ascc_id->acc_id
), for the given component, it may prevent to create unnecessary component that already exists.
Proposal
Find Usages
menu on the CC tree.For ACC
Find all based ACCs
function List<ACC> findAllBasedACCs(ACC sourceACC) { List<ACC> results = new ArrayList(); ACC currentACC = sourceACC.basedACC; while (currentACC != null) { results.add(currentACC); currentACC = currentACC.basedACC; } return results; }
Find all ASCCPs whose
role_of_acc_id
value equals to the given ACC IDfunction List<ASCCP> findAllASCCPsByRoleOfACC(ACC roleOfACC) { return query(ASCCP).where(ASCCP.roleOfAccId == roleOfACC.accId); }
For ASCCP
Find all ACCs that have a relationship with the given ASCCP through ASCCs.
function List<ACC> findAllACCsByToASCCP(ASCCP toASCCP) { return query(ACC).join(ACC.accId == ASCC.fromAccId) .where(ASCC.toAsccpId == toASCCP.asccpId); }
For BCCP
Find all ACCs that have a relationship with the given BCCP through BCCs.
, multiple selections available,