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);
    }
}

@@ -557,423 +557,8 @@
  %7D%0A%0A
-    private String convertJSONString(final ArrayList%3CString%3E list) %7B%0A        JSONArray array = new JSONArray(list);%0A        return array.toString();%0A    %7D%0A%0A    private String convertThought(final String thought) throws JSONException%7B%0A        Thoughts thoughtObject = new Thoughts();%0A        thoughtObject.addThought(%0A                thought%0A        );%0A        return thoughtObject.getmThoughts().toString();%0A    %7D%0A%0A
     

remove unused code.