<commit_before>package com.typee.typee.network.attendee;

import com.parse.FunctionCallback;
import com.parse.ParseCloud;
import com.parse.ParseException;
import com.parse.ParseQuery;
import com.parse.SaveCallback;
import com.typee.typee.network.model.Attendee;

/**
 * Created by winsonlim on 20/1/14.
 */
public class AttendeeParseService {

	private static AttendeeParseService instance;
	
	public static AttendeeParseService getAttendeeParseService() {
		if (instance == null)
			instance = new AttendeeParseService();

		return instance;
	}

	//fire off per user
	public void addAttendeeToEvent(String eventName,String username,final AttendeeParseListener attendeeParseListener){

		ParseObject eventAttendee = new ParseObject(eventName+"_Attendee");
		Attendee attendee = new Attendee();
		
		eventAttendee.put(attendee.getAttendeeName(), username);
		eventAttendee.saveInBackground(saveInBackground(new SaveCallback() {
			@Override
			public void done(ParseException e) {
				if (e != null) {
					// FAILURE
					attendeeParseListener.unsuccessful(e);
				} else {
				// SUCCESS
					attendeeParseListener.successful();
				}
			}
		});
	}

	public void updateEventAttendeeDetails(String tableName,String objectID,Map<String, String> columnsNameAndValues,final AttendeeParseListener attendeeParseListener) {
        
        columnsNameAndValues.put("tableName",tableName);
        columnsNameAndValues.put("key",objectID);
        
        ParseCloud.callFunctionInBackground("updateEventAttendeeDetails", columnsNameAndValues, new FunctionCallback<String>() {
            public void done(String object, ParseException e) {
                if (e == null) {
                    attendeeParseListener.successful();
                } else {
                    attendeeParseListener.unsuccessful(e);
                }
            }
        });
	}
}<commit_msg>added col for attendee<commit_after>package com.typee.typee.network.attendee;

import com.parse.FunctionCallback;
import com.parse.ParseCloud;
import com.parse.ParseException;
import com.parse.ParseQuery;
import com.parse.SaveCallback;
import com.typee.typee.network.model.Attendee;

/**
 * Created by winsonlim on 20/1/14.
 */
public class AttendeeParseService {

	private static AttendeeParseService instance;
	
	public static AttendeeParseService getAttendeeParseService() {
		if (instance == null)
			instance = new AttendeeParseService();

		return instance;
	}

	//fire off per user
	public void addAttendeeToEvent(String eventName,String username,final AttendeeParseListener attendeeParseListener){

		ParseObject eventAttendee = new ParseObject(eventName+"_Attendee");
		Attendee attendee = new Attendee();
		
		eventAttendee.put(attendee.getAttendeeName(), username);
		eventAttendee.put(attendee.getAttendeeTask(), null);
		eventAttendee.put(attendee.getAttendeeSplittedBill(), null);
		eventAttendee.put(attendee.getAttendeeLocation(), null);
		eventAttendee.put(attendee.getAttendeeStatusKey(), null);
		
		eventAttendee.saveInBackground(saveInBackground(new SaveCallback() {
			@Override
			public void done(ParseException e) {
				if (e != null) {
					// FAILURE
					attendeeParseListener.unsuccessful(e);
				} else {
				// SUCCESS
					attendeeParseListener.successful();
				}
			}
		});
	}

	public void updateEventAttendeeDetails(String tableName,String objectID,Map<String, String> columnsNameAndValues,final AttendeeParseListener attendeeParseListener) {
        
        columnsNameAndValues.put("tableName",tableName);
        columnsNameAndValues.put("key",objectID);
        
        ParseCloud.callFunctionInBackground("updateEventAttendeeDetails", columnsNameAndValues, new FunctionCallback<String>() {
            public void done(String object, ParseException e) {
                if (e == null) {
                    attendeeParseListener.successful();
                } else {
                    attendeeParseListener.unsuccessful(e);
                }
            }
        });
	}
}
{'fraction_non_alphanumeric': 0.09530975670930525, 'fraction_numerical': 0.002508151492350138, 'mean_word_length': 3.631823461091754, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6081093', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1146, 'n_words': 213}