org.eclipse.xpanse.modules.database.common.ObjectJsonConverter Maven / Gradle / Ivy
The newest version!
/*
* SPDX-License-Identifier: Apache-2.0
* SPDX-FileCopyrightText: Huawei Inc.
*
*/
package org.eclipse.xpanse.modules.database.common;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import jakarta.persistence.AttributeConverter;
import jakarta.persistence.Converter;
import java.util.Objects;
import org.apache.commons.lang3.StringUtils;
/**
* Converter to handle object data type and string automatic conversion between database and the
* entity.
*/
@Converter
public class ObjectJsonConverter implements AttributeConverter
© 2015 - 2024 Weber Informatics LLC | Privacy Policy