package com.maxiee.heartbeat.database.api;

import android.content.ContentValues;
import android.content.Context;

import com.maxiee.heartbeat.database.tables.EventsTable;
import com.maxiee.heartbeat.model.Thoughts;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;

/**
 * Created by maxiee on 15-6-12.
 */
public class AddEventApi extends BaseDBApi {

    private String mEvent;

    public AddEventApi(Context context,
                       final String event) {
        super(context);
        mEvent = event;
    }

    private String convertJSONString(final ArrayList<String> list) {
        JSONArray array = new JSONArray(list);
        return array.toString();
    }

    private String convertThought(final String thought) throws JSONException{
        Thoughts thoughtObject = new Thoughts();
        thoughtObject.addThought(
                thought
        );
        return thoughtObject.getmThoughts().toString();
    }

    public long exec() {
        ContentValues values = new ContentValues();
        values.put(EventsTable.EVENT, mEvent);
        values.put(EventsTable.TIMESTAMP, System.currentTimeMillis());
        return add(EventsTable.NAME, values);
    }
}

package com.maxiee.heartbeat.database.api;

import android.content.ContentValues;
import android.content.Context;

import com.maxiee.heartbeat.database.tables.EventsTable;
import com.maxiee.heartbeat.model.Thoughts;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;

/**
 * Created by maxiee on 15-6-12.
 */
public class AddEventApi extends BaseDBApi {

    private String mEvent;

    public AddEventApi(Context context,
                       final String event) {
        super(context);
        mEvent = event;
    }

    public long exec() {
        ContentValues values = new ContentValues();
        values.put(EventsTable.EVENT, mEvent);
        values.put(EventsTable.TIMESTAMP, System.currentTimeMillis());
        return add(EventsTable.NAME, values);
    }
}

remove unused code.