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

mtons.freemarker.json.MappingJsonValue Maven / Gradle / Ivy

The newest version!
/*
+--------------------------------------------------------------------------
|   Mtons [#RELEASE_VERSION#]
|   ========================================
|   Copyright (c) 2014, 2015 mtons. All Rights Reserved
|   http://www.mtons.com
+---------------------------------------------------------------------------
*/
package mtons.freemarker.json;

/**
 * Created by langhsu on 2015/11/26.
 */
public class MappingJsonValue {
    public static int OK = 200;
    public static int ERROR = 500;

    private Object value;
    private String jsonp;
    private int status;

    /**
     * Create a new instance wrapping the given POJO to be serialized.
     * @param value the Object to be serialized
     */
    public MappingJsonValue(Object value) {
        this.value = value;
    }


    /**
     * Modify the POJO to serialize.
     * @param value the Object to be serialized
     */
    public void setValue(Object value) {
        this.value = value;
    }

    /**
     * Return the POJO that needs to be serialized.
     * @return value the Object to be serialized
     */
    public Object getValue() {
        return this.value;
    }

    /**
     * Return the configured JSONP function name.
     * @return jsonp string
     */
    public String getJsonp() {
        return jsonp;
    }

    /**
     * Set the name of the JSONP function name.
     * @param jsonp string
     */
    public void setJsonp(String jsonp) {
        this.jsonp = jsonp;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy