X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fmusic%2Fdatastore%2Fjsonobjects%2FJsonInsert.java;h=09cd65dcad273a804f537568e67f1f6bc4ac4716;hb=b426a6e832df4db4a57c0d271559fd0b0926e02d;hp=c79ba9b70e7cd28e11f6955e5ac283ceb248d0db;hpb=96f707fc3cf51e5bd1d1cde81ced3a804af2d5d9;p=music.git diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java index c79ba9b7..09cd65dc 100644 --- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java +++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java @@ -3,6 +3,7 @@ * org.onap.music * =================================================================== * Copyright (c) 2017 AT&T Intellectual Property + * Modifications Copyright (C) 2018 IBM. * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,6 +20,7 @@ * ============LICENSE_END============================================= * ==================================================================== */ + package org.onap.music.datastore.jsonobjects; import java.io.ByteArrayOutputStream; @@ -33,26 +35,33 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import org.onap.music.eelf.logging.EELFLoggerDelegate; +import org.onap.music.eelf.logging.format.AppMessages; +import org.onap.music.eelf.logging.format.ErrorSeverity; +import org.onap.music.eelf.logging.format.ErrorTypes; + @ApiModel(value = "JsonTable", description = "Json model for table vlaues insert") @JsonIgnoreProperties(ignoreUnknown = true) public class JsonInsert implements Serializable { + private static final long serialVersionUID = 1L; private String keyspaceName; private String tableName; private transient Map values; private String ttl; private String timestamp; - private transient Map row_specification; + private transient Map rowSpecification; private Map consistencyInfo; private Map objectMap; - + private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JsonInsert.class); + @ApiModelProperty(value = "objectMap") public Map getObjectMap() { - return objectMap; - } + return objectMap; + } public void setObjectMap(Map objectMap) { - this.objectMap = objectMap; - } + this.objectMap = objectMap; + } @ApiModelProperty(value = "keyspace") public String getKeyspaceName() { @@ -109,12 +118,12 @@ public class JsonInsert implements Serializable { } @ApiModelProperty(value = "Information for selecting specific rows for insert") - public Map getRow_specification() { - return row_specification; + public Map getRowSpecification() { + return rowSpecification; } - public void setRow_specification(Map row_specification) { - this.row_specification = row_specification; + public void setRowSpecification(Map rowSpecification) { + this.rowSpecification = rowSpecification; } public byte[] serialize() { @@ -124,7 +133,7 @@ public class JsonInsert implements Serializable { out = new ObjectOutputStream(bos); out.writeObject(this); } catch (IOException e) { - e.printStackTrace(); + logger.error(EELFLoggerDelegate.errorLogger, e, AppMessages.IOERROR, ErrorSeverity.ERROR, ErrorTypes.DATAERROR); } return bos.toByteArray(); }