Change-Id: Iefed13bb0ae83acc5b5accdc9d1a30f1126e2a53
Issue-ID: AAI-2743
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
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.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;
import org.onap.aai.schema.OxmModelLoader;
import org.onap.aai.datarouter.entity.DocumentStoreDataEntity;
import org.onap.aai.datarouter.entity.SpikeEventEntity;
private String getEntityPrimaryKeyFieldName(DynamicJAXBContext oxmJaxbContext,
String oxmEntityType, String entityType) {
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) {
DynamicType entity = oxmJaxbContext.getDynamicType(oxmEntityType);
if (entity == null) {