com.crm.earnify.request.action.ActionModel.java Source code

Java tutorial

Introduction

Here is the source code for com.crm.earnify.request.action.ActionModel.java

Source

/*  Copyright 2016 Jasper Infotech (P) Limited . All Rights Reserved.
 *  JASPER INFOTECH PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.crm.earnify.request.action;

import com.crm.earnify.base.json.JSONizable;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

/**
 *  @version     1.0, 29/2/16
 *  @author sandeepandey
 */
public class ActionModel implements JSONizable {

    private Long actionId;
    private String actionClass;

    public Long getActionId() {
        return actionId;
    }

    public void setActionId(Long actionId) {
        this.actionId = actionId;
    }

    public String getActionClass() {
        return actionClass;
    }

    public void setActionClass(String actionClass) {
        this.actionClass = actionClass;
    }

    @Override
    public String toJSONString() {
        try {
            return new ObjectMapper().writeValueAsString(this);
        } catch (JsonProcessingException e) {
            e.printStackTrace();
        }
        return new String();
    }
}