Example #1
0
 /**
  * Method for deleting the component connection by compId.
  *
  * @param compId ComponentID to be deleted.
  */
 private void deleteConnectionWithCompId(final String compId) {
   for (Entry<String, ComponentConnection> e :
       new HashSet<Entry<String, ComponentConnection>>(connectionTable.entrySet())) {
     ComponentConnectionLogicAndNetwork val = (ComponentConnectionLogicAndNetwork) e.getValue();
     if (compId.equals(val.getLogicId()) || compId.equals(val.getNetworkId())) {
       deleteConnections(val.getObjectId());
     }
   }
 }
Example #2
0
 /**
  * Method for checking if the object has connections.
  *
  * @param id ComponentID to be checked.
  * @return true if connection is existing.
  */
 private boolean hasConnection(final String id) {
   for (ComponentConnection objProp : connectionTable.values()) {
     ComponentConnectionLogicAndNetwork val = (ComponentConnectionLogicAndNetwork) objProp;
     if (id.equals(val.getLogicId()) || id.equals(val.getNetworkId())) {
       return true;
     }
   }
   return false;
 }