diff options
author | Daniel Silverthorn <daniel.silverthorn@amdocs.com> | 2020-01-07 13:39:45 -0500 |
---|---|---|
committer | Daniel Silverthorn <daniel.silverthorn@amdocs.com> | 2020-01-07 13:44:22 -0500 |
commit | 2f70cf4692e55dce03c130792d4d4096aaf0c354 (patch) | |
tree | de7cb76f2be67d7454c777e61d912555b3276ca3 /src/main/java/org | |
parent | 547f8e683673951211e42bcb27858f79cfe87125 (diff) |
Prefer default field if available
Change-Id: Iefed13bb0ae83acc5b5accdc9d1a30f1126e2a53
Issue-ID: AAI-2743
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/onap/aai/datarouter/policy/AbstractSpikeEntityEventProcessor.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/onap/aai/datarouter/policy/AbstractSpikeEntityEventProcessor.java b/src/main/java/org/onap/aai/datarouter/policy/AbstractSpikeEntityEventProcessor.java index 4aad6f2..08ebd77 100644 --- a/src/main/java/org/onap/aai/datarouter/policy/AbstractSpikeEntityEventProcessor.java +++ b/src/main/java/org/onap/aai/datarouter/policy/AbstractSpikeEntityEventProcessor.java @@ -42,6 +42,7 @@ import org.json.JSONObject; import org.onap.aai.cl.api.Logger; import org.onap.aai.cl.eelf.LoggerFactory; import org.onap.aai.cl.mdc.MdcContext; +import org.onap.aai.datarouter.util.DataRouterProperties; import org.onap.aai.schema.OxmModelLoader; import org.onap.aai.datarouter.entity.DocumentStoreDataEntity; import org.onap.aai.datarouter.entity.SpikeEventEntity; @@ -461,6 +462,10 @@ public abstract class AbstractSpikeEntityEventProcessor implements Processor { private String getEntityPrimaryKeyFieldName(DynamicJAXBContext oxmJaxbContext, String oxmEntityType, String entityType) { + String defaultKey = DataRouterProperties.get("entity.primary.field"); + if (defaultKey != null) { + return defaultKey; + } DynamicType entity = oxmJaxbContext.getDynamicType(oxmEntityType); if (entity == null) { |