All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cherokeesoft.db.utils.serialise.JoinField Maven / Gradle / Ivy

There is a newer version: 1.8.29
Show newest version
package com.cherokeesoft.db.utils.serialise;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import lombok.Getter;
import lombok.Setter;

public class JoinField {
    private @Getter @Setter String json;
    private Gson gson = new GsonBuilder().create();

    public T getValue(Class tClass) {
        if(json != null) {
            return gson.fromJson(json, tClass);
        }
        return null;
    }

    public void setValue(T value) {
        if(value != null) {
            json = gson.toJson(value);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy