&& ObjectUtils.bigDecimalEqual(cpuIdle, other.cpuIdle) && ObjectUtils.bigDecimalEqual(cpuLoad, other.cpuLoad) && ObjectUtils.bigDecimalEqual(cpuSys, other.cpuSys) && ObjectUtils.bigDecimalEqual(cpuUser, other.cpuUser) && Objects.equals(memAvailable, other.memAvailable) && Objects.equals(memFree, other.memFree)
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof GlusterVolumeEntity)) { return false; } GlusterVolumeEntity other = (GlusterVolumeEntity) obj; return Objects.equals(name, other.getName()) && Objects.equals(clusterId, other.clusterId) && volumeType == other.volumeType && status == other.status && Objects.equals(replicaCount, other.replicaCount) && Objects.equals(stripeCount, other.stripeCount) && Objects.equals(disperseCount, other.disperseCount) && Objects.equals(redundancyCount, other.redundancyCount) && Objects.equals(isArbiter, other.isArbiter) && ObjectUtils.haveSameElements(getOptions(), other.getOptions()) && ObjectUtils.haveSameElements(accessProtocols, other.accessProtocols) && ObjectUtils.haveSameElements(transportTypes, other.transportTypes) && ObjectUtils.haveSameElements(bricks, other.bricks) && Objects.equals(asyncTask, other.asyncTask) && Objects.equals(advancedDetails, other.advancedDetails) && Objects.equals(snapshotsCount, other.snapshotsCount) && Objects.equals(snapMaxLimit, other.snapMaxLimit) && Objects.equals(snapshotScheduled, other.snapshotScheduled); }
@Override protected MapSqlParameterSource createFullParametersMapper(ManagedBlockStorage storage) { return createIdParameterMapper(storage.getId()) .addValue("driver_options", ObjectUtils.mapNullable(storage.getDriverOptions(), JsonHelper::mapToJsonUnchecked)) .addValue("driver_sensitive_options", DbFacadeUtils.encryptPassword(ObjectUtils.mapNullable(storage.getDriverSensitiveOptions(), JsonHelper::mapToJsonUnchecked))); }
@Override public List<ManagedBlockStorage> getCinderStorageByDrivers(Map<String, Object> driverOptions) { return getCallsHandler().executeReadList("GetCinderStorageByDrivers", cinderStorageDomainStaticRowMapper, getCustomMapSqlParameterSource() .addValue("driver_options", ObjectUtils.mapNullable(driverOptions, JsonHelper::mapToJsonUnchecked))); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof DiskImage)) { return false; } DiskImage other = (DiskImage) obj; return super.equals(obj) && Objects.equals(getImage(), other.getImage()) && Objects.equals(snapshots, other.snapshots) && actualSizeInBytes == other.actualSizeInBytes && Objects.equals(appList, other.appList) && Objects.equals(description, other.description) && readRateFromDiskImageDynamic == other.readRateFromDiskImageDynamic && Objects.equals(storageIds, other.storageIds) && Objects.equals(storagePoolId, other.storagePoolId) && Objects.equals(storagesNames, other.storagesNames) && writeRateFromDiskImageDynamic == other.writeRateFromDiskImageDynamic && Objects.equals(readLatency, other.readLatency) && Objects.equals(writeLatency, other.writeLatency) && Objects.equals(flushLatency, other.flushLatency) && ObjectUtils.haveSameElements(diskProfileIds, other.diskProfileIds) && ObjectUtils.haveSameElements(diskProfileNames, other.diskProfileNames); }
@Test public void testBigDecimalEqual() { assertTrue(ObjectUtils.bigDecimalEqual(new BigDecimal("0"), new BigDecimal("0.0"))); assertTrue(ObjectUtils.bigDecimalEqual(new BigDecimal("0.0"), new BigDecimal("0.00"))); assertTrue(ObjectUtils.bigDecimalEqual(new BigDecimal("1"), new BigDecimal("1.0"))); assertTrue(ObjectUtils.bigDecimalEqual(new BigDecimal("0.1"), new BigDecimal("0.1"))); assertTrue(ObjectUtils.bigDecimalEqual(null, null)); assertFalse(ObjectUtils.bigDecimalEqual(null, new BigDecimal("0"))); assertFalse(ObjectUtils.bigDecimalEqual(new BigDecimal("0"), null)); assertFalse(ObjectUtils.bigDecimalEqual(new BigDecimal("1"), new BigDecimal("0"))); } }
.addValue("in_fence_flow", vds.isInFenceFlow()) .addValue("kernel_features", ObjectUtils.mapNullable(vds.getKernelFeatures(), JsonHelper::mapToJsonUnchecked)) .addValue("vnc_encryption_enabled", vds.isVncEncryptionEnabled()) .addValue("connector_info", ObjectUtils.mapNullable(vds.getConnectorInfo(), JsonHelper::mapToJsonUnchecked));
/** * When the mapped ListModel does a setSelectedItem, this is invoked. This method sets checked, the checkboxes * corresponding to the list passed to it. * @param value * list of checkboxes to set checked. * @param fireEvents * whether to fire ValueChangeEvent */ @Override public void setValue(List<T> value, boolean fireEvents) { List<T> selectedItems = getValue(); if (value == selectedItems || ObjectUtils.haveSameElements(selectedItems, value)) { return; } clearAllSelections(); if(value == null){ return; } for (T currentvalue : value) { if (checkBoxes.containsKey(currentvalue)) { checkBoxes.get(currentvalue).setValue(true); } } if (fireEvents) { ValueChangeEvent.fire(this, value); } }