+
+ /**
+ * Set CmHandleProperties by converting a list of PersistenceCmHandle.AdditionalProperty objects.
+ *
+ * @param cmHandlePropertiesAsList the cm handle additional properties
+ */
+ public void asCmHandleProperties(
+ final List<PersistenceCmHandle.AdditionalProperty> cmHandlePropertiesAsList) {
+ final boolean isCmHandlePropertiesNullOrEmpty =
+ cmHandlePropertiesAsList == null || cmHandlePropertiesAsList.isEmpty();
+ if (isCmHandlePropertiesNullOrEmpty) {
+ cmHandleProperties = Collections.emptyMap();
+ } else {
+ cmHandleProperties = new LinkedHashMap<>();
+ for (final PersistenceCmHandle.AdditionalProperty additionalProperty : cmHandlePropertiesAsList) {
+ cmHandleProperties.put(additionalProperty.getName(),
+ additionalProperty.getValue());
+ }
+ }
+ }
+