@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == this.getClass()) { ObjectPoolMapKey other = (ObjectPoolMapKey) obj; return this.serviceID.equals(other.serviceID) && this.sbbID.equals(other.sbbID); } else { return false; } }
@Override public boolean equals(Object obj) { if (obj != null && obj.getClass() == this.getClass()) { SbbUsageMBeanMapKey other = (SbbUsageMBeanMapKey) obj; // check sbb id if (!this.sbbID.equals(other.sbbID)) { return false; } // check param name, may be null if (other.paramName == null) { if (this.paramName != null) { return false; } } else { if (!other.paramName.equals(this.paramName)) { return false; } } return true; } else { return false; } } }
if (!implSbbID.equals(idBeingLookedUp)) {
for (UsageMBeanImpl usageMBeanImpl : usageMBeans.values()) { if (((SbbNotification) usageMBeanImpl.getNotificationSource()) .getSbb().equals(sbbId)) { String name = usageMBeanImpl.getUsageParameterSet(); if (name != null) {
/** * * @param sbbEntity * @param cmpFieldName * @param cmpFieldValue */ public static void setCMPFieldOfTypeSbbLocalObject(SbbEntity sbbEntity, String cmpFieldName, SbbLocalObject cmpFieldValue) { if (cmpFieldValue == null) { sbbEntity.setCMPField(cmpFieldName, null); return; } SbbLocalObjectImpl sbbLocalObjectImpl = null; try { sbbLocalObjectImpl = (SbbLocalObjectImpl) cmpFieldValue; } catch (ClassCastException e) { throw new IllegalArgumentException("CMP value being set ("+ cmpFieldValue+ ") is an unknown SbbLocalObject implementation"); } final CMPFieldDescriptor field = sbbEntity.getSbbComponent().getDescriptor().getCmpFields().get(cmpFieldName); if (field.getSbbRef() != null && !field.getSbbRef().equals(sbbLocalObjectImpl.getSbbEntity().getSbbComponent().getSbbID())) { throw new IllegalArgumentException("CMP value being set ("+ sbbLocalObjectImpl.getSbbEntity().getSbbComponent().getSbbID()+ ") is for a different sbb then the one expected ("+ field.getSbbRef() + ")"); } sbbEntity.setCMPField(cmpFieldName, sbbLocalObjectImpl.getSbbEntityId()); }
SbbNotification sbbNotification = (SbbNotification) usageMBeanImpl .getNotificationSource(); if (sbbNotification.getSbb().equals(sbbId)) { usageMBeanImpl.resetAllUsageParameters();